Customize
Customize Rasuke from the source project. Do not edit generated SCSS maps, compiled bundles, or scattered hex values.
1. Content (JSON)
Section copy, menus, and lists live in src/data/*.json. Each section component imports its own file, so replacing text, images, or link targets never requires touching TSX. Chrome configuration lives in preloader.json, cursor.json, and transition.json; site-wide values in site.json.
2. Design tokens
- Open
tokens/tokens.json. - Change the value (colors need both
lightanddarkwhen they differ). - Run
npm run tokens— or justnpm run dev/npm run build, which run it first. - Use the resulting
var(--token-name)in SCSS.
See Design Tokens for the pipeline and Colors / Typography for the variable names.
3. Section styles (SCSS)
Visual rules live under src/styles/sections/{group}/_{name}.scss and mirror the React class names in src/components/sections/{group}/{Name}.tsx. Layout chrome is under src/styles/layout, shared components under src/styles/components. New groups must be imported in src/styles/main.scss.
4. Page chrome (SiteShell)
<SiteShell
pageName="about"
bodyClass="page-about"
colorScheme="dark"
headerName="header-1"
footerName="footer-1"
enablePreLoader={false}
cursorEnabled
transitionEnabled
>
{/* sections */}
</SiteShell>
headerName—header-1(default),header-2,header-3,header-4, ornonefooterName—footer-1(default),footer-2,footer-3, ornoneenablePreLoader,cursorEnabled,transitionEnabled— default to their JSON config flagspageName/bodyClass— page hooks used by SCSS and effect modulescolorScheme— pinsdarkorlight(see Dark Mode)
5. Add a page
- Create a route folder under
src/app/{name}/with apage.tsx. - Export
metadata(title,description). - Render
SiteShelland compose section components inside it. - Link the page from the navigation JSON (
navPrimary.json,navHeader2.json/navHeader4.json,offcanvasMenu.json) if it belongs in navigation. - Use
Linkfromnext/linkandpageHref()from@/lib/assetsfor internal links.
import type { Metadata } from "next";
import { SiteShell } from "@/components/layout/SiteShell";
import { About2 } from "@/components/sections/about/About2";
export const metadata: Metadata = { title: "About", description: "About Rasuke." };
export default function AboutPage() {
return (
<SiteShell pageName="about" bodyClass="page-about" colorScheme="dark">
<About2 />
</SiteShell>
);
}
6. Add a section
src/components/sections/{group}/{Name}.tsx— semantic markup with the same BEM classes as the HTML master, reading copy fromsrc/data/{name}.json.src/styles/sections/{group}/_{name}.scss— start with@use "../../abstracts" as *;, then the block class. Token values only.- Register the partial in
src/styles/sections/{group}/_index.scss(@forward "{name}";) and add the group tosrc/styles/main.scssif it is new. - Optional motion: add
src/effects/{name}.jsexporting aninit{Name}()that no-ops when its markup is absent and returns a cleanup function. Import it insrc/components/effects/EffectsBootstrap.tsxand push its teardown. - Place the component on a page and check the route.
Layout mixins: @include container;, @include section-space(var(--space-12), var(--space-10));, @include grid-auto(18rem);, @include grid-columns(3);, @include media-up(lg) { … }, @include visually-hidden;.
7. Images and media
- Put assets in
public/assets/imgs/{section}/— never inout/or.next/. - Prefer optimized
.webpat 2× the displayed frame size. - Reference them as
/assets/imgs/…, or pass JSON paths throughasset(). next/imageis unoptimized by design (static export). Provide width and height, and use the helpers in@/lib/assetswhen CSS controls one axis.
8. Fonts
The root layout links Host Grotesk, DM Sans, and Bonheur Royale from Google Fonts. To swap fonts, update those links in src/app/layout.tsx, the family entries in tokens/tokens.json, then run npm run tokens. BDO Grotesk is licensed — add your own @font-face for full design parity.
9. Global features on / off
- Preloader —
src/data/preloader.json(enabled,wordmark,statuses,oncePerSession,sessionKey); per pageenablePreLoader={false}. - Custom cursor —
src/data/cursor.json; per pagecursorEnabled={false}. - Page transition —
src/data/transition.json(enabled,prefetch); per pagetransitionEnabled={false}. - Smooth scroll — created in
EffectsBootstrap; disable globally withwindow.rasukeCore = { smoothScroll: false }before the bootstrap runs, or per user withprefers-reduced-motion.
10. Rebuild
npm run build npx --yes serve out
Deploy out/ to Cloudflare Pages or any static host. See Local Preview.