I'm trying to customize the permalinks for the pages in my collection. The directory looks like this:
writing
|
--file.md
--file2.md
--some-dir/
|
--another.md
--something.md
I want the URLs to be
- /writing/[file-title]/index.html
- /writing/[file2-title]/index.html
- /writing/some-dir/[another-title]/index.html
- /writing/some-dir/[something-title]/index.html
I tried setting my collections permalink
to
permalink: /:collection/:path/:title
but :path
contains the full path (including the filename), instead of just the path to the file's directory.
Is there any way to accomplish this?