diff --git a/README.md b/README.md index 84b2b2a..a59df3d 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,44 @@ trls: [ nl ] lang: en --- -This describes how I publish selected files from this repository to the Web. Actually, these files _are_ the publication mechanism. +How I create web pages from selected files from this repository, with private and public editions. +## Quickstart -## The Engine -The static site is generated with [Web Origami](https://weborigami.org). +Prerequisites: [node](https://nodejs.org); [git](https://git-scm.com); clone this repository with `git clone https://git.surfacemarkup.net/hans/ad_pubfiles`. + +0. In this repository, `npm install` dependencies, including [Web Origami](https://weborigami.org). The following instructions assume you also have installed the `ori` command with `npm install -g @weborigami/origami`. If not, replace `ori` in commands below with `npx @weborigami/origami`. + +1. link or copy `README.md` to the parent directory of this repository, with the name `ad_pubfiles_pub.ori.md`. Now you have input for testing and development, since the ori template files look in the parent directory for files with this pattern. Optionally add more files with the pattern: `[a-p]+_title[_pub-other-tags][.ori].md`. That is: + +- they MUST start with a sequence of characters `a-p`, +- followed by an underscore, +- followed by a title which does not contain an underscore, +- followed optionally by an underscore and one or more tags separated by hyphens. For testing purposes, only the `pub` tag is relevant. +- followed by the filetype extension `.md`. If you want to use Origami expressions in the file, use `.ori.md`. + +The reason for this setup step is that on my machine, the parent directory contains my personal wiki. So I can't share the input with you directly. The filename pattern above is used for the process of selecting which files to include in the build. The [figure below](#project-structure-figure) shows this arrangement. + +2. Use the following commands to achieve the desired output. + +- in private mode: `ori "serve watch ., =debug ./site.ori('all')"` +- in public mode: `ori "serve watch ., =debug ./site.ori()"` + +`site.ori` only exposes the final rendering step from `pipeline.ori`. Therefore: + +- To serve the pipeline with all the processing steps available for inspection, replace `site.ori` with `pipeline.ori` in the commands above. + + +
+a diagram showing a directory called src containing markdown files. The src directory also contains a subdirectory called ad_pubfiles_pub.d. Arrows show that the file README.md inside this subdirectory is hardlinked to a file in the parent src directory, and that the file pipeline.ori in the subdirectory reads markdown files from the parent src directory, and that the subdirectory is a git repository which is synchronized with a remote public repository. +
How the site generator files relate to the content
+
-`pipeline.ori` contains the main pipeline. `site.ori` selects some keys from `pipeline.ori` to create the final site. The reason for this split is: there are a bunch of steps in the pipeline which should not be exposed in the final build, but that do need to be accessible for inspection during development/debugging. -Both files take an argument which specifies whether to build the site in public or private mode. In public mode, only files with a certain tag are included in the output. -Public mode is the default. Run: `ori site.ori()` or `ori pipeline.ori()`. -For private mode, run: `ori 'site.ori("all")'` or `ori 'pipeline.ori("all")'`. @@ -32,10 +55,9 @@ I have developed a text markup format which suits my needs better than Markdown. ## Markup-taal Ik heb een formaat ontwikkeld voor tekst die beter bij mijn doelen past dan Markdown. + - - ## Internal Links diff --git a/project-structure.svg b/project-structure.svg new file mode 100644 index 0000000..abf1d37 --- /dev/null +++ b/project-structure.svg @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + src + ad_pubfiles.d/ + aa_README_pub.ori.md + ab_CHANGELOG_pub.ori.md + ad_pubfiles_pub.ori.md + pg_journal.md + ... + + + README.md + + site.ori + pipeline.ori + ... + .git + hardlinked.same file! + + reads md files from parent dir.Does not descend into dirs like this one. + + synced with publicremote repo + +