toolsite

Guide

Configuration

site.config.ts holds everything that makes the site about your tool. The landing page, its Markdown copy, llms.txt, the header, the favicon and the colours all read from it.

Fields

FieldWhat it's for
nameThe tool's name, as you'd write it in a sentence. Shown in the header and page titles.
descriptionOne sentence a stranger understands. Used in meta tags and llms.txt.
repoThe tool's source. The header's GitHub link goes here.
originWhere the site lives, such as https://you.github.io/mytool-site. Links in the Markdown copies are built from it.
installThe first command someone runs. Shown with a copy button.
requirementWhat it needs, printed under the install line.
statusOptional. A short chip above the headline, such as Early or v1.2.
coloursTwo hues. See Colours.
markOptional. The inside of a 20 by 20 SVG for the header and favicon.
heroThe headline, the lead paragraph, and a screenshot or code sample.
sectionsThe landing page bands. See Sections.
questionsThe questions at the bottom of the landing page.
navOptional. Extra header links after Docs, such as a second tool's docs group.
authorOptional. Who made it, as { label, href }, linked at the end of the footer.

Text fields take inline Markdown: code, bold, and links. A link that starts with / is a path on this site.

Colours

colours: { tint: 255, accent: 75 },

Both are hues on the oklch colour wheel, from 0 to 360. Roughly: 25 red, 75 amber, 150 green, 200 teal, 255 blue, 300 violet.

  • tint nudges every grey on the page toward a hue. The greys stay grey. They just feel warm or cool.
  • accent is the one colour with jobs: the text caret, selection, search highlights, the status dot and one syntax colour. It appears nowhere else.

Focus rings get their own hue, picked to stay clear of the accent. Light and dark palettes, shadows, the browser's theme colour and the favicon all follow from these two numbers.

Sections

Each section is a band on the landing page: copy on the left, and something to look at on the right.

{
  eyebrow: 'Jump',
  title: 'Enter takes you there.',
  body: 'Two or three sentences. Inline `code` and [links](/docs/commands) work.',
  link: { label: 'Commands', href: '/docs/commands' },
  // then at most one of these
  items: [{ name: 'enter', text: 'Jump to the pane' }],
  code: '# a comment\nmytool run --json',
  image: { src: '/jump.webp', alt: 'The pane after a jump', width: 1600, height: 1000 }
}

Leave all three out and the copy stands alone. Images go in static/. Give them width and height, the image's real pixel size, so the page doesn't jump while they load. WebP keeps them small: cwebp -q 82 shot.png -o shot.webp.

The hero

Show the tool working. Use image for a screenshot in static/, or code for a short terminal session. In a terminal sample the first word of each command is coloured as the program, and lines starting with # are comments.

For a live demo, add src/custom/Hero.svelte. See Custom hero and styles.