◊(Local Yarn Code "Update of "branch/evolve"")

Overview

Artifact ID: 2bb62aebb7dc81901e321c90f87202a2b1fae04d95d29eff2647e5529e8ca718
Page Name:branch/evolve
Date: 2021-11-29 17:36:12
Original User: joel
Mimetype:text/x-markdown
Parent: 01bcceab770a54dda007a2e6bb7b9512a68eea309d3e01e3a6ede27a205fa163 (diff)
Next 0050c6c9aed24fdea08517cddd50be84f62de893d6c99039a6de7588b0badabe
Content

I’m a little better at this than I was when I started the project, and I’m using this branch to implement some ideas that will make everything simpler, quicker, and more elegant.

  • The SQLite cache will be removed.

  • Articles will keep all the values needed to render themselves and their notes in their metas, rather than reparsing the doc at render time.

  • Articles and notes will compile to an AST rather than directly to HTML or LaTeX or MP3 or whatever (no “poly tags” required).

  • At compile time, an article will serialize each of its notes to a separate .rktd file in a subfolder. The filename will be timestamp-prefixed to allow for easy sorting.

  • After all updated articles are compiled, an indexer (yarn/stitch below) will rebuild sort tables and serialize them to .rktd files:

    • Dictionary of main index entries → subentry + list of link targets
    • Hash table of series → articles
    • Ordered lists of all articles and notes by date

Cross-references

There will be a clear cross-referencing model:

  • A pin is an index entry. In a body of text, it links to the index entry.
  • A def is also a pin that can be cross-referenced directly in another text.
    • In a body of text, it is italicized, prefixed with a manicule, and links to the index entry.
    • Every title of an article becomes its own def.
  • A ref simply links directly to a def (not to the index).
    • Ref links get resolved at template render time.
  • No back-links.

Rendered articles will be able to include previous/next links for other articles in their series. The listings within series will be resolved at render time and not at compile time, making it simple for articles to fetch series metadata.

Organization

  • thelocalyarn
    • articles/
    • series/
    • templates/
    • img/
    • web/ (CSS, JS, fonts, etc)
    • yarn-lib/
      • markup (anything needed by articles at compile time)
      • struct (AST)
      • stitch (for gathering info from/referring to other files)
      • render/
        • base
        • html
        • latex
        • mp3? etc…
    • yarn-doc/
    • pollen.rkt
    • blog.rkt
    • feed.rkt
    • index.rkt
    • crossref.rkt
    • makefile

Templates will (require yarn/render/html) or whichever module is needed for the output format.