summaryrefslogtreecommitdiffstats
path: root/docs/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'docs/scripts')
-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)
{