zona-go/TODO.md
2025-06-15 19:16:16 -04:00

2.8 KiB

TO-DO

  • First, re-write the settings & configuration system from scratch! It's broken and messy and not worth trying to fix like this. Instead, actually architect how it should work, then implement it.
  • Refactor the directory structure processing
    • Implement zola-style structure instead
      • zona init command to populate the required files, with defaults (unlike zola)
        • Interactive for setting values, also an option to create .gitignore with public in it.
      • zona.yml is required and should mark the root:
        • templates, content, static, zona.yml
        • multiple zona.yml files should be an error
        • if the folder containing zona.yml doesn't contain exactly the expected directories and files, it's an error
      • Paths in page metadata should start at these folders
        • i.e. (template|footer|header): name.htmlroot/templates/name.html
        • (style|icon): name.extroot/static/name.ext
      • Traverse content and static separately, applying different rules
        • everything in static/** should be directly copied
        • content/** should be processed
          • *.md converted, everything else copied directly
          • ./name.md → ./name/index.html
          • Either ./name.md or ./name/index.md are valid, together they cause an error!
    • What about markdown links to internal pages?
      • Relative links should be supported to play nice with LSP
        • in case of relative link, zona should attempt to resolve it, figuring out which file it's pointing to, and convert it to a / prefixed link pointing to appropriate place
        • so ../blog/a-post.md/blog/a-post where /blog/a-post/index.html exists
      • links from project root should also be supported
      • check link validity at build time and supply warning
      • tl;dr all links should be resolved to the absolute path to that resource starting from the website root. that's the link that should actually be written to the HTML.
  • Re-consider what zona.yml should have in it.
    • Set syntax highlighting theme here
      • a string that's not a file path: name of any built-in theme in chroma
      • path to xml or yml file: custom theme for passing to chroma
        • if xml, pass directly
        • if yml, parse and convert into expected xml format before passing
    • Set website root URL here
    • toggle option for zona's custom image label expansion, image container div, etc, basically all the custom rendering stuff
  • Syntax highlighting for code blocks
  • Add zona serve command with local dev server to preview the site
  • Both zona build and zona serve should output warning and error
  • Write actual unit tests!