From bb2f9e9c123e3e6309c97f0644ea18c6a4b88af6 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 26 Sep 2023 18:37:54 -0400 Subject: [PATCH] README.adoc: make it work offline too Signed-off-by: Philippe Proulx --- README.adoc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index c3ebe7f..1132dd7 100644 --- a/README.adoc +++ b/README.adoc @@ -1,9 +1,23 @@ -= Normand -Philippe Proulx +// Show ToC at a specific location for a GitHub rendering +ifdef::env-github[] +:toc: macro +endif::env-github[] + +ifndef::env-github[] :toc: left +endif::env-github[] + +// This is to mimic what GitHub does so that anchors work in an offline +// rendering too. +:idprefix: +:idseparator: - +// Other attributes :py3: Python{nbsp}3 += Normand +Philippe Proulx + [.normal] image:https://img.shields.io/pypi/v/normand.svg?label=Latest%20version[link="https://pypi.python.org/pypi/normand"] @@ -16,6 +30,11 @@ tool. WARNING: This version of Normand is 0.1, meaning both the Normand language and the module/CLI interface aren't stable. +ifdef::env-github[] +// ToC location for a GitHub rendering +toc::[] +endif::env-github[] + == Introduction The purpose of Normand is to consume human-readable text representing -- 2.34.1