Open KaneFreeman opened 1 year ago
This is available in for Nested Collections now (in the upcoming v2.0.0
). I will look into extending this to regular folder collections at some point as well.
Is there a YAML frontmatter convention on how the key for such a slug, an alias to the filename should be called? alias:
, or simply slug:
?
Then filenames would not need to be edited for a first, blog-focussed approach, and the headline could be changed here.
Implementing to read and write a slug field might be easier to achieve than implementing logic and presentation for a file rename dialog. The original request is ambiguous on what is preferred here.
Considering the default quick starter templates for StaticCMS
we find Hugo, Gatsby and Eleventy (E11y) as static site generators in use with StaticCMS, and Next, Nuxt and Preact as full frameworks for static bundling. While I couldn't figure out where an equivalent of a slug functionality could be found in the Preact documentation, I have found the associated places for the other cases:
Hugo and Gatsby support the slug
field:
Eleventy supports a permalink
field:
Maybe the name of an eventual
slug
field to be used could be configurable, to cover both cases above, and at least the last one below?
Nuxt and Next both only support what they call dynamic routes built from slugs derived from file system specification:
Nuxt supports an alias
property for additional routes:
For the latter examples, it appears providing the slug via a location in the file system hierarchy is the more generic use case, but providing a slug instead is the more convenient use case.
This story is specifically about renaming files. Slug fields are completely possible already. I have not decided whether or not to proceed with this story or not yet.
Originally posted by @ryangittings in https://github.com/StaticJsCMS/static-cms/discussions/4#discussioncomment-4253686