diff options
| author | Nicolas Paul <n@nc0.fr> | 2023-05-01 13:03:03 +0200 |
|---|---|---|
| committer | Nicolas Paul <n@nc0.fr> | 2023-05-01 13:03:03 +0200 |
| commit | f57c0d15c931563a55abdc9cea72d189a24f7456 (patch) | |
| tree | 97a7cd740da179b0a2f160a92bf2ec9da9ed6cd9 /crocc.go | |
| parent | 314db62804a5696aa81ebf0a680cc8f9e2e46ede (diff) | |
Add slug to HTML templates
Diffstat (limited to 'crocc.go')
| -rw-r--r-- | crocc.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 } |
