ssqch 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/README.md +6 -4
  2. package/bin/ssqch.js +14 -48
  3. package/bundled/README.md +1247 -0
  4. package/bundled/completions/bash +840 -0
  5. package/bundled/completions/elvish +286 -0
  6. package/bundled/completions/fish +182 -0
  7. package/bundled/completions/powershell +318 -0
  8. package/bundled/completions/zsh +510 -0
  9. package/bundled/ssqch.d.ts +532 -0
  10. package/bundled/starter/engines/index.edge +11 -0
  11. package/bundled/starter/engines/index.ejs +11 -0
  12. package/bundled/starter/engines/index.hbs +11 -0
  13. package/bundled/starter/engines/index.liquid +11 -0
  14. package/bundled/starter/engines/layout.edge +35 -0
  15. package/bundled/starter/engines/layout.ejs +35 -0
  16. package/bundled/starter/engines/layout.hbs +35 -0
  17. package/bundled/starter/engines/layout.liquid +35 -0
  18. package/bundled/starter/gitignore +3 -0
  19. package/bundled/starter/jsconfig.json +11 -0
  20. package/bundled/starter/src/404.md +8 -0
  21. package/bundled/starter/src/_blueprints/posts.md +5 -0
  22. package/bundled/starter/src/_data/site.json +4 -0
  23. package/bundled/starter/src/_includes/layout.jinja +35 -0
  24. package/bundled/starter/src/index.jinja +11 -0
  25. package/bundled/starter/src/posts/i-know-what-i-saw.md +11 -0
  26. package/bundled/starter/src/posts/posts.json +4 -0
  27. package/bundled/starter/src/posts/raiders-of-the-lost-path.md +27 -0
  28. package/bundled/starter/src/posts/the-cache-of-the-wild.md +26 -0
  29. package/bundled/starter/src/posts/the-stump-has-moved.md +15 -0
  30. package/bundled/starter/src/posts/upon-further-review-a-stump.md +18 -0
  31. package/bundled/starter/ssqch.config.js +29 -0
  32. package/bundled/starter-docs/engines/edge/base.edge +41 -0
  33. package/bundled/starter-docs/engines/edge/containers/details.edge +5 -0
  34. package/bundled/starter-docs/engines/edge/containers/tab.edge +4 -0
  35. package/bundled/starter-docs/engines/edge/containers/tabs.edge +5 -0
  36. package/bundled/starter-docs/engines/edge/doc.edge +59 -0
  37. package/bundled/starter-docs/engines/edge/hooks/heading.edge +2 -0
  38. package/bundled/starter-docs/engines/ejs/base.ejs +41 -0
  39. package/bundled/starter-docs/engines/ejs/containers/details.ejs +5 -0
  40. package/bundled/starter-docs/engines/ejs/containers/tab.ejs +4 -0
  41. package/bundled/starter-docs/engines/ejs/containers/tabs.ejs +5 -0
  42. package/bundled/starter-docs/engines/ejs/doc.ejs +59 -0
  43. package/bundled/starter-docs/engines/ejs/hooks/heading.ejs +2 -0
  44. package/bundled/starter-docs/engines/hbs/base.hbs +41 -0
  45. package/bundled/starter-docs/engines/hbs/containers/details.hbs +5 -0
  46. package/bundled/starter-docs/engines/hbs/containers/tab.hbs +4 -0
  47. package/bundled/starter-docs/engines/hbs/containers/tabs.hbs +5 -0
  48. package/bundled/starter-docs/engines/hbs/doc.hbs +58 -0
  49. package/bundled/starter-docs/engines/hbs/hooks/heading.hbs +2 -0
  50. package/bundled/starter-docs/engines/liquid/base.liquid +41 -0
  51. package/bundled/starter-docs/engines/liquid/containers/details.liquid +5 -0
  52. package/bundled/starter-docs/engines/liquid/containers/tab.liquid +4 -0
  53. package/bundled/starter-docs/engines/liquid/containers/tabs.liquid +5 -0
  54. package/bundled/starter-docs/engines/liquid/doc.liquid +60 -0
  55. package/bundled/starter-docs/engines/liquid/hooks/heading.liquid +2 -0
  56. package/bundled/starter-docs/gitignore +4 -0
  57. package/bundled/starter-docs/src/404.md +12 -0
  58. package/bundled/starter-docs/src/_blueprints/docs.md +5 -0
  59. package/bundled/starter-docs/src/_data/nav.yml +10 -0
  60. package/bundled/starter-docs/src/_data/site.json +5 -0
  61. package/bundled/starter-docs/src/_includes/base.jinja +41 -0
  62. package/bundled/starter-docs/src/_includes/containers/details.jinja +5 -0
  63. package/bundled/starter-docs/src/_includes/containers/tab.jinja +4 -0
  64. package/bundled/starter-docs/src/_includes/containers/tabs.jinja +5 -0
  65. package/bundled/starter-docs/src/_includes/doc.jinja +59 -0
  66. package/bundled/starter-docs/src/_includes/hooks/heading.jinja +2 -0
  67. package/bundled/starter-docs/src/assets/docs.css +257 -0
  68. package/bundled/starter-docs/src/assets/docs.js +67 -0
  69. package/bundled/starter-docs/src/docs/docs.json +1 -0
  70. package/bundled/starter-docs/src/docs/guides/deploying.md +77 -0
  71. package/bundled/starter-docs/src/docs/guides/writing.md +65 -0
  72. package/bundled/starter-docs/src/docs/index.md +29 -0
  73. package/bundled/starter-docs/src/docs/install.md +42 -0
  74. package/bundled/starter-docs/src/index.md +13 -0
  75. package/bundled/starter-docs/ssqch.config.js +40 -0
  76. package/bundled/trailheads/from-component-frameworks.md +116 -0
  77. package/bundled/trailheads/from-docusaurus.md +55 -0
  78. package/bundled/trailheads/from-eleventy.md +140 -0
  79. package/bundled/trailheads/from-hexo.md +92 -0
  80. package/bundled/trailheads/from-mkdocs.md +45 -0
  81. package/bundled/trailheads/from-zola.md +71 -0
  82. package/lib/assets.js +235 -3
  83. package/lib/chunk-37KSIVNY.js +29 -0
  84. package/lib/chunk-3GYLOC6Y.js +1017 -0
  85. package/lib/chunk-3NYSSA2C.js +22 -0
  86. package/lib/chunk-3PHCFZEU.js +209 -0
  87. package/lib/chunk-4Q6WMTER.js +32 -0
  88. package/lib/chunk-6XYSFG6V.js +4423 -0
  89. package/lib/chunk-6XYSFG6V.js.LEGAL.txt +41 -0
  90. package/lib/chunk-AD3HAW3W.js +10 -0
  91. package/lib/chunk-AMBFWPZ4.js +118 -0
  92. package/lib/chunk-BOBPVAX2.js +37088 -0
  93. package/lib/chunk-BOBPVAX2.js.LEGAL.txt +27 -0
  94. package/lib/chunk-BRK4MXXO.js +565 -0
  95. package/lib/chunk-C35KIPAR.js +247 -0
  96. package/lib/chunk-CDEPYU7W.js +25 -0
  97. package/lib/chunk-CMUWRPSQ.js +113 -0
  98. package/lib/chunk-DDV6JEC2.js +46 -0
  99. package/lib/chunk-DHHQKW4F.js +71 -0
  100. package/lib/chunk-EIT4ZDT4.js +1485 -0
  101. package/lib/chunk-EZZUUPI4.js +20 -0
  102. package/lib/chunk-F65YUXZ7.js +334 -0
  103. package/lib/chunk-FVZ5JBRI.js +115 -0
  104. package/lib/chunk-FYGE634X.js +44 -0
  105. package/lib/chunk-GOE4ZSAB.js +75 -0
  106. package/lib/chunk-GSKVRAHF.js +44 -0
  107. package/lib/chunk-HR2RU2LY.js +999 -0
  108. package/lib/chunk-HXCLCXRT.js +20 -0
  109. package/lib/chunk-I3PS26CI.js +48 -0
  110. package/lib/chunk-IAFM5ITE.js +11 -0
  111. package/lib/chunk-IRHRK7XB.js +54 -0
  112. package/lib/chunk-JRT7TQQP.js +57 -0
  113. package/lib/chunk-JSPSMIJ2.js +217 -0
  114. package/lib/chunk-KBGE5MCY.js +175 -0
  115. package/lib/chunk-N5QTGQ5N.js +207 -0
  116. package/lib/chunk-NKXEPHRZ.js +136 -0
  117. package/lib/chunk-NUKCUDC4.js +146 -0
  118. package/lib/chunk-RI2L3VGO.js +376 -0
  119. package/lib/chunk-TDGBQNGW.js +251 -0
  120. package/lib/chunk-TN6EEDX2.js +3935 -0
  121. package/lib/chunk-TWCVHOKO.js +1229 -0
  122. package/lib/chunk-UGEGUUBT.js +29 -0
  123. package/lib/chunk-UU43WIZG.js +29 -0
  124. package/lib/chunk-VJWQSYEG.js +119 -0
  125. package/lib/chunk-VVPZ5PDP.js +160 -0
  126. package/lib/chunk-WMOVCQO6.js +1287 -0
  127. package/lib/chunk-WP3RPVUM.js +211 -0
  128. package/lib/chunk-YSH2NMIE.js +502 -0
  129. package/lib/cli.js +540 -0
  130. package/lib/elements.js +180 -3
  131. package/lib/image.js +27 -3
  132. package/lib/links.js +464 -3
  133. package/lib/minify.js +69 -3
  134. package/lib/redirects.js +152 -3
  135. package/lib/rss.js +139 -3
  136. package/lib/sass.js +221 -3
  137. package/lib/sitemap.js +88 -3
  138. package/lib/ssqch.js +28 -0
  139. package/package.json +83 -80
  140. package/src/serve/live.js +174 -0
  141. package/src/serve/not-found.html +31 -0
  142. package/types/globals.d.ts +3 -2
  143. package/types/image.d.ts +7 -3
  144. package/types/index.d.ts +18 -5
  145. package/types/links.d.ts +1 -1
  146. package/types/minify.d.ts +1 -1
  147. package/types/rss.d.ts +1 -1
  148. package/types/sass.d.ts +1 -1
  149. package/wasm/markdown.wasm +0 -0
  150. package/wasm/minify.wasm +0 -0
  151. package/wasm/sass.wasm +0 -0
  152. package/lib/index.js +0 -3
  153. package/platforms.json +0 -6
