3

Fairly new to Jekyll, not really sure whether this is possible or the best way to go about it.

I am trying to setup an organization page that automatically includes content hosted in different repos. This way the organization page serves as an index of the content in the individual repos (not the repos themselves).

I haven't been able to find the documentation for this yet. Does anyone know of a way to do this?


Edit:

I don't think my question is being understood so I am revising it here.

I would like the org page to aggregate content from repositories.

Example:

Suppose I am a professor, run a research group, and have students working on different projects. I setup separate repositories for each project so that students can blog about their progress for the project s/he is working on. I can use Jekyll so that anyone can go to my_org.github.io/projectA to read about project A, and my_org.github.io/projectB to read about project B, and so on. However I want someone to be able to go to my_org.github.io/ and see blog posts from all projects.

So why not uses tags or something like that? Because suppose that I don't want students to have access to all of the repos – just the one for that project.

Whenever someone posts to my_org.github.io/projectA or my_org.github.io/projectB I want that content to also be listed at my_org.github.io/.


To be clear I don't want to index the repositories – I want to index the content of the repositories (i.e. the content of the _posts directory).

I don't mind if I have to refresh the organization page – I can just have a script do that once a day. However I don't want to have to also copy or move content into the organization page repo.

1 Answer 1

0

Your main content in userName.github.io in the master branch. You can also point a custom domain on this repository.

Now you can create a project repository (ie: myRepo). This project can host code in the master branch and his documentation in the gh-pages branch. The gh-pages branch generation result can now be reached a userName.github.io/myRepo or customDomain/myRepo.

You main menu in userName.github.io can now have link like <a href="/myRepo">My super project</a>.

Automatic !

Edit : After your edit.

Professor owns github.com/professor account. He creates a jekyll blog in the professor.github.io repository. This allows him to create repositories for students projects.

Professor creates a github.com/professor/projectA and allows student1 and student2 to contribute to it.

student1 and student2 can then commit (if needed) to projectA master branch for code and to gh-pages branch for documentation.

The only thing professor has to do is a link from professor.github.io to professor.github.io/projectA. Content is already in project repository and there is no need to replicate it on professor.github.io.

Maybe the only thing to do is using the same templates and style sheets.

If you really want to replicate content from project repositories in user repository, you will need to :

  • create a Jekyll plugin that index all your project repositories and push content on the user repository
  • install this Jekyll + plugin on a server
  • setup a cron job that start a build each day and push the result on github

Not sure it's the simplest way to do it.

3
  • Won't this only link to the repo -- not to content in the repo? Mar 12, 2015 at 19:24
  • The repository is at github.com/userName/myRepo, the web content at userName.github.io/myRepo. Mar 12, 2015 at 19:26
  • I have tried to clarify my question to better reflect what it is I am trying to do. Mar 12, 2015 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.