From 71439f700b845e8d8336041c6d6824f01b7c9067 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 5 Feb 2024 16:15:21 -0800 Subject: Add documentation on capability system. (#3549) Fixes #3454. --- docs/scripts/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/scripts/Program.cs') diff --git a/docs/scripts/Program.cs b/docs/scripts/Program.cs index d7f4ef623..d543f399e 100644 --- a/docs/scripts/Program.cs +++ b/docs/scripts/Program.cs @@ -164,6 +164,12 @@ namespace toc node.sections.Add(sectionStr); node.sectionShortTitles.Add(maybeGetShortTitle(sectionStr, content, i)); } + if (content[i].StartsWith("permalink:")) + { + var prefixLength = ("permalink:").Length; + var permaPath = content[i].Substring(prefixLength, content[i].Length - prefixLength).Trim(); + node.fileID = Path.GetFileName(permaPath); + } } if (node.title == null) { -- cgit v1.2.3