diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-02-26 22:49:35 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-02-26 22:49:35 +0100 |
commit | d73889383f4138e3bf385689222f1d7194b02d4d (patch) | |
tree | 6f4d7aaebb653ff6b6dacea796eecc81322308ef /site/cleopatra | |
parent | Display source blocks names and tangle filenames in HTML output (diff) |
Generalize the meta-generator widget using the power of Org
Diffstat (limited to 'site/cleopatra')
-rw-r--r-- | site/cleopatra/Soupault.org | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/site/cleopatra/Soupault.org b/site/cleopatra/Soupault.org index f8e57b0..ea3bf82 100644 --- a/site/cleopatra/Soupault.org +++ b/site/cleopatra/Soupault.org @@ -61,10 +61,22 @@ ARTIFACTS += build/ ** Acknowledging ~soupault~ -#+BEGIN_SRC toml :tangle soupault.conf +When creating a new ~soupault~ project (using ~soupault --init~), the default +configuration file suggests advertising the use of ~soupault~. Rather than +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 +soupault --version | head -n 1 | tr -d '\n' +#+END_SRC + +The configuration of the widget becomes + +#+BEGIN_SRC toml :tangle soupault.conf :noweb tangle [widgets.generator-meta] widget = "insert_html" - html = '<meta name="generator" content="soupault 1.5">' + html = '<meta name="generator" content="<<soupault-version()>>">' selector = "head" #+END_SRC |