Index: code-docs/main.scrbl ================================================================== --- code-docs/main.scrbl +++ code-docs/main.scrbl @@ -31,11 +31,12 @@ right-click and open the link in a new tab or window. @local-table-of-contents[] +@include-section["overview.scrbl"] @include-section["pollen.scrbl"] @; pollen.rkt @include-section["dust.scrbl"] @; dust.rkt @include-section["sqlite-tools.scrbl"] @; sqlite-tools.rkt @include-section["snippets-html.scrbl"] @; you get the idea @include-section["crystalize.scrbl"] ADDED code-docs/overview.scrbl Index: code-docs/overview.scrbl ================================================================== --- code-docs/overview.scrbl +++ code-docs/overview.scrbl @@ -0,0 +1,41 @@ +#lang scribble/manual + +@; Copyright (c) 2019 Joel Dueck +@; +@; Copying and distribution of this file, with or without modification, +@; are permitted in any medium without royalty provided the copyright +@; notice and this notice are preserved. This file is offered as-is, +@; without any warranty. + +@(require "scribble-helpers.rkt" + racket/runtime-path) + +@(require (for-label racket/base)) + +@title{Overview} + +@section{Source Code} + +Here’s a rough diagram showing how the @tt{.rkt} modules in this project relate to each other, and +to the Pollen source documents. + +@(define-runtime-path source-diagram "source-diagram.png") +@centered{@responsive-retina-image[source-diagram]} + +The solid-line connections indicate explicit @racket[require] relationships. Dotted arrows generally +indicate implicit exports in the Pollen environment: docs and metas to templates, +@filepath{pollen.rkt} to source documents and templates. The orange lines highlight the provision +and use of the functions in @filepath{crystalize.rkt}. + +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 functions in @filepath{crystalize.rkt} from within +the 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. + +This is the least complex system I could devise that can @tt{A)} implement everything I want in my +@wiki{Design and Layout}, @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. Index: code-docs/scribble-helpers.rkt ================================================================== --- code-docs/scribble-helpers.rkt +++ code-docs/scribble-helpers.rkt @@ -46,5 +46,11 @@ (define (ext-link url-str . elems) (keyword-apply hyperlink '(#:style) (list (style #f (list (attributes '((target . "_blank")))))) url-str elems)) + +(define (responsive-retina-image img-path) + (image img-path + #:scale 0.5 + #:style (style #f (list (attributes '((style . "max-width:100%;height:auto;"))))))) + ADDED code-docs/source-diagram.png Index: code-docs/source-diagram.png ================================================================== --- code-docs/source-diagram.png +++ code-docs/source-diagram.png cannot compute difference between binary files