From 0bc7a22d9393ee3a806c308e8e1dd387858d44ba Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 2 Oct 2018 09:53:05 +0200 Subject: [PATCH] docs: add a simple, auto-generated index.md This is useful for the github pages feature --- docs/index.md | 25 +++++++++++++++++++++++++ meson.build | 4 ++++ tools/make-index-md.sh | 15 +++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 docs/index.md create mode 100755 tools/make-index-md.sh diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000000..32366ccb87 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,25 @@ +# systemd Documentation + +* [The Boot Loader Specification](BOOT_LOADER_SPECIFICATION.md) + +* [Control Group APIs and Delegation](CGROUP_DELEGATION.md) + +* [The systemd Community Conduct Guidelines](CODE_OF_CONDUCT.md) + +* [Code Quality Tools](CODE_QUALITY.md) + +* [Contributing](CONTRIBUTING.md) + +* [Porting systemd To New Distributions](DISTRO_PORTING.md) + +* [Known Environment Variables](ENVIRONMENT.md) + +* [Portable Services Introduction](PORTABLE_SERVICES.md) + +* [Steps to a successful release](RELEASE.md) + +* [What settings are currently available for transient units?](TRANSIENT-SETTINGS.md) + +* [Notes for Translators](TRANSLATORS.md) + +* [Users, Groups, UIDs and GIDs on `systemd` systems](UIDS-GIDS.md) diff --git a/meson.build b/meson.build index c29f622143..1c4febfa4b 100644 --- a/meson.build +++ b/meson.build @@ -2909,6 +2909,10 @@ run_target( depends : [man, libsystemd, libudev], command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()]) +run_target( + 'make-index-md', + command : ['sh', '@0@/tools/make-index-md.sh'.format(meson.source_root()), meson.source_root()]) + ############################################################ status = [ diff --git a/tools/make-index-md.sh b/tools/make-index-md.sh new file mode 100755 index 0000000000..1c0dc36103 --- /dev/null +++ b/tools/make-index-md.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -eu + +cd "$@"/docs/ +( + echo "# systemd Documentation" + + for f in *.md ; do + if [ "x$f" != "xindex.md" ] ; then + t=`grep "^# " "$f" | head -n 1 | sed -e 's/^#\s*//'` + echo -e "\n* [$t]($f)" + fi + done +) > index.md