◊(Local Yarn Code "Artifact [e2e5a12a]")

Artifact e2e5a12af7bb62505320e0415c5082e805a483b19a608970ce6f25ef240d2027:

#lang scribble/manual

@; SPDX-License-Identifier: BlueOak-1.0.0
@; This file is licensed under the Blue Oak Model License 1.0.0.

@(require "scribble-helpers.rkt"
          (for-label racket/base

@title{Local Yarn: source code notes}

@author{Joel Dueck}

These are my notes about the internals of the Local Yarn source code. In other words, a personal
reference, rather than a tutorial. These pages concern only the source code itself. Refer to the
wiki for info about deployment, etc.

You’ll get the most out of these notes if you have read @other-doc['(lib
"pollen/scribblings/pollen.scrbl")], and worked through the tutorials by hand.

@margin-note{Note that these pages are heavily interlinked with the central Racket documentation at
@tt{docs.racket-lang.org}, which are written and maintained by others. 

Some links from those pages will not work unless you @ext-link["#"]{open this page in its own tab}.

Here’s a rough diagram showing how the @tt{.rkt} modules in this project relate to each other, and
to the Pollen source documents. This is the least complex system I could devise that would @tt{A)}
implement everything I want in my @secref["design-goals"], @tt{B)} cleanly separate dependencies for
print and web output, and @tt{C)} organize an ever-growing collection of hundreds of individual
notes and articles without noticable loss of speed. 

@(define-runtime-path source-diagram "source-diagram.png")

The solid-line connections indicate explicit @racket[require] relationships. Dotted arrows generally
indicate implicit exports in the Pollen environment: docs and metas to templates,
@seclink["pollen-rkt"]{@filepath{pollen.rkt}} to source documents and templates. The orange lines
highlight the provision and use of the functions in

Individual articles, while they are being rendered to HTML pages, save copies of their metadata and
HTML to the SQLite cache. This is done by calling @racket[parse-and-cache-article!] from within
their template. Likewise, series pages cache themselves with a call to @racket[cache-series!] from
within their template.

Any pages that gather content from multiple articles, such as Series pages and the RSS feed, pull
this content directly from the SQLite cache. This is much faster than trawling through Pollen’s
cached metas of every article looking for matching articles.


@include-section["pollen.scrbl"]  @; pollen.rkt
@include-section["dust.scrbl"]    @; dust.rkt
@include-section["snippets-html.scrbl"] @; you get the idea