From b4f7435aab4270ddb7adcb58a7baf75d70132782 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 24 Sep 2024 10:35:07 -0400 Subject: flat-pages: Add index metadata flag for pretty URLs. --- doc/haunt.texi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/haunt.texi b/doc/haunt.texi index acc7257..0ac016f 100644 --- a/doc/haunt.texi +++ b/doc/haunt.texi @@ -908,6 +908,26 @@ of demonstrating Haunt's flat page functionality. I live here in this manual with my two cats: Bob and Carol. @end example +If the above text were saved to @file{about.md} in the flat pages +directory, the resulting HTML page would be @file{about.html}. + +For ``pretty'' URLS (@file{/about} rather than @file{/about.html}), +the special metadata item @code{index: true} can be specified in the +page header: + +@example +title: About me +index: true +--- + +# About me + +... +@end example + +With the @code{index} metadata flag, Haunt will generate +@file{about/index.html} rather than @file{about.html}. + The content of each flat page is inserted into a complete HTML document by the @var{template} procedure. This procedure takes three arguments: -- cgit v1.2.3