Commit Graph

52 Commits

Author SHA1 Message Date
Timothy DeHerrera
021ffb6a78 docs(plan): add sukr 1.0 API stabilization plan
Three-phase plan to stabilize sukr's public API surfaces before 1.0:

- Phase 1: Replace hand-rolled YAML frontmatter with TOML (+++ delimiters,
  serde Deserialize), normalize template variable naming, add feed/sitemap
  config toggles, template section fallback, remove dead templates
- Phase 2: Draft filtering and alias redirect stub generation
- Phase 3: 404 page support and tag listing page generation

Key decisions: TOML frontmatter (eliminates fragile parser), config.nav
nesting to mirror site.toml structure, flat tags array, date validation
via chrono::NaiveDate.

Ref: .sketches/2026-02-13-api-stabilization.md
2026-02-14 06:24:56 -07:00
Timothy DeHerrera
d51ee8a4a1 docs(charter): add sukr 1.0 stable release charter
Frame the strategic intent for reaching a 1.0 release.

Four workstreams in priority order:
- API Stabilization (feature evaluation + dependency health audit)
- Error Quality (actionable messages, no panics outside main)
- Test Coverage (protect the stabilized surface)
- Distribution (CI/CD, cargo install, nix build, changelog)

Strategic non-goals: plugin system, incremental builds,
additional output formats, dev server, migration tooling.
2026-02-12 13:57:50 -07:00
Timothy DeHerrera
8d213183f5 docs: complete verification and retrospective
Check off all 7 plan verification items with results.
Write retrospective covering what went well (phased approach,
source verification, CHALLENGE decisions), surprises (sketch
false positives, extra Sukr instances, existing Tera link),
process observations (CORE granularity, cross-phase deps,
tech debt tracking), and intentional deferrals (G2, G5,
security.md mixed quadrants).
2026-02-12 13:37:00 -07:00
Timothy DeHerrera
ef173ec092 docs: add cross-references and fix nav ordering
Link feature names in architecture.md to feature docs pages.
Add See Also section to configuration.md with related pages.
Add getting-started prerequisite link to deployment.md. Adjust
page weights for user journey sidebar order: Getting Started
(0) → Deployment (1) → Content Organization (2) → Config (3).
2026-02-12 13:27:23 -07:00
Timothy DeHerrera
44e51cbdb7 docs: restructure README to explanation quadrant
Remove duplicated comparison table, inline config reference,
and content structure diagram from README — link to docs site
instead. Trim themes/README.md to attribution and theme list,
link to syntax-highlighting docs for usage and customization.
2026-02-12 13:24:05 -07:00
Timothy DeHerrera
f357ecd551 docs: add deployment guide
Create deployment.md how-to page covering local preview,
GitHub Pages, Netlify, Cloudflare Pages, and generic static
hosts. Add cross-links from homepage and getting-started
Next Steps. Reference security.md for CSP headers.
2026-02-12 13:20:41 -07:00
Timothy DeHerrera
f40233cb6e docs: add frontmatter defaults and enrich theming
Update Tera link to canonical URL, add authoring syntax
pointer. Add Default column to frontmatter fields table
with source-verified values. Enrich Theme System section
with core CSS variables table and customization pattern.
2026-02-12 13:10:22 -07:00
Timothy DeHerrera
bdf8976378 docs: rewrite homepage and consolidate sections
Rewrite _index.md as explanation-only — remove inline Quick
Start, add Learn More links. Move section discovery explanation
from features/sections.md into content-organization.md. Slim
sections.md to reference-only with cross-reference.
2026-02-12 13:04:07 -07:00
Timothy DeHerrera
73329aff81 docs: normalize terminology and fix metadata
Normalize "Sukr" to "sukr" in architecture.md (4 instances).
Change site.toml title to lowercase. Fix template override
path from page/special.html to content/special.html. Update
copyright year to 2026.
2026-02-12 12:57:07 -07:00
Timothy DeHerrera
ce830767ff docs: fix tutorial path with inline templates
Replace stale `cargo install sukr` with install-from-source.
Replace Step 4 dead-end with inline base.html, page.html,
and content/default.html templates. Add "View your site"
completion step. Improve Next Steps with reading-order context.
2026-02-12 12:45:09 -07:00
Timothy DeHerrera
978ae679ff docs(plan): add documentation overhaul plan
Exhaustive audit of the docs site identified 6 stale content items,
8 structural axiom violations, and 3 content gaps. This plan proposes
a 4-phase approach in dependency order:

