Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
org-hugo-slug
not return slugs with consecutive hyphens
The documentation ( https://ox-hugo.scripter.co/doc/org-capture-setup/ ) suggests using `org-hugo-slug` to auto-generate the file name from the title. This change is so that the auto-generated file name doesn't have consecutive hyphens in its name. Otherwise the Hugo-generated URL will not match with the file name exactly. See gohugoio/hugo#7288. This change does not affect the generation of anchor names within a post as double-hyphens are OK there. This commit mainly affects the people using `org-hugo-slug` outside of ox-hugo, like in their Org Capture templates. Earlier the generated file name could have been "foo--bar.md". Now it would be "foo-bar.md" instead.
- Loading branch information