Every name

In your terminal ssqch docs

Every name ssqch docs knows, 93 of them, with its one line from where it's defined (ssqch.d.ts, the command line, the template functions) and the page that explains it. In a project with ssqch installed, ssqch docs <name> answers for the version you have.

Commands

  • ssqch build: Build the site (default). See The build.
  • ssqch serve: Build, serve, watch for changes and live-reload the browser (--built serves the last build as it is). See Configuring a site.
  • ssqch new: Create a page from a blueprint (a file in _blueprints/), with its title and date filled in. See Starting a new page.
  • ssqch trace: Follow a page's tracks: where it comes from, and which level of the data cascade set each value. See Reading the build summary.
  • ssqch completions: Print a completion script for your shell, so Tab finishes commands and options. See Gear up: install.
  • ssqch diff: Compare two builds of a site: URLs added and removed, and what changed on each page. See Has the stump moved? Comparing two builds.
  • ssqch footprint: Show how much a build weighs: its files by kind, and the heaviest pages and files. See A build's footprint.
  • ssqch patrol: Check a build for what agents and crawlers read: robots.txt, the sitemap, llms.txt, Markdown copies, headings and descriptions. See What patrol checks.
  • ssqch init: Create a starter site (a blog, or a docs site with --starter docs). See The build.
  • ssqch types: Write ssqch.d.ts, the types editors use for ssqch.config.js. See Content schemas.
  • ssqch scout: Scout a site built with another generator: what moving it to ssqch takes, with file and line, and what's left during a move. See Scouting a site.
  • ssqch baseline: Build the site in fresh copies with the clock pinned, and compare the builds: that an ssqch build repeats, or, before a move, what to compare ssqch's with. See Reference builds.
  • ssqch capabilities: Say what this binary supports: template languages, modules, config options and optional features. See Scripts and coding agents.
  • ssqch docs: Read the documentation for this version: a command, config option, function or topic. See A big site's llms.txt.

