Customize
Customize Rasuke from the source kit. Do not edit compiled bundles or scattered hex values.
Colors, type, and spacing
- Open
rasuke-html-dev/tokens/tokens.json. - Change the value (colors need both
lightanddarkwhen they differ). - Run
npm run tokens(or justnpm run dev/npm run build— it runs automatically). - Use the resulting
var(--token-name)in SCSS.
See Design Tokens for the pipeline and Colors / Typography for the public variable names.
Add a page
- Create
src/pages/{name}.htmlwith{% extends "layouts/base.njk" %}. - Set
title,description, andbodyClass. AddcolorSchemeonly to pin a mode,headerPartial/footerPartialto change the chrome, andpreloaderEnabled = falseif the page should not preload. - Include one section per design block inside
{% block content %}. - Link the page from the navigation data (
src/data/navPrimary.json,navHeader2.json/navHeader4.json,offcanvasMenu.json) if it belongs in navigation.
Vite picks up every src/pages/*.html automatically — no config change is needed.
Add a section
src/sections/{group}/{name}.njk— semantic HTML, first child of<section>is exactly one.container.src/assets/scss/sections/{group}/_{name}.scss— starts with@use "../../abstracts" as *;, then the block class. Values only fromvar(--…)tokens (1px/2px hairlines excepted); any geometry/duration the JS needs goes inlayout.*tokens so SCSS and JS read the same number.@forward "{name}";in that folder's_index.scss(and@use "sections/{group}";inmain.scssfor a brand-new group).- Optional:
src/data/{name}.jsonfor looped content, andsrc/assets/js/{name}.jsexporting oneinit{Name}()that no-ops when its markup is absent; import and call it frommain.js(respectprefers-reduced-motionlike the existing modules). {% include %}the section from the page, then runnpm run lint:fse.
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;.
Content data
Add src/data/{key}.json. It becomes {{ key }} / {% for item in key %} in every template. Prefer loops for long lists (projects, services, FAQs, team…); hardcoded markup is fine for one-offs. Global chrome toggles live in preloader.json, cursor.json, and transition.json; site-wide values (name, description, logo) in site.json.
Images
Put design assets in src/assets/imgs/{section}/, not in dist/. Prefer optimized .webp files at 2× the displayed frame size. Reference them as assets/imgs/… so the flat dist/ output still works from disk. Helper converters live in scripts/convert-*-images.mjs (sharp).
Global features on/off
- Preloader:
src/data/preloader.json(enabled,wordmark,statuses,oncePerSession/sessionKey), per page{% set preloaderEnabled = false %}. - Custom cursor:
src/data/cursor.json, per pagecursorEnabled. - Page transition:
src/data/transition.json(enabled,prefetch), per pagetransitionEnabled. - Smooth scroll: created in
main.js; a host page can disable it viawindow.rasukeCore = { smoothScroll: false }(the WordPress runtime uses this), and it is always skipped forprefers-reduced-motion.