diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-12-14 13:17:05 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-12-14 15:42:52 +0100 |
commit | d41cedb13ee19505dd54d67f4a57083a665804f3 (patch) | |
tree | 02703fb5708b2ee1bf45bbaef3f76ff111b2bbd1 /site/cleopatra | |
parent | Massive performance improvement for `history.sh' (diff) |
Avoid to display too much noweb variables
Diffstat (limited to 'site/cleopatra')
-rw-r--r-- | site/cleopatra/soupault.org | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/site/cleopatra/soupault.org b/site/cleopatra/soupault.org index 98eb732..452f442 100644 --- a/site/cleopatra/soupault.org +++ b/site/cleopatra/soupault.org @@ -2,24 +2,19 @@ <h1><code>soupault</code> Configuration</h1> #+END_EXPORT -In a nutshell, the purpose of ~soupault~ is to post-process HTML files generated -by the generation processes of *~cleopatra~*. It is parameterized by two -settings, the ~<<build-dir>> directory where ~soupault~ generates its output, -and an eventual ~<<subdir>>~ wherein the website contents lives. The latter -allows to generate only a subpart of a larger website. - -For the present website, these two settings are initialized as follows. - #+NAME: build-dir -#+BEGIN_SRC text +#+BEGIN_SRC text :exports none build #+END_SRC #+NAME: prefix -#+BEGIN_SRC text +#+BEGIN_SRC text :exports none ~lthms #+END_SRC +In a nutshell, the purpose of ~soupault~ is to post-process HTML files +generated by the generation processes of *~cleopatra~* + The rest of this document proceeds as follows. We first describe the general settings of ~soupault~. Then, we enumerate the widgets enabled for this website. Finally, we provide a proper definition for ~soupault~ the *~cleopatra~* @@ -36,8 +31,8 @@ Started”]] already discuss in length. We emphasize three things: -- The ~build_dir~ is set to ~<<build-dir>>/<<prefix>>~ in place of simply - ~<<build-dir>>~. +- The ~build_dir~ is set to src_text[:exports code :noweb yes]{<<build-dir>>/<<prefix>>} + in place of simply src_text[:exports code :noweb yes]{<<build-dir>>}. - The ~ignore_extensions~ shall be updated to take into account artifacts produces by other *~cleopatra~* generation processes. - We disable the “clean URLs” feature of ~soupault. This option renames @@ -48,7 +43,7 @@ We emphasize three things: starts rewriting internal URLs when ~clean_url~ is enabled, we might reconsider using it. -#+BEGIN_SRC toml :tangle soupault.conf :noweb tangle +#+BEGIN_SRC toml :tangle soupault.conf :noweb yes [settings] strict = true verbose = false @@ -98,19 +93,17 @@ hard-coding the used version of ~soupault~ (which is error-prone), we rather determine the version of ~soupault~ with the following script. #+NAME: soupault-version -#+BEGIN_SRC bash :results verbatim output :exports both +#+BEGIN_SRC bash :results verbatim output soupault --version | head -n 1 | tr -d '\n' #+END_SRC The configuration of the widget ---initially provided by ~soupault~--- becomes less subject to the obsolescence. -#+BEGIN_SRC toml :tangle soupault.conf :noweb tangle +#+BEGIN_SRC toml :tangle soupault.conf :noweb yes [widgets.generator-meta] widget = "insert_html" -html = """ - <meta name="generator" content="<<soupault-version()>>"> -""" +html = """<meta name="generator" content="<<soupault-version()>>">""" selector = "head" #+END_SRC @@ -715,7 +708,7 @@ the ~build~ stage is simply a call to ~soupault~, whose outputs are located in a single (configurable) directory. #+NAME: stages -#+BEGIN_SRC makefile :noweb no-export +#+BEGIN_SRC makefile :noweb yes soupault-build : @cleopatra echo Running soupault @soupault @@ -750,7 +743,7 @@ Finally, this generation process introduces a dedicated (~PHONY~) command to start a HTTP server in order to navigate the generated website from a browser. #+NAME: ad-hoc-cmds -#+BEGIN_SRC makefile :noweb no-export +#+BEGIN_SRC makefile :noweb yes serve : @echo " start a python server" @cd <<build-dir>>; python -m http.server 2>/dev/null |