@@ -0,0 +1,35 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{{#if title}}{{title}} | {{/if}}{{site.title}}</title>
7
+ <meta name="description" content="{{#if description}}{{description}}{{else}}{{site.description}}{{/if}}">
8
+ <style>
9
+ /* Ranger Station '76: soft white (or green charcoal in dark mode), neutral text, pine
10
+ headings, burnt orange links, and a four-color stripe under the header. */
11
+ :root { color-scheme: light dark; --page: #fafaf7; --text: #29332c; --heading: #233b2b; --muted: #5e6a61; --link: #a23e20; --rule: #dcddd4; --stripe-pine: #233b2b; }
12
+ @media (prefers-color-scheme: dark) { :root { --page: #1b201d; --text: #e5e9e1; --heading: #d6e4c8; --muted: #a2aca3; --link: #f0a17d; --rule: #3a413b; --stripe-pine: #2e5a3c; } }
13
+ body { font-family: system-ui, sans-serif; line-height: 1.6; max-width: 40rem; margin: 2rem auto; padding: 0 1rem; color: var(--text); background: var(--page); }
14
+ h1, h2, h3 { color: var(--heading); }
15
+ a { color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; }
16
+ header { padding-bottom: 0.75rem; border-bottom: 5px solid; border-image: linear-gradient(to right, var(--stripe-pine) 0 25%, #a23e20 25% 50%, #e8af43 50% 75%, #a9b66a 75%) 1; }
17
+ header a { color: var(--heading); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
18
+ footer { margin-top: 3rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
19
+ img { max-width: 100%; height: auto; }
20
+ :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
21
+ </style>
22
+ </head>
23
+ <body>
24
+ <header><a href="/">{{site.title}}</a></header>
25
+ <main>
26
+ {{#if title}}
27
+ <h1>{{title}}</h1>
28
+ {{/if}}
29
+ {{{content}}}
30
+ </main>
31
+ <footer>
32
+ <p>Built with SiteSquatch {{ssqch.version}}. Allegedly.</p>
33
+ </footer>
34
+ </body>
35
+ </html>
@@ -0,0 +1,35 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{% if title %}{{ title }} | {% endif %}{{ site.title }}</title>
7
+ <meta name="description" content="{{ description | default: site.description }}">
8
+ <style>
9
+ /* Ranger Station '76: soft white (or green charcoal in dark mode), neutral text, pine
10
+ headings, burnt orange links, and a four-color stripe under the header. */
11
+ :root { color-scheme: light dark; --page: #fafaf7; --text: #29332c; --heading: #233b2b; --muted: #5e6a61; --link: #a23e20; --rule: #dcddd4; --stripe-pine: #233b2b; }
12
+ @media (prefers-color-scheme: dark) { :root { --page: #1b201d; --text: #e5e9e1; --heading: #d6e4c8; --muted: #a2aca3; --link: #f0a17d; --rule: #3a413b; --stripe-pine: #2e5a3c; } }
13
+ body { font-family: system-ui, sans-serif; line-height: 1.6; max-width: 40rem; margin: 2rem auto; padding: 0 1rem; color: var(--text); background: var(--page); }
14
+ h1, h2, h3 { color: var(--heading); }
15
+ a { color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; }
16
+ header { padding-bottom: 0.75rem; border-bottom: 5px solid; border-image: linear-gradient(to right, var(--stripe-pine) 0 25%, #a23e20 25% 50%, #e8af43 50% 75%, #a9b66a 75%) 1; }
17
+ header a { color: var(--heading); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
18
+ footer { margin-top: 3rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
19
+ img { max-width: 100%; height: auto; }
20
+ :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
21
+ </style>
22
+ </head>
23
+ <body>
24
+ <header><a href="/">{{ site.title }}</a></header>
25
+ <main>
26
+ {% if title %}
27
+ <h1>{{ title }}</h1>
28
+ {% endif %}
29
+ {{ content }}
30
+ </main>
31
+ <footer>
32
+ <p>Built with SiteSquatch {{ ssqch.version }}. Allegedly.</p>
33
+ </footer>
34
+ </body>
35
+ </html>
@@ -0,0 +1,3 @@
1
+ dist/
2
+ dist-before/
3
+ .cache/
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "checkJs": true,
5
+ "noEmit": true,
6
+ "module": "esnext",
7
+ "moduleResolution": "bundler",
8
+ "target": "es2022"
9
+ },
10
+ "include": ["ssqch.config.js", "ssqch.d.ts", "src/**/*.js"]
11
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: Page not found
3
+ layout: layout.jinja
4
+ permalink: /404.html
5
+ ---
6
+ We have several eyewitness accounts of this page, but no page.
7
+
8
+ [Back to the trailhead](/)
@@ -0,0 +1,5 @@
1
+ ---
2
+ title:
3
+ date:
4
+ ---
5
+ Write down what you saw.
@@ -0,0 +1,4 @@
1
+ {
2
+ "title": "Field Notes",
3
+ "description": "An amateur investigation, with corrections. Built with SiteSquatch."
4
+ }
@@ -0,0 +1,35 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{% if title %}{{ title }} | {% endif %}{{ site.title }}</title>
7
+ <meta name="description" content="{{ description or site.description }}">
8
+ <style>
9
+ /* Ranger Station '76: soft white (or green charcoal in dark mode), neutral text, pine
10
+ headings, burnt orange links, and a four-color stripe under the header. */
11
+ :root { color-scheme: light dark; --page: #fafaf7; --text: #29332c; --heading: #233b2b; --muted: #5e6a61; --link: #a23e20; --rule: #dcddd4; --stripe-pine: #233b2b; }
12
+ @media (prefers-color-scheme: dark) { :root { --page: #1b201d; --text: #e5e9e1; --heading: #d6e4c8; --muted: #a2aca3; --link: #f0a17d; --rule: #3a413b; --stripe-pine: #2e5a3c; } }
13
+ body { font-family: system-ui, sans-serif; line-height: 1.6; max-width: 40rem; margin: 2rem auto; padding: 0 1rem; color: var(--text); background: var(--page); }
14
+ h1, h2, h3 { color: var(--heading); }
15
+ a { color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; }
16
+ header { padding-bottom: 0.75rem; border-bottom: 5px solid; border-image: linear-gradient(to right, var(--stripe-pine) 0 25%, #a23e20 25% 50%, #e8af43 50% 75%, #a9b66a 75%) 1; }
17
+ header a { color: var(--heading); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
18
+ footer { margin-top: 3rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
19
+ img { max-width: 100%; height: auto; }
20
+ :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
21
+ </style>
22
+ </head>
23
+ <body>
24
+ <header><a href="/">{{ site.title }}</a></header>
25
+ <main>
26
+ {% if title %}
27
+ <h1>{{ title }}</h1>
28
+ {% endif %}
29
+ {{ content }}
30
+ </main>
31
+ <footer>
32
+ <p>Built with SiteSquatch {{ ssqch.version }}. Allegedly.</p>
33
+ </footer>
34
+ </body>
35
+ </html>
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: layout.jinja
3
+ ---
4
+ <p>{{ site.description }}</p>
5
+
6
+ <h2>Posts</h2>
7
+ <ul>
8
+ {% for post in collections.newestPosts %}
9
+ <li><a href="{{ post.url }}">{{ post.data.title }}</a> ({{ readableDate(post.date) }})</li>
10
+ {% endfor %}
11
+ </ul>
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: I Know What I Saw
3
+ date: 2026-01-01
4
+ ---
5
+ It was tall, it was in a hurry, and it was gone before I found my camera. I'm writing it down
6
+ anyway. This is the first entry in my field notes.
7
+
8
+ It's also your first post. Every Markdown file in `src/posts/` is a post: `posts.json` gives
9
+ them all the layout and the `posts` tag, so they show up on the home page, newest first.
10
+
11
+ Edit this file while `ssqch serve` is running, and the page reloads by itself.
@@ -0,0 +1,4 @@
1
+ {
2
+ "layout": "layout.jinja",
3
+ "tags": "posts"
4
+ }
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: Raiders of the Lost Path
3
+ date: 2026-01-22
4
+ description: An old map, a renamed heading, and the build that caught it.
5
+ ---
6
+ A ranger came by with an old map of these notes. It pointed to a heading called "The tracks".
7
+ I had renamed it "Where they lead" the week before. The ranger was not pleased, and neither
8
+ was the build.
9
+
10
+ ## What the build said
11
+
12
+ The link checker (`linksPlugin()` in `ssqch.config.js`) follows every link inside the site
13
+ after a production build. A link to a page that isn't there, or to a heading that isn't on it,
14
+ fails the build and says where:
15
+
16
+ ```text
17
+ error: after_build hook failed: the trail goes cold on 1 broken link:
18
+ /posts/i-know-what-i-saw/ -> /posts/the-stump-has-moved/#the-tracks (no id "the-tracks" on that page)
19
+ ```
20
+
21
+ ## The correction
22
+
23
+ A heading's id comes from its text, so renaming a heading moves its address. Point the link at
24
+ the new one, `#where-they-lead`, or keep the old heading. In `ssqch serve` it's a warning, so
25
+ you can keep writing while you look for it.
26
+
27
+ This link works, for comparison: [back to what the build said](#what-the-build-said).
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: The Cache of the Wild
3
+ date: 2026-01-29
4
+ description: A raccoon, the trail conditions, and a copy for when the network is down.
5
+ ---
6
+ The raccoon keeps a dated copy of the trail conditions. He checks the ranger station once a
7
+ day, and the rest of the time he reads you his copy. When the station doesn't answer, he reads
8
+ you his copy anyway and mentions how old it is.
9
+
10
+ A data file that asks a server for something can do the same. Save this as
11
+ `src/_data/conditions.js`, and every page has `conditions`:
12
+
13
+ ```js
14
+ export default async function () {
15
+ // Asked once a day; until then, the saved copy in .cache/ssqch/fetch/.
16
+ const response = await fetch("https://api.example.com/trails/cedar", { cache: "1d" });
17
+ return response.json();
18
+ }
19
+ ```
20
+
21
+ - While `ssqch serve` rebuilds on every save, the server is asked once a day, not once a save.
22
+ - When the server is down and there's a copy, the build uses it and says how old it is.
23
+ - `ssqch build --offline` uses only the saved copies, whatever their age, so a build on a plane
24
+ never touches the network.
25
+
26
+ The raccoon has never been on a plane. He has opinions about the Old Growth trail.
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: The Stump Has Moved
3
+ date: 2026-01-15
4
+ ---
5
+ I went back a third time. The stump is gone. There are tracks.
6
+
7
+ More as it develops. To start an entry of your own:
8
+
9
+ ```sh
10
+ ssqch new posts --title "My second sighting"
11
+ ```
12
+
13
+ It copies `src/_blueprints/posts.md` and fills in the title and today's date. Add
14
+ `draft: true` to a post's front matter to keep it out of production builds until you're sure
15
+ of what you saw.
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: Upon Further Review, a Stump
3
+ date: 2026-01-08
4
+ description: A correction to the previous entry.
5
+ ---
6
+ I went back in daylight. It was a stump. A tall one, to be fair to me.
7
+
8
+ The `description` in this post's front matter is the page's meta description; posts without
9
+ one get the site's, from `src/_data/site.json`.
10
+
11
+ I didn't take a picture, since it was a stump. When you have one worth showing, save it as
12
+ `src/img/stump.jpg` and write `![The stump](/img/stump.jpg)`. The build turns it into a
13
+ `<picture>` in three sizes, so it stays sharp on any screen. Whether it was sharp to begin
14
+ with is between you and your camera.
15
+
16
+ A raccoon who keeps everything told me the trick for deploying: keep `dist/img/` and
17
+ `.cache/` between builds, and the build never encodes the same picture twice. Raccoon's cache.
18
+ Raccoon did not see anything tall.
@@ -0,0 +1,29 @@
1
+ // The site's config. `ssqch build` builds it into dist/, and `ssqch serve`
2
+ // serves it with live reload. ssqch.d.ts gives your editor the types.
3
+ import { defineConfig } from "ssqch";
4
+ import { imagePlugin } from "ssqch/image";
5
+ import { linksPlugin } from "ssqch/links";
6
+ import { minifyPlugin } from "ssqch/minify";
7
+
8
+ export default defineConfig(({ env }) => ({
9
+ dirs: { input: "src", output: "dist" },
10
+ templateFormats: ["jinja", "md"],
11
+
12
+ // Functions templates can call: {{ readableDate(post.date) }}
13
+ filters: {
14
+ readableDate: (date) => new Date(date).toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric", timeZone: "UTC" }),
15
+ },
16
+
17
+ // Newest posts first, for the home page.
18
+ collections: {
19
+ newestPosts: (pages) => [...pages.byTag("posts")].reverse(),
20
+ },
21
+
22
+ plugins: [
23
+ // Every <img> becomes a responsive <picture>.
24
+ imagePlugin({ formats: ["webp", "auto"], widths: [400, 800, 1200] }),
25
+ // Broken internal links fail a production build.
26
+ linksPlugin(),
27
+ env === "production" && minifyPlugin(),
28
+ ],
29
+ }));
@@ -0,0 +1,41 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{{ title ? title + ' | ' : '' }}{{ site.name }}</title>
7
+ <meta name="description" content="{{ description || site.description }}">
8
+ <meta name="generator" content="{{ ssqch.generator }}">
9
+ <link rel="stylesheet" href="/highlight.css">
10
+ <link rel="stylesheet" href="/assets/docs.css">
11
+ @if(search)
12
+ <link rel="stylesheet" href="/pagefind/pagefind-ui.css">
13
+ <script src="/pagefind/pagefind-ui.js" defer></script>
14
+ @end
15
+ <script src="/assets/docs.js" defer></script>
16
+ {{-- Before the page is drawn, so a reader who picked a theme doesn't see the other one first. --}}
17
+ <script>try { const theme = localStorage.getItem("theme"); if (theme) document.documentElement.dataset.theme = theme; } catch {}</script>
18
+ </head>
19
+ <body>
20
+ <a class="skip-link" href="#content">Skip to content</a>
21
+ <header class="site-header">
22
+ <a class="site-name" href="/">{{ site.name }}</a>
23
+ <nav aria-label="Site">
24
+ <a href="/docs/">Docs</a>
25
+ @if(sidebar)
26
+ <a class="menu-link" href="#sidebar">Menu</a>
27
+ @end
28
+ </nav>
29
+ @if(search)
30
+ <div id="search"></div>
31
+ @end
32
+ {{-- docs.js shows it. Without JavaScript, the theme follows the system. --}}
33
+ <button class="theme-switch" type="button" hidden>Switch theme</button>
34
+ </header>
35
+ @if(sidebar)
36
+ {{{ content }}}
37
+ @else
38
+ <main id="content">{{{ content }}}</main>
39
+ @end
40
+ </body>
41
+ </html>
@@ -0,0 +1,5 @@
1
+ {{-- :::details Summary text --}}
2
+ <details>
3
+ <summary>{{ container.args || 'Details' }}</summary>
4
+ {{{ container.content }}}
5
+ </details>
@@ -0,0 +1,4 @@
1
+ <section class="tab" data-label="{{ container.args }}">
2
+ <p class="tab-label">{{ container.args }}</p>
3
+ {{{ container.content }}}
4
+ </section>
@@ -0,0 +1,5 @@
1
+ {{-- ::::tabs around :::tab blocks. Without JavaScript the tabs read as
2
+ labeled sections; assets/docs.js turns the labels into buttons. --}}
3
+ <div class="tabs">
4
+ {{{ container.content }}}
5
+ </div>
@@ -0,0 +1,59 @@
1
+ ---
2
+ layout: base.edge
3
+ sidebar: true
4
+ ---
5
+ <div class="docs">
6
+ <main id="content" data-pagefind-body>
7
+ @let(crumbs = navBreadcrumbs(nav, page.url))
8
+ @if(crumbs.length > 1)
9
+ <nav class="breadcrumbs" aria-label="Breadcrumbs">
10
+ @each(crumb in crumbs.slice(0, -1))
11
+ <span>{{ crumb.title }}</span> ›
12
+ @end
13
+ <span aria-current="page">{{ title }}</span>
14
+ </nav>
15
+ @end
16
+ <h1>{{ title }}</h1>
17
+ {{{ content }}}
18
+
19
+ <footer class="page-footer">
20
+ @if(site.editUrl)
21
+ <p><a href="{{ site.editUrl }}{{ page.inputPath.replace('./', '') }}">Edit this page</a></p>
22
+ @end
23
+ @let(pager = navPager(nav, page.url))
24
+ <nav class="pager" aria-label="Previous and next pages">
25
+ <span>
26
+ @if(pager.previous)
27
+ <a rel="prev" href="{{ pager.previous.url }}">← {{ pager.previous.title }}</a>
28
+ @end
29
+ </span>
30
+ <span>
31
+ @if(pager.next)
32
+ <a rel="next" href="{{ pager.next.url }}">{{ pager.next.title }} →</a>
33
+ @end
34
+ </span>
35
+ </nav>
36
+ </footer>
37
+ </main>
38
+
39
+ @let(contents = toc(page.headings))
40
+ <aside class="toc" aria-label="On this page">
41
+ @if(contents)
42
+ <p class="toc-title">On this page</p>
43
+ {{{ contents }}}
44
+ @end
45
+ </aside>
46
+
47
+ {{-- After the content in the HTML, so a phone (and a screen reader) gets
48
+ the page first. The stylesheet puts it on the left on wide screens. --}}
49
+ <nav class="sidebar" id="sidebar" aria-label="Documentation">
50
+ @each(section in navTree(nav, page.url))
51
+ <h2>{{ section.title }}</h2>
52
+ <ul>
53
+ @each(item in section.pages)
54
+ <li><a href="{{ item.url }}"{{{ item.current ? ' aria-current="page"' : '' }}}>{{ item.title }}</a></li>
55
+ @end
56
+ </ul>
57
+ @end
58
+ </nav>
59
+ </div>
@@ -0,0 +1,2 @@
1
+ {{-- How Markdown headings render: with a link to themselves. --}}
2
+ <h{{ heading.level }} id="{{ heading.id }}">{{{ heading.content }}} <a class="anchor" href="#{{ heading.id }}" aria-hidden="true" tabindex="-1">#</a></h{{ heading.level }}>
@@ -0,0 +1,41 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title><% if (locals.title) { %><%= title %> | <% } %><%= site.name %></title>
7
+ <meta name="description" content="<%= locals.description || site.description %>">
8
+ <meta name="generator" content="<%= ssqch.generator %>">
9
+ <link rel="stylesheet" href="/highlight.css">
10
+ <link rel="stylesheet" href="/assets/docs.css">
11
+ <%_ if (locals.search) { _%>
12
+ <link rel="stylesheet" href="/pagefind/pagefind-ui.css">
13
+ <script src="/pagefind/pagefind-ui.js" defer></script>
14
+ <%_ } _%>
15
+ <script src="/assets/docs.js" defer></script>
16
+ <%_ /* Before the page is drawn, so a reader who picked a theme doesn't see the other one first. */ _%>
17
+ <script>try { const theme = localStorage.getItem("theme"); if (theme) document.documentElement.dataset.theme = theme; } catch {}</script>
18
+ </head>
19
+ <body>
20
+ <a class="skip-link" href="#content">Skip to content</a>
21
+ <header class="site-header">
22
+ <a class="site-name" href="/"><%= site.name %></a>
23
+ <nav aria-label="Site">
24
+ <a href="/docs/">Docs</a>
25
+ <%_ if (locals.sidebar) { _%>
26
+ <a class="menu-link" href="#sidebar">Menu</a>
27
+ <%_ } _%>
28
+ </nav>
29
+ <%_ if (locals.search) { _%>
30
+ <div id="search"></div>
31
+ <%_ } _%>
32
+ <%_ /* docs.js shows it. Without JavaScript, the theme follows the system. */ _%>
33
+ <button class="theme-switch" type="button" hidden>Switch theme</button>
34
+ </header>
35
+ <%_ if (locals.sidebar) { _%>
36
+ <%- content %>
37
+ <%_ } else { _%>
38
+ <main id="content"><%- content %></main>
39
+ <%_ } _%>
40
+ </body>
41
+ </html>
@@ -0,0 +1,5 @@
1
+ <%_ /* :::details Summary text */ _%>
2
+ <details>
3
+ <summary><%= container.args || "Details" %></summary>
4
+ <%- container.content %>
5
+ </details>
@@ -0,0 +1,4 @@
1
+ <section class="tab" data-label="<%= container.args %>">
2
+ <p class="tab-label"><%= container.args %></p>
3
+ <%- container.content %>
4
+ </section>
@@ -0,0 +1,5 @@
1
+ <%_ /* ::::tabs around :::tab blocks. Without JavaScript the tabs read as
2
+ labeled sections; assets/docs.js turns the labels into buttons. */ _%>
3
+ <div class="tabs">
4
+ <%- container.content %>
5
+ </div>
@@ -0,0 +1,59 @@
1
+ ---
2
+ layout: base.jinja
3
+ sidebar: true
4
+ ---
5
+ <div class="docs">
6
+ <main id="content" data-pagefind-body>
7
+ <%_ const crumbs = navBreadcrumbs(nav, page.url); _%>
8
+ <%_ if (crumbs.length > 1) { _%>
9
+ <nav class="breadcrumbs" aria-label="Breadcrumbs">
10
+ <%_ for (const crumb of crumbs.slice(0, -1)) { _%>
11
+ <span><%= crumb.title %></span> ›
12
+ <%_ } _%>
13
+ <span aria-current="page"><%= title %></span>
14
+ </nav>
15
+ <%_ } _%>
16
+ <h1><%= title %></h1>
17
+ <%- content %>
18
+
19
+ <footer class="page-footer">
20
+ <%_ if (site.editUrl) { _%>
21
+ <p><a href="<%= site.editUrl %><%= page.inputPath.replace("./", "") %>">Edit this page</a></p>
22
+ <%_ } _%>
23
+ <%_ const pager = navPager(nav, page.url); _%>
24
+ <nav class="pager" aria-label="Previous and next pages">
25
+ <span>
26
+ <%_ if (pager.previous) { _%>
27
+ <a rel="prev" href="<%= pager.previous.url %>">← <%= pager.previous.title %></a>
28
+ <%_ } _%>
29
+ </span>
30
+ <span>
31
+ <%_ if (pager.next) { _%>
32
+ <a rel="next" href="<%= pager.next.url %>"><%= pager.next.title %> →</a>
33
+ <%_ } _%>
34
+ </span>
35
+ </nav>
36
+ </footer>
37
+ </main>
38
+
39
+ <%_ const contents = toc(page.headings); _%>
40
+ <aside class="toc" aria-label="On this page">
41
+ <%_ if (contents) { _%>
42
+ <p class="toc-title">On this page</p>
43
+ <%- contents %>
44
+ <%_ } _%>
45
+ </aside>
46
+
47
+ <%_ /* After the content in the HTML, so a phone (and a screen reader) gets
48
+ the page first. The stylesheet puts it on the left on wide screens. */ _%>
49
+ <nav class="sidebar" id="sidebar" aria-label="Documentation">
50
+ <%_ for (const section of navTree(nav, page.url)) { _%>
51
+ <h2><%= section.title %></h2>
52
+ <ul>
53
+ <%_ for (const item of section.pages) { _%>
54
+ <li><a href="<%= item.url %>"<% if (item.current) { %> aria-current="page"<% } %>><%= item.title %></a></li>
55
+ <%_ } _%>
56
+ </ul>
57
+ <%_ } _%>
58
+ </nav>
59
+ </div>
@@ -0,0 +1,2 @@
1
+ <%_ /* How Markdown headings render: with a link to themselves. */ _%>
2
+ <h<%= heading.level %> id="<%= heading.id %>"><%- heading.content %> <a class="anchor" href="#<%= heading.id %>" aria-hidden="true" tabindex="-1">#</a></h<%= heading.level %>>
@@ -0,0 +1,41 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{{#if title}}{{title}} | {{/if}}{{site.name}}</title>
7
+ <meta name="description" content="{{#if description}}{{description}}{{else}}{{site.description}}{{/if}}">
8
+ <meta name="generator" content="{{ssqch.generator}}">
9
+ <link rel="stylesheet" href="/highlight.css">
10
+ <link rel="stylesheet" href="/assets/docs.css">
11
+ {{#if search}}
12
+ <link rel="stylesheet" href="/pagefind/pagefind-ui.css">
13
+ <script src="/pagefind/pagefind-ui.js" defer></script>
14
+ {{/if}}
15
+ <script src="/assets/docs.js" defer></script>
16
+ {{!-- Before the page is drawn, so a reader who picked a theme doesn't see the other one first. --}}
17
+ <script>try { const theme = localStorage.getItem("theme"); if (theme) document.documentElement.dataset.theme = theme; } catch {}</script>
18
+ </head>
19
+ <body>
20
+ <a class="skip-link" href="#content">Skip to content</a>
21
+ <header class="site-header">
22
+ <a class="site-name" href="/">{{site.name}}</a>
23
+ <nav aria-label="Site">
24
+ <a href="/docs/">Docs</a>
25
+ {{#if sidebar}}
26
+ <a class="menu-link" href="#sidebar">Menu</a>
27
+ {{/if}}
28
+ </nav>
29
+ {{#if search}}
30
+ <div id="search"></div>
31
+ {{/if}}
32
+ {{!-- docs.js shows it. Without JavaScript, the theme follows the system. --}}
33
+ <button class="theme-switch" type="button" hidden>Switch theme</button>
34
+ </header>
35
+ {{#if sidebar}}
36
+ {{{content}}}
37
+ {{else}}
38
+ <main id="content">{{{content}}}</main>
39
+ {{/if}}
40
+ </body>
41
+ </html>
@@ -0,0 +1,5 @@
1
+ {{!-- :::details Summary text --}}
2
+ <details>
3
+ <summary>{{#if container.args}}{{container.args}}{{else}}Details{{/if}}</summary>
4
+ {{{container.content}}}
5
+ </details>
@@ -0,0 +1,4 @@
1
+ <section class="tab" data-label="{{container.args}}">
2
+ <p class="tab-label">{{container.args}}</p>
3
+ {{{container.content}}}
4
+ </section>
@@ -0,0 +1,5 @@
1
+ {{!-- ::::tabs around :::tab blocks. Without JavaScript the tabs read as
2
+ labeled sections; assets/docs.js turns the labels into buttons. --}}
3
+ <div class="tabs">
4
+ {{{container.content}}}
5
+ </div>