summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2019-01-02 23:20:39 +0100
committerFilipe Brandenburger <filbranden@google.com>2019-01-02 23:23:18 +0100
commit357211a4260e47d5ea24db2a8062d263d58ec791 (patch)
tree1d79f7d8f1c077b2624ccc4875642c8a3d55f3c7 /tools
parentdocs: add a "front matter" snippet to our markdown pages (diff)
downloadsystemd-357211a4260e47d5ea24db2a8062d263d58ec791.tar.xz
systemd-357211a4260e47d5ea24db2a8062d263d58ec791.zip
docs: generate index.md in Jekyll
This uses a {% for %} loop in Jekyll to render the page, from the "title" information in the Front Matter of the actual page files. This also makes `make-index-md` build rule unnecessary, since generation is done by the template engine itself. Tested this by running Jekyll locally.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/make-index-md.sh32
1 files changed, 0 insertions, 32 deletions
diff --git a/tools/make-index-md.sh b/tools/make-index-md.sh
deleted file mode 100755
index 78506cbf39..0000000000
--- a/tools/make-index-md.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-set -eu
-
-cd "$@"/docs/
-(
- echo -e "# systemd Documentation\n"
-
- for f in *.md ; do
- if [ "x$f" != "xindex.md" ] ; then
- t=`grep "^# " "$f" | head -n 1 | sed -e 's/^#\s*//'`
-
- if [ "x$f" = "xCODE_OF_CONDUCT.md" -o "x$f" = "xCONTRIBUTING.md" ] ; then
- # For some reason GitHub refuses to generate
- # HTML versions of these two documents,
- # probably because they are in some way special
- # in GitHub behaviour (as they are shown as
- # links in the issue submission form). Let's
- # work around this limitation by linking to
- # their repository browser version
- # instead. This might not even be such a bad
- # thing, given that the issue submission form
- # and our index file thus link to the same
- # version.
- u="https://github.com/systemd/systemd/blob/master/docs/$f"
- else
- u="https://systemd.io/"`echo "$f" | sed -e 's/.md$//'`
- fi
- echo "* [$t]($u)"
- fi
- done
-) > index.md