Here’s the situation:
I have three top-level sections — article, book, and video — like this:
- content/
- article/
- book/
- video/
…and in the “book” section, I have sub-directories, like this:
- book/
- html-tutorial/
- photoshop-tutorial/
Then each sub-directory has Markdown files, like this:
- html-tutorial/
- introduction.md
- getting-started.md
- conclusion.md
As a result, I end up with permalinks that look like this:
But is there an elegant way to remove the “book” part from this permalink?
At the moment, I’ve got the following code in my config.yml
file:
permalinks:
book: /:slug
…and have the “slug” parameter set like this in the front-matter:
slug: "html-tutorial/introduction"
This provides the desired result, but it seems redundant to explicitly include the sub-directory name in the slug, so I was wondering if there was a better way to achieve the same result.
Thanks for any help.