mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
6.1 KiB
6.1 KiB
Performance
- See if we can disable bounds checks in
write_indentedand elsewhere. - Instead of loading the site fresh each time in watch mode, create a
reload_siteproc, that just updates changed resources. - Only publish referenced assets.
- Split
load_pageinto frontmatter-parse + body-process phases so draft pages can skip the markdown pipeline entirely - Use spall to find ways to reduce run time.
- Consider using
#soafor Page lists.
Memory Management
- Not sure whether to use temp allocator or site_allocator in opengraph.odin.
- Not sure whether to use temp allocator or site_allocator in
site_load_content. - Might not need to allocate in
strip_html_tags
Markdown
- Add overloads for every extension - accept ^strings.Builder.
- Add conventional (Hugo style) footnotes option.
- Add heading ids as a default on extension.
- Add opt-in deflist support.
- Decide if lambdas actually provide any value.
- configure date format as a partial
General
- Integrity hash
- Allows users to verify their output didn't change after upgrading to a new version
- Content-hash fingerprinting for CSS and JS cache busting
- Avoid
json.Value/json.Objectwhere possible. - make
parsean overload ofparse_text/parse_inlineandparse_file, or something. - Add page params
- We must remove all mention of
postsfrom the odin code. At present, "posts" are a user-level construct defined as pages in a particular collection. - running ./thor/thor still logs the debug message: using config /home/spencer/github.com/sbrow.github.io/thor.json
- wrong cwd?
- Clean up the default layouts
- if no
htmltag detected in output, re-render output with base template (or whatever template is next in the chain) - Add
-productionflag- sets
-minify
- sets
- Mustache diagnostics
- Rust-style error messages: position tracking on Node/Template/Data_Error,
diagnostic.odinwithformat_error, ANSI colors viacore:terminal/ansi(Phase 1+2+3) - Unknown-key detection with Levenshtein suggestions (
core:strings/levenshtein_distance); warning severity (Phase 4+5) - Strict-by-default posture: warn on missing keys in
{{k}}/{{{k}}}/{{#k}}/{{^k}}, missing partials, missing parents, unmatched block overrides - Block-override source-template tracking: warnings inside overrides point at the override's source file, not the parent template
- Partial invocation stack in diagnostics: when an error fires inside a partial, show "invoked from" chain through
{{> name}}calls. Currently warnings inside partials point at the partial (correct file) but don't show the invocation site. - Could be better error message when missing a closing (or opening) brace
- Rust-style error messages: position tracking on Node/Template/Data_Error,
- Block attributes on code fences (
{ #ex-1 }) — hello-world.md - include-code shortcode (
{{< include-code ... >}}) — i-ported-fd-to-odin - follow symlinks in
scan_content? - ensure sidenote numbers render in display order and not in declaration order.
- We need to be able to do
Year_Sectionin a non-magical, unprivileged way. Implemented via the pipes extension to mustache — see mustache/EXTENSIONS.md. - Table of contents support.
- Nav items should be active when the current page is selected.
- Theme selector for syntax highlighting.
- use http://github.com/helix-editor/helix/tree/master/runtime/themes) as a guide
- grammars
- Search in multiple places
- Download missing grammars.
- Durable highlight paths: read
GRAPHS_PATH/QUERIES_PATHfrom env vars set by the flake instead of hardcoded nix store hashes, so they survivenix flake updateand let the grammar/query version-mismatch detector fire automatically.
- CI
- Syntax highlighting in production: CI (
nix buildon ubuntu-latest) has no grammar.sos and a machine-specificQUERIES_PATHnix store hash, so the deployed site renders unhighlighted. Provide grammars + queries as nix build inputs and pass paths to thor at runtime (env vars/flags).
- Syntax highlighting in production: CI (
- Unit tests for highlighting helpers:
capture_name_to_css,escape_html,unescape_html,extract_query_token,helix_version_from_path. <pre><code>blocks need to set background to theme background, regardless of prefers-dark. (or use a different theme)-watchflag- basic poll loop
- filesystem poll loop
- event based
- Free cmark HTML output (
body_html) — cmark allocates via C malloc, not the arena, so it leaks per iteration in watch mode - Mount content in VFS
- commands
buildalias of defaultnew siteset up new project
- warn/error when unknown key used in mustache.
- Import/export packages. Hugo, jekyll, WordPress, etc.
Notes
from the Hugo docs
- default sort order
- The default sort order for page collections, used when no other criteria are set, follows this priority:
- weight (ascending)
- date (descending)
- linkTitle falling back to title (ascending)
- logical path (ascending)
Code Review
A human should manually review every file in the project. AI cannot complete these tasks.
- Review every file in thor
- Review assets.odin
- Review content.odin
- Review defaults.odin
- Review feed.odin
- Review frontmatter.odin
- Review main.odin
- Review minify.odin
- Review
markdown/- Review alerts.odin
- Review alerts_test.odin
- Review emoji.odin
- Review emoji_test.odin
- Review footnotes.odin
- Review footnotes_test.odin
- Review highlight.odin
- Review markdown.odin
- Review sectionate.odin
- Review sectionate_test.odin
- Review suggest.odin
- Review suggest_test.odin
- Review opengraph.odin
- Review render.odin
- Review site.odin
- Review treesitter/treesitter.odin
- Review vfs.odin
- Review procs
- markdown.transform_alert