Phase 1: Fix stale content (install commands, template paths, terminology)
Phase 2: Structural rework (quadrant discipline, section consolidation)
Phase 3: Fill content gaps (deployment guide, theming section)
Phase 4: README restructure + cross-references

Key decisions:
- Theming added to syntax-highlighting.md (avoids sync with themes/README)
- Deployment guide kept generic (suckless: no platform configs)
- Tutorial templates inlined (scope economy over starter repo)
- CLI and error reference deferred/cut (scope economy)
- sections.md slimmed to reference-only (quadrant split)

Sketch: .sketches/2026-02-11-documentation-improvements.md
2026-02-12 11:10:11 -07:00
Timothy DeHerrera
1e5ed28788 docs: add security documentation with trust model and CSP
Add Security section to README documenting:
- Trust model (untrusted content, trusted binary)
- HTML passthrough implications
- URL escaping behavior

Create docs/content/features/security.md with:
- Detailed trust model table
- Content processing security notes
- CSP header recommendations
- Platform-specific examples (Cloudflare, Netlify, Nginx)

Closes audit recommendations 4 and 5.
2026-02-05 17:22:34 -07:00
Timothy DeHerrera
899f904160 docs(architecture): update module count and tree-house code example
- Fix module count: 12 → 13 (add escape.rs)
- Add escape.rs to module responsibilities table
- Update code example from old HighlightConfiguration API
  to current tree-house LanguageConfig pattern

Reflects tree-house migration and API coherence audit findings.
2026-02-05 15:09:12 -07:00
Timothy DeHerrera
af762d0d1f style: use snazzy syntax hl theme for doc site 2026-02-05 13:06:55 -07:00
Timothy DeHerrera
5ae8ae6e53 feat(themes): add popular themes, remove redundant default
- Delete default.css (redundant with dracula.css)
- Add snazzy, catppuccin_mocha, tokyonight, rose_pine, onedark themes
- Update docs/static/style.css to import dracula.css
- Update themes/README.md and syntax-highlighting.md

Theme collection now contains 10 well-designed options.
2026-02-05 13:04:39 -07:00
Timothy DeHerrera
113b7e4a4c docs(themes): add syntax highlighting documentation and test coverage
- Update syntax-highlighting.md with tree-house integration details
- Add themes/README.md explaining copy-to-project workflow
- Add 13 tests: hierarchical scopes, injections (Nix+bash, MD, HTML)
- All 64 tests passing
2026-02-05 12:38:00 -07:00
Timothy DeHerrera
caf2d506a7 feat(themes): add decoupled CSS theme system with lightningcss bundling
- Add 6 syntax highlighting themes (dracula, gruvbox, nord, github)
- Rewrite css.rs to use lightningcss bundler for @import resolution
- Theme CSS is inlined at build time, producing single bundled output
2026-02-05 12:19:47 -07:00
Timothy DeHerrera
98977136c8 feat(docs): add CSS-only scrollspy for TOC navigation
Use CSS Overflow Level 5 properties (scroll-target-group, :target-current)
to highlight the current section in the sidebar TOC as the user scrolls.

Progressive enhancement: gracefully degrades in unsupported browsers
(Firefox, Safari) — they retain existing hover/click behavior.

