summaryrefslogtreecommitdiff
path: root/crocc.go
diff options
context:
space:
mode:
authorNicolas Paul <n@nc0.fr>2023-05-01 13:03:03 +0200
committerNicolas Paul <n@nc0.fr>2023-05-01 13:03:03 +0200
commitf57c0d15c931563a55abdc9cea72d189a24f7456 (patch)
tree97a7cd740da179b0a2f160a92bf2ec9da9ed6cd9 /crocc.go
parent314db62804a5696aa81ebf0a680cc8f9e2e46ede (diff)
Add slug to HTML templates
Diffstat (limited to 'crocc.go')
-rw-r--r--crocc.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/crocc.go b/crocc.go
index 74b14f5..e88ab33 100644
--- a/crocc.go
+++ b/crocc.go
@@ -136,7 +136,8 @@ func Crocc(path string, d os.DirEntry, e error) error {
// If the file is a Markdown file, transform it into HTML
o = strings.TrimSuffix(o, filepath.Ext(o)) + ".html"
- if err := TransformMarkdownFile(path, o); err != nil {
+ s := strings.TrimSuffix(strings.TrimPrefix(o, *out), ".html")
+ if err := TransformMarkdownFile(path, o, s); err != nil {
return err
}