diff options
Diffstat (limited to 'docs/scripts/Program.cs')
| -rw-r--r-- | docs/scripts/Program.cs | 6 |
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) { |
