From: Lady Date: Sun, 15 Sep 2024 04:24:45 +0000 (-0400) Subject: Enable two‐stage builds using a “data” directory X-Git-Tag: 0.12.5~3 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/06b2ae9f95a0505031127bfe954451fa399cea5d?ds=sidebyside;hp=06b2ae9f95a0505031127bfe954451fa399cea5d Enable two‐stage builds using a “data” directory One pattern for building sites is to use a large number of data files which are all compiled into a single large file, which is then used to derive the various pages of the website (using expanded archive functionality). While this can be done using ordinary includes, it is expensive to do so, because inclusions and transformations on the “single large file” will re‐happen every time that it is included. What is actually desired in this case is an intermediate data file, which has already had all transformations applied, which can then be included into other files. This commit establishes a pattern for doing so, where·by certain files (conventionally, by file extension; by default, `.rdf`) can be designated as “data files” and built during an initial pass using includes from a “data directory”, and then themselves be available as includes for the second stage. Installing installs files from both stages. Other commands (such as `listout`) currently ignore data files because they don’t follow common assumptions (they are not built to `$(BUILDDIR)/stage2/public`, for example); variants or flags to enable listing these files may be fruitful future work. ---