Config options

  • dirs: Folders. See What a hook and a transform get.
  • templateFormats: File extensions to render. See Configuring a site.
  • markdownEngine: The engine that runs over .md files first: "jinja" (the default), "edge", "liquid", "njk", "hbs", "ejs", or false for none. See Math with KaTeX or MathJax.
  • htmlEngine: The engine that runs over .html files first. See Configuring a site.
  • markdown: Heading IDs, footnotes and the other Markdown extensions. See Markdown.
  • deepMerge: Merge objects and concatenate arrays through the data cascade. See Configuring a site.
  • leaveNoTrace: Delete output files an earlier build wrote or copied that this one didn't (a deleted post's page, a picture imagePlugin() encoded that no page uses now). See Configuring a site.
  • ignore: Globs (relative to the input folder) of files that aren't pages, like ["drafts/**", "notes/*.wip.md"]. See Configuring a site.
  • pageBundles: Page bundles: copy the other files in a folder whose page is index.* (images, downloads) next to the page. See Configuring a site.
  • strict: Printing an undefined value ({{ titel }}) is an error, in every template language. See Configuring a site.
  • jinja: Jinja's settings for .jinja and .j2 templates. See Configuring a site.
  • lastModified: page.lastModified: "git" for the last commit that changed the page's file (its modification time when it has uncommitted changes), or "file" for the modification time. See Following the tracks: where a value comes from.
  • dateFallback: The date of a page with no date of its own (in its data or its file name): "git" for the last commit that changed its file, the same in every checkout, or "file" (the default) for the file's modification time, which is when the checkout wrote it. See Configuring a site.
  • timeZone: The time zone the site's own JavaScript runs in, as an IANA name ("UTC", "America/New_York"): Date's local methods and libraries like luxon and date-fns, in data files, filters, hooks and Edge templates, so a laptop and CI build the same pages. See Configuring a site.
  • urls: A page's URL when it has no permalink: "folders" (the default) writes guide/intro.md as /guide/intro/ (guide/intro/index.html), "html" as /guide/intro.html. See Markdown steps.
  • layoutAliases: Other names for layouts: { post: "layouts/post.njk" } makes layout: post that file (where it would be _includes/post.*). See Configuring a site.
  • base: The path the site is served under, when that isn't the root of its domain: "/repo/" for https://you.github.io/repo/. See Configuring a site.
  • schemas: Content schemas, by name: { posts: { fields: { title: "string", date: "date" } } } checks every page tagged posts. See Configuring a site.
  • theme: A theme under the site: a folder ("themes/docs"), or a git repository pinned to a tag or a commit's full hash ("https://github.com/you/theme#v1.2.0", with #v1.2.0:folder for a theme in a folder of its repository), fetched once and kept in .cache/ssqch/themes/. See Configuring a site.
  • serve: What ssqch serve runs besides the server. See Configuring a site.
  • budgets: Size budgets by kind of file, checked after each build: a file over its kind's budget is an over-budget warning, or with fail: true an error that fails a production build (development builds and ssqch serve still warn). See Configuring a site.
  • data: Data for every template. See Configuring a site.
  • filters: Functions templates can call: {{ slug(title) }}. See Configuring a site.
  • collections: Custom collections, from the pages in collections. See Tags and tag pages.
  • transforms: Run on every output file. See Configuring a site.
  • engines: Template engines of your own, by file extension: a function, or an object with render (a markdown-it instance is one: render(source, env) gets the page's data as env). See Configuring a site.
  • passthrough: Files or folders to copy: a path, or { from: to }, or an array of them. See CSS and JavaScript.
  • watch: More paths for ssqch serve to watch. See Configuring a site.
  • beforeBuild: Run before each build: a function, { run: "command" }, or a list of them. See Configuring a site.
  • afterBuild: Run after each build, with written (the pages it wrote and the files plugins made beside them). See Configuring a site.
  • plugins: More config, from plugins. See Writing a plugin.

Template functions

  • markdown: markdown(text) renders Markdown with the site's options; markdown(text, "inline") without the <p>. See Markdown.
  • toc: toc(page.headings) is a table of contents (or toc(html), from HTML's headings); toc(page.headings, { from: 2, to: 4, ordered: true }) picks the levels, and id, class, sublistClass, itemClass ({level} is the heading's) and linkClass set the markup's. See Markdown.
  • navTree: navTree(nav, page.url) marks a navigation tree's entries current, ancestor or open. See Templates and data.
  • navPager: navPager(nav, page.url) is { previous, next } in reading order. See Templates and data.
  • navBreadcrumbs: navBreadcrumbs(nav, page.url) is the entries from the top down to the page. See Templates and data.
  • pagesTree: pagesTree(collections.docs) builds a navigation tree from pages' nav front matter; pagesTree(collections.all, { root: "Feature" }) (or pagesTree(collections.all, "Feature")) is the tree below one key. See A sidebar from front matter.
  • highlight: highlight(code, lang) is highlighted HTML for inside a <code>, with hl-* classes. See Markdown.
  • readingTime: readingTime(content) is the minutes it takes to read some HTML, at 200 words a minute. See Templates and data.
  • withBase: withBase("/feed.xml") puts the site's base in front of a URL, for places outside HTML attributes. See Serving a site under a path.
  • absoluteUrl: absoluteUrl(page.url, site.url) is a whole address: the URL against the site's, with the site's base in front of a URL from the root that doesn't have it yet. See The gear shed: built-in plugins.
  • slugify: slugify("Pine Cone Crunch!") is pine-cone-crunch: lowercase letters and digits, with a dash for each run of anything else; slugify(title, { separator: "_" }) uses another separator, apostrophes: "separate" splits words at an apostrophe instead of dropping it, ascii: true takes accents off and spells out symbols as the slugify package does (Sjögren & co is sjogren-and-co), and stripTags: true drops HTML tags first. See Templates and data.

From "ssqch"

  • defineConfig: Returns its argument. See Configuring a site.
  • markdown: Render Markdown with the site's markdown options (render hooks and containers are for templates). See Markdown.
  • readData: Read a JSON, YAML or TOML file (from the project root) into data: readData("src/_data/sites/en.yml"). See JavaScript data files.
  • safe: HTML that templates print as it is, in every template language: a filter's answer that's markup, return safe(${text}). See What a filter sees.
  • files: The files a glob matches, from the project root and ignoring case, sorted by path, as data: files("images/albums/v1/*.{jpg,png}"). See JavaScript data files.
  • slugify: The slugify template filter, for data files: slugify("Taco Bake", { separator: "_" }) is "taco_bake". See Templates and data.
  • slugger: A slugify that counts, so every slug it makes is different: the first "Misc Pictures" is misc-pictures, the next misc-pictures-1, then misc-pictures-2. See JavaScript data files.
  • withBase: The withBase template function, for a site's own code (a data file, a filter, computed): a URL from the site's root with the site's base in front, withBase("/provisions/moss-mix/") is "/repo/provisions/moss-mix/" under base: "/repo/", and the URL as it is without one. See Serving a site under a path.
  • absoluteUrl: The absoluteUrl template function, for a site's own code: absoluteUrl("/provisions/moss-mix/", "https://example.com") is "https://example.com/repo/provisions/moss-mix/" under base: "/repo/": the site's base goes in front of a URL from the root that doesn't have it yet, then the URL is resolved against the address, as new URL() does. See The gear shed: built-in plugins.

From "ssqch/image"

  • imagePlugin: Turns every local <img> in HTML output into a <picture>, with AVIF, WebP and fallback sources encoded by sharp. See Quality numbers from 0.7.
  • image: Generate one image's files with the plugin's settings and cache. See Images.
  • imageUrl: The URL (and size and type) of one generated copy of an image, for og:image, JSON-LD and feeds: imageUrl("/content/logo.png", { width: 1200 }). See Images.

From "ssqch/rss"

  • rssPlugin: Adds the filters getNewestCollectionItemDate, dateToRfc3339, dateToRfc822, htmlToAbsoluteUrls and feedHtml. See The gear shed: built-in plugins.
  • feedPlugin: Writes the site's feed (Atom, or RSS) from a collection, newest first, each entry's content as feedHtml makes it: feedPlugin({ url: "https://example.com" }) writes /feed.xml from the posts collection. See The gear shed: built-in plugins.
  • getNewestCollectionItemDate: The newest date in a collection, for a feed's updated. See The gear shed: built-in plugins.
  • dateToRfc3339: A date as RFC 3339 (2024-06-01T00:00:00Z), for Atom feeds. See The gear shed: built-in plugins.
  • dateToRfc822: A date as RFC 822 (Sat, 01 Jun 2024 00:00:00 +0000), for RSS feeds. See The gear shed: built-in plugins.
  • absoluteUrl: A URL made absolute against the site's address: absoluteUrl(post.url, "https://example.com"), with the site's base in front of a URL from the root that doesn't have it yet, as the template function does. See The gear shed: built-in plugins.
  • htmlToAbsoluteUrls: Every link and image in some HTML made absolute, for a feed's content, with the site's base in front of a URL from the root, as absoluteUrl does. See The gear shed: built-in plugins.
  • feedHtml: A post's HTML for a feed: each local image points at one generated copy (width 1200 and the source's format by default), a <picture>'s <source srcset> goes, page-only attributes go, and every URL is made absolute against base, the post's address. See The gear shed: built-in plugins.

