-
I’m looking to include some markdown files that are in a folder /foo/bar/file.md from the root of my repo in my GitHub pages Jekyll site. I’ve tried symbolically linking the folder to the right location in /docs/_pages but GitHub gives me the error:
I understand that as my site is being hosted from /docs in my repository, by linking to /foo/bar, I am linking to a file outside the sites folder but how do I include this folder considering that they are in the same repo? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
As I wanted to keep my site in the /docs folder I used GitHub actions to copy the relevant files on every push. |
Beta Was this translation helpful? Give feedback.
-
My prior soultion gave the issue that for every commit I made, an additional commit was made to copy the files into their locations in the /docs folder. To fix this I linked to the files the other way around. This is to say that I kept my site documents in the /docs folder and linked the contents to folders elsewhere in the repo. In hindsite this makes much more sense and uses the symbolic links as shortcuts to my messy /docs folder. It also fixes the issue of having multiple commits for a single push. |
Beta Was this translation helpful? Give feedback.
My prior soultion gave the issue that for every commit I made, an additional commit was made to copy the files into their locations in the /docs folder.
To fix this I linked to the files the other way around. This is to say that I kept my site documents in the /docs folder and linked the contents to folders elsewhere in the repo.
In hindsite this makes much more sense and uses the symbolic links as shortcuts to my messy /docs folder. It also fixes the issue of having multiple commits for a single push.