The text of CUSTOMISING.md from the Shipfolder 1.1.0 download.
Customising Shipfolder
This guide covers the changes buyers make most often. Run python3 qa/qa.py after each one.
1. How the colour system works
css/theme.css has four parts:
- Scale tokens: type, spacing, radius, layout, shadow and motion.
Presets: each preset sets eight accent values, four for light mode and four for dark mode:
Token Used for --accent-light/--accent-darkprimary buttons, check marks, focus ring, featured pricing border --accent-text-light/--accent-text-darklinks, eyebrow labels, active navigation --on-accent-light/--on-accent-darktext on primary buttons --accent-soft-light/--accent-soft-darktinted backgrounds: badges, active nav item, CTA band - Light mode: neutral colours (background, surfaces, text, borders, code, tags), plus a mapping such as
--color-accent: var(--accent-light). - Dark mode: the same tokens with dark values. This block appears twice, once inside
@media (prefers-color-scheme: dark)and once as:root[data-theme="dark"]. CSS cannot share one rule between a media query and a normal selector. Keep the two copies identical;qa/qa.pyfails if they differ.
components.css uses only the --color-* tokens and never raw colours. The QA script checks this too.
2. Make your own preset
- Copy the
:root[data-preset="teal"] { … }block intheme.css. - Rename it, for example
:root[data-preset="brand"]. - Set your eight values. As a starting point:
--accent-lightshould be dark enough for white text (aim for 4.5:1 against#ffffff).--accent-text-lightis usually a shade darker than--accent-light.--accent-darkshould be a light tint of the same hue, with dark--on-accent-darktext on it.--accent-soft-*are very pale (light mode) or very deep (dark mode) tints for backgrounds.
- Set
data-preset="brand"on the<html>element of every page. - Add
"brand"toPRESETSnear the top ofqa/qa.pyand run it. It checks your new colours in both modes and names any pair below the minimum.
3. Change neutral colours, fonts, spacing
- Neutrals (backgrounds, text, borders): edit the light block and both dark blocks.
- Fonts: the kit uses the visitor's system fonts, so nothing downloads. To use a different stack, change
--font-sansand--font-mono. To self-host a web font, put the font files inassets/fonts/, add an@font-facerule at the top oftheme.css, and record the font and its licence inLICENSES.md. Use only fonts whose licence allows it, such as the SIL Open Font License. Note that the QA script flags font files on purpose: the kit as shipped uses none. Remove that rule fromcheck_externalinqa/qa.pyif you add fonts deliberately. - Type scale:
--text-*tokens. The two biggest sizes useclamp()so headings shrink on phones. - Spacing and radius:
--space-*and--radius-*.
4. Change the logo and name
- The header and footer logo is an inline SVG with the class
brand-mark. It draws a rounded square in the accent colour with a chevron on top. Replace the<svg>…</svg>with your own. Keeparia-hidden="true", because the visible product name next to it is the link text. assets/favicon.svgis the browser-tab icon. Edit its colours or replace the file.- Search all pages for
Example APIandExample Co.
5. Header and footer
The header and footer are copied into each page (no build step means no includes). To change them:
- Edit them in
index.html. - Paste the same markup into the other five pages.
- Move
aria-current="page"to the right navigation link on each page. - Run
python3 qa/qa.py. Theshared-chromecheck fails if any page's header or footer differs fromindex.html, ignoringaria-current.
6. Code blocks and the copy button
<div class="code-block" data-copy>
<div class="code-header"><span>Shell</span></div>
<pre tabindex="0"><code>npm install -g example-cli</code></pre>
</div>
data-copyadds a Copy button when JavaScript runs. Remove it for blocks that shouldn't have one.- Escape
<as<,>as>and&as&inside<code>. - Syntax colours are optional. Wrap tokens in
<span class="tok-k">(keyword),tok-s(string),tok-f(function or command),tok-n(number) ortok-c(comment). There is no highlighter script, which keeps the JavaScript small. Code without spans shows in one colour. - Long lines scroll inside the block, never the page.
7. Add pages
- Docs page: copy
docs.htmlto, say,docs-webhooks.html. Update the<title>, meta description,<h1>, content and "On this page" list. In the sidebar of every docs page, link to the new file and movearia-current="page"to it. In the sample, the sidebar entries after "Quick start" point to sections ofdocs.html. Point them at your real pages as you add them. - Blog post: copy
blog-post.html, then add a card for it inblog.html. - Changelog entry: copy an
<article class="changelog-entry">block to the top of the list. Give it a uniqueid(for examplev2-5-0) so you can link to it. Use<time datetime="YYYY-MM-DD">. Tag classes:tag-new,tag-improved,tag-fixed,tag-breaking.
Every page needs a unique <title> and meta description, and exactly one <h1>. The QA script checks all three.
8. JavaScript
js/main.js (about 3.9 KB, no dependencies) does three things:
- Applies the saved theme before the page paints. It loads in
<head>withoutdeferon purpose, so a dark-mode reader never sees a flash of white. - Shows and wires up the theme toggle.
- Adds Copy buttons and collapses the docs menu on small screens.
Everything else works without it. To drop JavaScript entirely, delete the <script> tag and the file. Remove the toggle button too, or leave it, since it stays hidden.
The storage key is shipfolder-theme. Change KEY at the top of main.js if you want your own.
9. Things to replace before launch
- Every sentence containing "Placeholder", and the placeholder author on
blog-post.html. - The "How it works" steps, features, pricing plans and FAQ on
index.html. - Links to
example.com, and thehello@/sales@example.comaddresses. - Pricing plans and limits.
- The meta descriptions on every page.
The sample pages contain no testimonials, customer logos or usage numbers. If you add any, use only real ones that you have permission to publish.