How to save both my _site and jekyll build on github

Now I have the following setting:

My jeyll build is in ~ / jekyll sites

My .git folder is located in ~ / jekyll-sites / _site

Now I can synchronize the created jekyll ~ / jekyll-sites / _site with my repo: https://github.com/nielsrasmus/nielsrasmus.imtqy.com

and it works great.

But I would also like to keep the whole jekyll build on github.

Question: Is it possible to make another repo called: nielsrasmus.imtqy.com-source and synchronize the whole jekyll assembly here?

If so, what would be the best way to do this?

I looked through so many answers that do not quite match what I want. So I'm pretty confused right now: - /

+6
source share
2 answers

I think I solved the problem.

I installed the github version for mac and staggered, read a lot of man pages, and finally I was able to do this :-)

This helped me

What helped me was to click the β€œ+” sign at the bottom of the screen, as shown in the screenshot. Here I could specify my repositories in a local directory.

nielsrasmus / jekyll-sites: points to the root of the jekyll assembly.
nielsrasmus / nielsrasmus.imtqy.com: points to the generated site in ~ / jekyll-sites / _site

+1
source

Until you use Jekyll plugins, you can actually push your Jekyll source into Github, and their servers will automatically generate in the _site folder and submit it to you. You will not see that this _site directory appears in your repository , but the generated files will be accessible from http://nielsrasmus.imtqy.com

A great link on how to do this: Tom Preston-Warner's personal blog , which (naturally) is posted on the Github pages . Notice that he placed the _site directory in his .gitgnore file , and Jekyll says, β€œIt's probably a good idea” for you to do the same, but you could skip this part.

Both you and Tom use the "Custom Pages" option, so your site is generated while your content is in the main branch (if you used the project pages, you would use the gh-pages branch instead).

+7
source

All Articles