Testing locally, linking to another repository #23400
-
In my rgplantz.github.io I have an I would like to test things locally. I cloned both repositories to my computer. From within the Is there any way to get this link to work locally like it does on the GitHub server? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If it’s a separate repository, rather than just a directory inside the same repository, then there isn’t a way to make this work locally too, no. To get it to work locally you’d need to clone the second repository and host it using |
Beta Was this translation helpful? Give feedback.
-
Thank you, thomasshaped. Pretty much as I had guessed. This is a site for two books. I’m providing both answers (text and figures) to exercises and code source. I originally thought that a good organization would be to place the code source files in the main branch and the answers in the gh-pages branch. Now I’m thinking that a better organization is to place the answers in separate directories in the primary pages repository (rgplantz.github.io) and the code sources in separate repositories. That would easier for me to work locally on the answers text. |
Beta Was this translation helpful? Give feedback.
If it’s a separate repository, rather than just a directory inside the same repository, then there isn’t a way to make this work locally too, no.
To get it to work locally you’d need to clone the second repository and host it using
bundle exec jekyll serve
, but it would also need to be served on the same port4000
, which isn’t possible if you’re running 2 separate webservers to host both repos locally.