Index: code-docs/cache.scrbl ================================================================== --- code-docs/cache.scrbl +++ code-docs/cache.scrbl @@ -40,13 +40,10 @@ Creates and initializes the SQLite database cache file (named @filepath{vitreous.sqlite} and located in the project root folder) by running queries to create tables in the database if they do not exist. -This function is called automatically in @seclink["pollen-rkt"]{@filepath{pollen.rkt}} whenever HTML -is the target output. - } @defparam[current-plain-title title-plain non-empty-string? #:value "void"]{ Contains (or sets) the “plain” title (i.e., with no HTML markup) for the current article based on Index: code-docs/main.scrbl ================================================================== --- code-docs/main.scrbl +++ code-docs/main.scrbl @@ -55,5 +55,6 @@ @include-section["pollen.scrbl"] @; pollen.rkt @include-section["dust.scrbl"] @; dust.rkt @include-section["snippets-html.scrbl"] @; you get the idea @include-section["cache.scrbl"] @include-section["crystalize.scrbl"] +@include-section["other-files.scrbl"] ADDED code-docs/other-files.scrbl Index: code-docs/other-files.scrbl ================================================================== --- code-docs/other-files.scrbl +++ code-docs/other-files.scrbl @@ -0,0 +1,42 @@ +#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") + +@(require (for-label racket/base "../cache.rkt")) + +@title[#:tag "other-files"]{Other files} + +@section{Home page (@filepath{index.html.pp})} + +Simple Pollen preprocessor file that generates the home page. + +@section{Keyword Index (@filepath{keyword-index.rkt})} + +Through its provided @tt{main} function, builds the keyword index page by pulling all the index +entries directly from the SQLite cache and sorting them by first letter. + +@section{Blog (@filepath{blog.rkt})} + +Through its provided @tt{main} function, creates a paginated listing of all @tech{articles} and +@tech{notes}. + +@section{RSS Feed (@filepath{rss-feed.rkt})} + +Through its provided @tt{main} function, creates the RSS feed in the file @filepath{feed.xml}. Both +articles and notes are included. Any article or note with either @racket["all"] or @racket["feed"] +in its @racket['conceal] meta is excluded. + +@section{Cache initialization (@filepath{util/init.rkt})} + +Creates and initializes the cache database with @racket[init-cache-db!] and +@racket[preheat-series!]. + +@section{New article template (@filepath{util/newpost.rkt})} + +Prompts for a title, creates an article with a normalized version of the filename and today’s date, +and opens the article in an editor. + + Index: index.html.pp ================================================================== --- index.html.pp +++ index.html.pp @@ -68,13 +68,12 @@ ◊url[1]{/blog-pg1.html} }) ◊; stop for now: (crystalize-index-entries! '|index.html| front-page-body) -◊(display-to-file (html$-page-footer) "scribbled/site-footer.html" #:exists 'replace)
◊(->html front-page-body #:splice? #t) ◊(html$-series-list)
Index: makefile ================================================================== --- makefile +++ makefile @@ -25,13 +25,19 @@ web: ## Rebuild all web content (not PDFs) # The file vitreous.sqlite is a cache of the rendered HTML and metadata. If it is older than any of # its dependencies (or missing) all of the articles will be rebuilt. Its dependencies are also on # the Pollen cache watchlist (see pollen.rkt) +# +# After articles are rendered in this way, all the series pages are "touched", to trick Pollen into +# re-rendering those pages without relying on its cache. Without this step, it seems those pages +# are rendered “transitively” during the article render, and the listings are incomplete. vitreous.sqlite: $(core-files) $(html-deps) template.html.p + racket -tm util/init.rkt raco pollen setup -p articles/ raco pollen render -p -t html articles/*.poly.pm + touch series/*.poly.pm raco pollen setup -p series/ raco pollen render -p -t html series/*.poly.pm rm -f template.html series/template.html tidy -quiet -modify -indent --wrap 100 --wrap-attributes no --tidy-mark no articles/*.html || true tidy -quiet -modify -indent --wrap 100 --wrap-attributes no --tidy-mark no series/*.html || true Index: pollen.rkt ================================================================== --- pollen.rkt +++ pollen.rkt @@ -40,13 +40,10 @@ snippets-html.rkt dust.rkt cache.rkt crystalize.rkt)))) -(case (current-poly-target) - [(html) (init-cache-db!)]) - ;; Macro for defining tag functions that automatically branch based on the ;; current output format and the list of poly-targets in the setup module. ;; Use this macro when you know you will need keyword arguments. ;; (define-syntax (poly-branch-kwargs-tag stx) ADDED util/init.rkt Index: util/init.rkt ================================================================== --- util/init.rkt +++ util/init.rkt @@ -0,0 +1,16 @@ +#lang racket/base + +(require racket/file + pollen/setup + "../cache.rkt" + "../snippets-html.rkt") + +(provide main) + +(define (main) + (init-cache-db!) + (preheat-series!) + + (display-to-file (html$-page-footer) + (build-path (current-project-root) "scribbled" "site-footer.html") + #:exists 'replace))