I have a Jekyll website hosted on GitHub Pages. Now I am having so many pages and I would like to manage them in a folder called _pages
. I ideally want to have this structure:
root
|-> _pages
|-> Index.md
|-> contact.md
|-> cv
|-> cv.md
|-> my_cv.pdf
|-> _posts
|-> [other things such as config and gemfile]
This I have done defining default permalinks in the _config.yml
adding:
include:
- _pages
defaults:
- scope:
path: "_pages"
type: "pages"
values:
permalink: /:basename/ # make URL of pages in the folder _pages as on the root.
That works perfectly.
However, as you see inside the _pages
I would like to have another subfolder named cv
and put my cv.md
and my_cv.pdf
in the same folder (in the actual website I have much more of these files for pages.). Ultimately I would like to have a benefit of using [Download my CV](my_cv.pdf)
relative local linking, which I suppose because the pdf and the .md file are in the same folder it will recognize it. However it is not the case. cv.md
has the permalink of /cv/ and not the cv folder. So when I use [Download my CV](my_cv.pdf)
it creates root/cv/my_cv.pdf
where this pdf file actually does not exist!
How can I manage to fix this thing? what is your trick?