0
votes

I have a GitHub organization where I publish a webpage from the repository orgname.github.io. Of course, I have several project repositories where I'd like to host documentation about those projects. This is all possible through GitHub Pages.

However, I'm not sure how to synchronize the configuration of the organization page with the project pages. I want the website to look the same whether I'm at http://orgname.github.io or if I'm at http://orgname.github.io/project.

What can I do to keep the Jekyll-based configuration in sync?

2

2 Answers

2
votes

This is the solution we've come up with:

  1. Create a repository to contain the Jekyll configuration, jekyll-website.
  2. Fork/copy the repository to the repository <orgname>.github.io.
  3. In every project, create a git subtree as the docs directory.

Whenever you need to make change to the look/design of the webpage, do it in jekyll-website, then pull those changes into <orgname>.github.io and all the project subtrees. This is a little bit of work whenever you need to make changes to the website, but it gets the job done.

0
votes

Since the Github pages sites are hosted in the gh-pages branch of their respective repos, they are independent from each other and the project pages.

I'm assuming your content will be unique for each repo, so you're asking about syncing the theme/structure etc, which as far as I know that cannot be synced. I would recommend choosing a Jekyll theme for all of your sites and stick to editing content.