summaryrefslogtreecommitdiffstats
path: root/docs/scripts/Program.cs
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-05 16:15:21 -0800
committerGitHub <noreply@github.com>2024-02-05 16:15:21 -0800
commit71439f700b845e8d8336041c6d6824f01b7c9067 (patch)
tree5664ce2d577a79043f723ee8c3061d863f092d5e /docs/scripts/Program.cs
parent6dca7e39292e6c5672440f6f1dbfb204a79b90d2 (diff)
Add documentation on capability system. (#3549)
Fixes #3454.
Diffstat (limited to 'docs/scripts/Program.cs')
-rw-r--r--docs/scripts/Program.cs6
1 files changed, 6 insertions, 0 deletions
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)
{