diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -26,12 +26,17 @@ These are the requirements for running the `gemtexter` static site generator scr * GNU Sed * GNU Date * GNU Grep +* GNU Source Highlight (optional for source code highlighting of bare text blocks) * Git (optional for version control) * ShellCheck installed (optional for testing) * XMLLint (optional for validating the atom feed syntax) The script is tested on a recent Fedora Linux. For *BSD or macOS, you would need to install GNU Sed, GNU Date, GNU Grep and a newer version of Bash. +## Why Bash? + +This project is too complex for a Bash script. Writing it in Bash was to try out how maintainable a "larger" Bash script could be. It's still pretty maintainable and helps me try new Bash tricks here and then! + ## Usage So you want such a pretty internet site too? @@ -104,6 +109,20 @@ Once your capsule reaches a certain size it can become annoying to re-generate e This will help you to quickly review the results once in a while. Once you are happy you should always re-generate the whole capsule before publishing it! Note, that there will be no Atom feed generation in filter mode so before publishing it you should always run a full `--generate`. +### Source code highlighting + +The HTML output supports source code highlighting. The requirement is to have the `source-highlight` command, which is GNU Source Highlight, to be installed. Once done, you can annotate a bare block with the language to be highlighted. E.g.: + +``` + ```bash + if [ -n "$foo" ]; then + echo "$foo" + fi + ... +``` + +Please run `source-highlight --lang-list` for a list of all supported languages. + ### Templating Since version `2.0.0`, Gemtexter supports templating. A template file name must have the suffix `gmi.tpl`. A template must be put into the same directory as the Gemtext `.gmi` file to be generated. Gemtexter will generate a Gemtext file `index.gmi` from a given template `index.gmi.tpl`. All lines starting with `<< ` will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file. A `<<<` and `>>>` encloses a multiline template. @@ -183,6 +202,26 @@ You will find the `./extras/html/header.html.part` and `./extras/html/footer.htm `gemtexter` will never touch the `$BASE_CONTENT_DIR/html/.domains`, as this is a required file for a Codeberg page. Furthermore, the `robots.txt` file won't be overridden as well. +### HTML Mastadon verification + +https://joinmastodon.org/verification explains how it works on Mastadon. So we have to hyperlink to the Mastadon profile to be verified and also include a `rel='me'` into the tag. In order to do that add this to the `gemtexter.conf` (replace the URI to your Mastadon profile accordingly): + +``` +declare -xr MASTADON_URI='https://fosstodon.org/@snonux' +``` + +and add the following into your `index.gmi`: + +``` +=> https://fosstodon.org/@snonux Me at Mastaton +``` + +The resulting line in the HTML output will be something as follows: + +``` +<a href="https://fosstodon.org/@snonux" rel='me'>Me at mastadon</a> +``` + ### Special Markdown configuration for GitHub pages `gemtexter` will never touch the `$BASE_CONTENT_DIR/md/_config.yml` file (if it exists). That's a particular configuration file for GitHub Pages. `gemtexter` also will never modify the file `$BASE_CONTENT_DIR/md/CNAME`, as this is also a file required by GitHub pages for using custom domains. |
