This is part of cleanup for content organization in the current docs, which reads as follows:
path
can be provided in the front matter. This will replace the actual path to the file on disk. Destination will create the destination with the same path, including the section.
Keeping our language consistent, let’s assume there is a content/posts/my-post.md
that is going to use _default/single.html
:
{{.File.path}}
=> "posts/my-post.md"
So with that in mind, and observing the above quote from the docs, what if I wanted to specify the path
in the front matter?
# content/posts/my-post.md....
---
title: My Post
path: "blog/my-blog-post/"
---
OR
---
title: My Post
path: "blog"
---
OR
---
title: My Post
path: "blog/my-blog-post.md"
None of these seem to make a difference in the output/rendered site, so I’m wondering why specify a path
in front matter rather than just url
or slug
? I think I’m missing something crucial here. So in other words, a) What am I missing? b) What value does this offer users as a feature? (i.e. a use case?)
Please and thank you.