From "ssqch/minify"

  • minifyPlugin: Minifies HTML output, after the image transform, with ssqch's own minifier (Rust, as WebAssembly): it doesn't write html-minifier-terser's bytes. See The gear shed: built-in plugins.
  • minify: Minify one string of HTML, with the plugin's options. See The gear shed: built-in plugins.
  • minifyCss: Compress CSS text as style: "compressed" Sass writes it (.a{color:#fff}), for CSS inlined by a template: {{ css | minifyCss }} in a filter of your own. See The gear shed: built-in plugins.

From "ssqch/assets"

  • linksPlugin: Checks every internal link and anchor after each build: in HTML attributes, <meta> URLs, JSON-LD, and feeds and other XML. See The gear shed: built-in plugins.

From "ssqch/sitemap"

From "ssqch/from-vitepress"

  • fromVitepress: VitePress's Markdown, for a site moving from VitePress, and VitePress's ways for vuePlugin()'s components (useData() and the rest from "vitepress", @theme/, and ./x.data imports running its data loaders): Vue's <script> and <style> blocks and <ClientOnly> left out, VitePress's markup for headings (header-anchor), links (.html with urls: "html", external ones in a new tab), code blocks and tables, its tip, info, warning, danger, details, raw and code-group containers, [[toc]], and, under the site's own markdown options, its heading ids and email autolinks. See Plugins that come with ssqch.

From "ssqch/from-mkdocs"

  • fromMkdocs: MkDocs' Markdown for a site moving from MkDocs, each a default under the site's own markdown options: Python-Markdown's reading (dialect: "python-markdown": raw HTML blocks to their closing tag, lists at four spaces), its toc's heading ids, !!! note admonitions and === "Tab" tabs as Material writes them, and .md links from the page; and with templates, MkDocs' context for a theme's templates. See Plugins that come with ssqch.

From "ssqch/from-jekyll"

  • fromJekyll: What a Jekyll site's templates and Markdown expect, for a site moving from Jekyll: Jekyll's page and site in templates, and kramdown's Markdown. See Plugins that come with ssqch.

From "ssqch/from-hugo"

  • fromHugo: Hugo's shortcodes for a site moving from Hugo, as a default under the site's own markdown options (shortcodes: "hugo"): a shortcode on a line of its own ({{< note type="tip" >}} to {{< /note >}}, or {{% %}}) is a container rendered by _includes/containers/<name>.*, with its arguments as container.props, and one inside a line of text renders the same template in its place, with container.inline true. See Plugins that come with ssqch.

From "ssqch/vue"

  • vuePlugin: Renders the Vue components a page uses (<ApiIndex />, imported in its <script setup>) with the site's own Vite, @vitejs/plugin-vue and Vue, at build time; with hydrate, as islands in the browser too. See The gear shed: built-in plugins.

From "ssqch/react"

  • reactPlugin: Renders the React components a page uses (<Counter start={3} />, imported in the page as MDX does or named in components) with the site's own React, react-dom and esbuild, at build time; with hydrate, as islands in the browser too. See React components.

From "ssqch/llms"

  • llmsPlugin: Writes /llms.txt (the site's pages, with links to their Markdown), a Markdown copy of each, and /llms-full.txt, for language models, as llmstxt.org describes; and adds the template functions markdownCopy(page.url), the URL of a page's copy (or "" when it has none), for a layout's <link rel="alternate" type="text/markdown">, and llmsTxt(page.url), the llms.txt that covers the page, for its <link rel="describedby">. See The gear shed: built-in plugins.

From "ssqch/robots"

  • robotsPlugin: Writes /robots.txt: the paths no crawler reads, a group for each kind of AI crawler that's turned off, and the sitemap's address. See The gear shed: built-in plugins.

From "ssqch/elements"

  • elementsPlugin: Custom elements: like-button.js in the elements folder loads on the pages that have a <like-button>, and nowhere else. See The gear shed: built-in plugins.

From "ssqch/redirects"

From "ssqch/sass"

  • sassPlugin: Compiles Sass at the start of each build, with grass (Rust, as WebAssembly: no Dart Sass), so fingerprinting and the link checker see the CSS. See The gear shed: built-in plugins.