Browser support: Chrome 140+, Edge 140+, Opera 124+ (~65% global).
2026-02-04 11:26:49 -07:00
Timothy DeHerrera
7af7fa34e4 docs(architecture): add implementation notes on dependency trade-offs
Document that sukr prioritizes output quality over minimal build-time
weight. Acknowledges KaTeX and mermaid-rs are heavier than alternatives,
leaving door open for future evaluation without committing to redesign.
2026-02-04 11:18:13 -07:00
Timothy DeHerrera
6e0d16d1bb docs: clarify JS-free comparison claims
Rename "Zero JS Output" to "JS-Free Rich Content" with footnote
explaining that all generators can produce JS-free basic HTML—sukr's
distinction is built-in build-time math and diagram rendering.
2026-02-04 11:15:45 -07:00
Timothy DeHerrera
d97aec30f4 docs: add comparison with other SSGs
- Create comparison.md documenting sukr vs Zola/Hugo/Eleventy
- Feature matrix covers highlighting, math, diagrams, JS, binary
- Add condensed comparison table to README
- Link to full comparison page at sukr.io
2026-02-01 14:49:37 -07:00
Timothy DeHerrera
5ab8198ddf docs: add architecture documentation
Explains sukr's internal design:
- Pipeline overview with Mermaid flowchart
- Module responsibilities table
- Event-based interception pattern
- Zero-JS philosophy rationale
- Static configuration and single-pass discovery patterns
2026-02-01 14:35:36 -07:00
Timothy DeHerrera
cfb0881d1f refactor(math): use native MathML instead of KaTeX CDN
Remove external KaTeX stylesheet dependency in favor of browser-native
MathML rendering. Aligns with suckless philosophy—zero external deps,
works offline, smaller page loads.

- Remove KaTeX CDN links from base.html
- Hide katex-html layer, let browsers render MathML natively
- Clean up obsolete CSS (.hide-tail, .katex-display)
- Add minimal .math-display for block math layout
2026-02-01 14:09:27 -07:00
Timothy DeHerrera
56ae6c2e67 style(mermaid): add dark theme styling with transparent backgrounds
Override mermaid's default white backgrounds to blend with dark theme:
- Transparent SVG background
- Node fills use --bg-sidebar
- Labels use --fg color
- Edges use --fg-muted
2026-02-01 12:20:58 -07:00
Timothy DeHerrera
04bf87c02a docs(math): render all LaTeX examples
Replace code-only examples with syntax/rendered table showing:
- Greek letters, fractions, subscripts, sums, integrals, roots, matrices

Add display math examples: Gaussian integral, Euler's identity,
Schrödinger equation.
2026-02-01 12:08:52 -07:00
Timothy DeHerrera
f38303b7e0 docs: document navigation, TOC, and template context
Add comprehensive documentation for recently implemented features:
- [nav] config section (nested, toc toggles)
- Complete frontmatter fields reference (10 fields)
- Hierarchical navigation behavior with ASCII diagram
- Template context: nested_nav, anchors array, page.toc
- Nav item structure including children for nested menus
2026-02-01 11:00:20 -07:00
Timothy DeHerrera
3d5682c59f fix(docs): prevent mermaid diagram overflow on mobile
Add scrollable container rules for .mermaid-diagram in mobile
media query. SVG diagrams now scroll horizontally within their
container instead of extending the page width and obscuring
the hamburger menu.
2026-02-01 10:25:23 -07:00
Timothy DeHerrera
b61e8e8866 chore(fmt): format css 2026-02-01 10:10:40 -07:00
Timothy DeHerrera
e607454af6 feat(css): add :target highlighting for anchor navigation
- Highlight heading with accent border-left when targeted via URL hash
- Show pilcrow anchor visibly on targeted headings
- Add scroll-margin-top for better scroll positioning
2026-02-01 10:10:21 -07:00
Timothy DeHerrera
4392487629 fix(mobile): make nav independently scrollable
- Use viewport-relative max-height instead of fixed 500px
- Add overflow-y:auto for internal scrolling on long anchor lists
2026-02-01 10:04:02 -07:00
Timothy DeHerrera
ce8a9e8f00 feat(ux): add hover-reveal ¶ anchors, strip parens from nav
- Add pilcrow (¶) anchor link after heading text for deep-linking
- CSS: hidden by default, visible on heading hover, user-overridable
- Add strip_parens Tera filter for cleaner nav anchor labels
- Update test expectations for new heading format
2026-02-01 09:57:47 -07:00
Timothy DeHerrera
c8c2506e16 feat(config): add global nav.toc setting with frontmatter override
- Add toc: bool to [nav] config section (default: false)
- Frontmatter toc: true/false overrides global config
- If frontmatter toc is not specified, falls back to config.nav.toc
- Enable nav.toc = true in docs/site.toml for global TOC
2026-02-01 09:42:00 -07:00
Timothy DeHerrera
dcc98dccef feat(nav): add anchor TOC in sidebar for toc-enabled pages
- Pass extracted anchors through template context
- Render anchor links under active page when page.toc is true
- Hierarchical indentation by heading level (h2-h6)
- CSS styling: smaller font, muted color, border-left indicator
- Add toc: true to templates.md as example
2026-02-01 09:37:01 -07:00
Timothy DeHerrera
d50a8c3fbe feat(nav): add context-aware expansion for nested navigation
Children are only visible when user is viewing a page within that
section. Uses Tera's starting_with test to detect ancestor relationship.
2026-02-01 09:16:47 -07:00
Timothy DeHerrera
7f765b32e1 feat(nav): complete Tier 1 hierarchical navigation
Add config option [nav] nested (defaults false), update base.html
template with nested nav rendering, and add .nav-children CSS styling
for indented section children.

