How to deploy an Octopress blog to an existing static gh page site?

Therefore, deploying to the gh-pages branch on Github with Octopress is relatively simple. It is written here .

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

So, how do I save a static site when deploying my blog using blog.mydomain.com or mydomain.com/blog , where I use gh-pages to manage the Octopress blog and the static site for mydomain.com .

I also checked these instructions for moving the blog to something like blog/index.html ... but it seems like it doesn’t quite allow me to completely separate my static site from the blog. It seems that styles can overlap with a lot of other drama. I would rather keep them separate.

Is it possible?

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

+4
source share
2 answers

I finally figured out how to do this, and I described it here in detail here .

Hope this helps anyone struggling with it - just like me.

+1
source

By default, Octopress publishes your blog on the pages of a user or organization on Github. I think you will need to deploy your blog on Project Github Pages. See here for a description of the difference.

This means that you will have another branch named gh-pages .

  • Your existing static site will be in the master branch and will be deployed to username.imtqy.com .
  • Your blog will be in the gh-pages branch and will be deployed to username.imtqy.com/projectname

That sounds pretty encouraging, and it could be that with some carefully tuned CNAME records, that might be enough.

Edit

There are deployment instructions on the Github project pages in the With Github project pages (gh-pages) section of the deployment instructions page.

A possible alternative would be switching locations. That is, leave the blog in the master branch (and expand it to username.imtqy.com ) and put your existing static site on the project page username .imtqy.com / project_name . You can then set up CNAME records so that blog.mydomain.com and site.mydomain.com point to the right places.

0
source

Source: https://habr.com/ru/post/1501796/


All Articles