Readability pass across all four areas of the stack. Comments explain why rather than what, concentrated at the points where behaviour is non-obvious: concurrency, caching, auth, scraping and nginx templating. Backend: doc comments on every exported declaration across handlers, services, models and resolvers. Resolver commentary lives inside function bodies so gqlgen does not strip it on regeneration; schema files use # comments rather than description blocks so introspection output is unchanged. Extracted the duplicated auth-cookie blocks into helpers. Frontend: header comments on every component, store and view, including STATUS: notes marking which of the parallel/legacy views are still live. Documented the non-reactive animation-state pattern, the homeData hub and the WebSocket stale-socket guard. Removed a few dead imports and named the reconnect-backoff and poll-interval constants. Python: module and function docstrings covering the Travelodge scraping contract, the deadline threading, the two-executor concurrency and the NDJSON streaming protocol. Infra: header blocks on every compose file, nginx template, Dockerfile and entrypoint, covering the config selection, envsubst allow-lists, rate-limit semantics and volume persistence. Hoisted the duplicated envsubst variable list in nginx/entrypoint.sh. New: backend/README.md, python/README.md, DEPLOYMENT.md, .env.example, backend/graph/doc.go. Refreshed vue/README.md. Corrected CLAUDE.md, which stated a 24h access token where main.go sets 7 days. No behaviour change. go build/vet, vite build, py_compile and docker compose config all pass. Co-Authored-By: Claude Opus 5 <[email protected]>
100 lines
3.4 KiB
Plaintext
100 lines
3.4 KiB
Plaintext
// =============================================================================
|
|
// quartz.config.ts.template — Quartz site config, rendered to quartz.config.ts
|
|
// by quartz/entrypoint.sh at container start.
|
|
//
|
|
// ONLY the DOMAIN placeholder is substituted (envsubst is given a one-name allow-list), so
|
|
// every other dollar sign and backtick-template-looking construct in this
|
|
// TypeScript file survives untouched. That restriction is deliberate: a bare
|
|
// envsubst over a .ts file would corrupt it.
|
|
//
|
|
// baseUrl must keep pointing at www.<DOMAIN>/notes — it has to match the path nginx
|
|
// proxies (/notes/) or every internal link, the sitemap and the RSS feed point
|
|
// at the wrong place.
|
|
//
|
|
// enableSPA / enablePopovers are off because this site is embedded under a
|
|
// path inside another SPA; Quartz's own client-side router would fight with it.
|
|
//
|
|
// ignorePatterns keeps "private", "templates" and ".obsidian" out of the build
|
|
// — the vault is mounted whole, so this list is the only thing stopping
|
|
// private notes being published. Check it before adding vault folders.
|
|
//
|
|
// This file is committed with real content (no secrets). quartz.layout.ts sits
|
|
// alongside it and is COPY'd in by quartz/Dockerfile without templating.
|
|
// =============================================================================
|
|
import { QuartzConfig } from "./quartz/cfg"
|
|
import * as Plugin from "./quartz/plugins"
|
|
|
|
const config: QuartzConfig = {
|
|
configuration: {
|
|
pageTitle: "Notes",
|
|
pageTitleSuffix: "",
|
|
enableSPA: false,
|
|
enablePopovers: false,
|
|
analytics: null,
|
|
locale: "en-GB",
|
|
baseUrl: "www.${DOMAIN}/notes",
|
|
ignorePatterns: ["private", "templates", ".obsidian"],
|
|
defaultDateType: "modified",
|
|
theme: {
|
|
fontOrigin: "googleFonts",
|
|
cdnCaching: true,
|
|
typography: {
|
|
header: "Schibsted Grotesk",
|
|
body: "Source Sans Pro",
|
|
code: "IBM Plex Mono",
|
|
},
|
|
colors: {
|
|
lightMode: {
|
|
light: "#faf8f8",
|
|
lightgray: "#e5e5e5",
|
|
gray: "#b8b8b8",
|
|
darkgray: "#4e4e4e",
|
|
dark: "#2b2b2b",
|
|
secondary: "#284b63",
|
|
tertiary: "#84a98c",
|
|
highlight: "rgba(143, 159, 169, 0.15)",
|
|
textHighlight: "#fff23688",
|
|
},
|
|
darkMode: {
|
|
light: "#161618",
|
|
lightgray: "#393639",
|
|
gray: "#646464",
|
|
darkgray: "#d4d4d4",
|
|
dark: "#ebebec",
|
|
secondary: "#7b97aa",
|
|
tertiary: "#84a98c",
|
|
highlight: "rgba(143, 159, 169, 0.15)",
|
|
textHighlight: "#b3aa0288",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
transformers: [
|
|
Plugin.FrontMatter(),
|
|
Plugin.CreatedModifiedDate({ priority: ["frontmatter", "filesystem"] }),
|
|
Plugin.SyntaxHighlighting(),
|
|
Plugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false }),
|
|
Plugin.GitHubFlavoredMarkdown(),
|
|
Plugin.TableOfContents(),
|
|
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
|
|
Plugin.Description(),
|
|
Plugin.Latex({ renderEngine: "katex" }),
|
|
],
|
|
filters: [Plugin.RemoveDrafts()],
|
|
emitters: [
|
|
Plugin.AliasRedirects(),
|
|
Plugin.ComponentResources(),
|
|
Plugin.ContentPage(),
|
|
Plugin.FolderPage(),
|
|
Plugin.TagPage(),
|
|
Plugin.ContentIndex({ enableSiteMap: true, enableRSS: true }),
|
|
Plugin.Assets(),
|
|
Plugin.Static(),
|
|
Plugin.NotFoundPage(),
|
|
],
|
|
},
|
|
}
|
|
|
|
export default config
|