- Add NavConfig struct with nested: bool
- Template renders item.children in .nav-children div
- CSS: left border + indent for nested items
2026-02-01 09:09:41 -07:00
Timothy DeHerrera
4cd0c86688 fix(docs): prevent table overflow on mobile
Add responsive table rules: horizontal scroll within container,
word-break for inline code, and constrained max-width. Fixes
hamburger menu being pushed off-screen on pages with wide tables.
2026-02-01 08:43:07 -07:00
Timothy DeHerrera
99fc4c0fc7 feat(docs): add responsive hamburger menu with animations
Implement pure CSS mobile navigation with the following features:

- Collapsible sidebar nav hidden behind hamburger toggle on mobile
- Animated hamburger → X icon morph using CSS transforms
- Smooth slide-down transition for nav reveal (max-height/opacity)
- Hamburger positioned on right side of header via absolute positioning
- Uses :has() selector to detect checkbox state without JavaScript
- Overflow fixes to prevent horizontal scroll on mobile devices

The implementation follows suckless principles with zero JavaScript.
2026-02-01 08:32:24 -07:00
Timothy DeHerrera
516df62796 docs(templates): fix Lighthouse SEO and accessibility issues
- Defer KaTeX CDN CSS with media="print" onload pattern
- Add noscript fallback for non-JS browsers
2026-02-01 07:07:40 -07:00
Timothy DeHerrera
0bb59dd1d5 docs(features): add sitemap documentation
Add docs/content/features/sitemap.md documenting the automatic
XML sitemap generation feature:

- Output location and contents
- Auto-generation behavior
- lastmod date handling
- Linking and validation tips

Follows established pattern from feeds.md.
2026-01-31 22:24:39 -07:00
Timothy DeHerrera
50116d8e8e docs: avoid redundant headers 2026-01-31 19:16:31 -07:00
Timothy DeHerrera
9869da554b chore: make logo transparent 2026-01-31 19:13:19 -07:00
Timothy DeHerrera
6dac743dfa feat(docs): add footer, favicon, and logo branding
- Add sidebar footer with GitHub repo link and MIT copyright
- Generate geometric logo for project branding
- Add logo as favicon in browser tab
- Add logo to sidebar header (32x32) next to "sukr" text
- Add centered logo (128px) at top of README
2026-01-31 18:38:31 -07:00
Timothy DeHerrera
e0fe45330d feat(docs): add footer, favicon, and GitHub link
- Add sidebar footer with GitHub repo link and MIT copyright
- Position footer at bottom of sidebar using flexbox
- Generate geometric logo and add as favicon
- Update base.html template with footer and favicon link
2026-01-31 18:35:29 -07:00
Timothy DeHerrera
1dd91a407b fix(math): add KaTeX CDN and fallback for radical SVG overflow
KaTeX renders square roots using a 400em-wide SVG that relies on CSS
`overflow: hidden` to clip to the correct length. Without the KaTeX
stylesheet, this SVG extends across the entire page.

