diff options
| author | a73x <[email protected]> | 2024-09-03 08:52:12 +0100 |
|---|---|---|
| committer | a73x <[email protected]> | 2024-09-03 08:52:12 +0100 |
| commit | 17b008f72f284ea989fddb2b6b52c2ca558c985a (patch) | |
| tree | acb286b07dd62fc0e539ae466536132b3c9b7c94 /markdown/markdown.go | |
| parent | 1c0e1cc8c6a51457907ce028599c2bcad82d0bfd (diff) | |
chore(html): refactor nav to be more dynamic
Diffstat (limited to 'markdown/markdown.go')
| -rw-r--r-- | markdown/markdown.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/markdown/markdown.go b/markdown/markdown.go index 658e527..1a529f6 100644 --- a/markdown/markdown.go +++ b/markdown/markdown.go @@ -60,7 +60,10 @@ func parseMarkdownFile(embedded fs.FS, path string) (Content, error) { if err != nil { return Content{}, fmt.Errorf("failed to parse frontmatter: %v", err) } - path = strings.Replace(path, ".md", "", 1) + path = "/" + strings.Replace(path, ".md", "", 1) + if path == "/index" { + path = "/" + } mc := Content{ Body: string(rest), |
