Frage

So deploying to a gh-pages branch on Github with Octopress is relatively simple. It is spelled out here.

However, I already have a static site hosted on my gh-pages branch (and the source stored in the master branch).

So how do I keep my static site, while deploying my blog to just either a blog.mydomain.com or mydomain.com/blog where I am using gh-pages to manage both the Octopress blog and the static site for mydomain.com.

I also checked out these instructions for moving the blog to something to like blog/index.html...but it seems like it doesn't quite allow me to fully separate my static site from the blog. Seems like the styles may overlap and lots of other drama. I would rather keep them separate.

Is this even possible?

If not...is there a workaround to achieve what I want?

War es hilfreich?

Lösung

I finally figured out the best way to do this, and I have done a thorough write-up about it here.

Hope that helps anyone else that struggles with it - the way I have.

Andere Tipps

By default Octopress publishes your blog to User or Organization Github Pages. I think you'd need to deploy your blog to Project Github Pages instead. See here for the description of the difference.

This would mean that you would have another branch called gh-pages.

  • Your existing static site would be on the master branch and would deploy to username.github.io.
  • Your blog would be on the gh-pages branch and would deploy to username.github.io/projectname

This sounds quite hopeful, and it may that with some carefully configured CNAME records, it may be enough.

Edit

There are instructions for deploying to Github project pages in the section With Github Project pages (gh-pages) on the deployment instructions page.

A possible alternative would be switch the locations. That is, leave the blog in the master branch (and deploy it to username.github.io) and put your existing static site in a Project page at username.github.io/projectname. Then you can setup CNAME records so that blog.mydomain.com and site.mydomain.com point to the right places.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top