Changes:
- Add KaTeX CDN stylesheet link to base.html for fonts and layout
- Add .katex-display local margin/overflow overrides
- Add .hide-tail svg max-width fallback for file:// CORS blocking

The CDN provides full KaTeX styling when accessible. The SVG constraint
serves as a fallback when CDN is blocked (e.g., local file:// access).
2026-01-31 18:06:27 -07:00
Timothy DeHerrera
013786faa6 style(highlight): complete Dracula color coverage for all syntax tokens
Expand syntax highlighting CSS from 15 to 31 highlight classes, ensuring
all tree-sitter captures have assigned colors. Organized into logical
sections with comments.

Coverage added:
- type-builtin, function-builtin, constant-builtin (variants)
- variable-builtin, variable-parameter (orange, italic)
- constructor, embedded, escape
- string-special, string-special-path, string-special-uri
- punctuation-special

Color palette (Dracula-inspired):
- Pink (#ff79c6): keywords, operators, tags, punctuation-special
- Yellow (#f1fa8c): strings
- Green (#50fa7b): functions, constructors
- Cyan (#8be9fd): types, properties, attributes
- Purple (#bd93f9): numbers, constants
- Orange (#ffb86c): builtins, parameters, escapes
- Muted (#6272a4): comments
2026-01-31 17:38:54 -07:00
Timothy DeHerrera
10fd93452b doc(highlight): add examples 2026-01-31 17:30:35 -07:00
Timothy DeHerrera
905897b3c4 fix(highlight): complete markdown syntax highlighting with injections
Fix markdown code block highlighting to properly support both markdown
structure (headings, frontmatter) and language injection (rust, bash).

The key fix uses `#set! injection.include-children` in the injection
query to override tree-sitter-md's internal tokenization, enabling
proper highlighting of embedded languages within code fences.

Changes:
- Use crate's HIGHLIGHT_QUERY_BLOCK for base markdown highlighting
- Add custom injection query with include-children directive
- Add YAML/TOML frontmatter and HTML block injection rules
- Add text.* highlight names (title, literal, uri, reference)
- Add string.escape highlight name
- Add CSS styles for new highlight classes
- Remove unused custom md-highlights.scm
2026-01-31 17:24:27 -07:00
Timothy DeHerrera
352b3c1941 docs: add content organization and feature documentation
- Add content-organization.md explaining filesystem-to-URL mapping
- Add feeds.md for Atom feed generation
- Add css.md for CSS minification
- Fix em dash in css.md

Documents core implicit behavior: directory structure → site layout.
2026-01-31 17:14:56 -07:00
Timothy DeHerrera
4aa07d6079 docs(features): add feeds and css minification documentation
- Add Atom feed generation docs (feeds.md)
- Add CSS minification docs (css.md)
- Fix em dash usage in css.md for natural prose

Completes AI audit (4 layers passed) and documentation gap analysis.
All 39 tests pass, docs site builds successfully.
2026-01-31 17:12:10 -07:00
Timothy DeHerrera
8c54882118 feat(highlight): add markdown syntax highlighting with injection
Add tree-sitter-md for markdown parsing with injection support for
fenced code blocks. Code inside markdown code fences (```rust, ```bash,
etc.) is now fully syntax highlighted.

Key fix: Use `#set! injection.include-children` directive in the
injection query to override tree-sitter-md's internal tokenization
of code_fence_content, allowing proper language injection.

- Add tree-sitter-md v0.5.2 dependency
- Add Markdown variant to Language enum (md, markdown aliases)
- Create queries/md-highlights.scm (minimal markdown highlights)
- Create queries/md-injections.scm (with include-children directive)
- Add test: test_markdown_injection_rust
2026-01-31 16:41:11 -07:00