GitHub Pages: Octopress in a subfolder (other pages at the root)

I am in the process of moving my blog from stand-alone Wordpress to ( GitHub-pages powered ) Octopress .

So far, I have successfully set up and copied my blog on myusername.github.com , which has CNAME http://mydomain.com . (So, browsing http://mydomain.com shows my Octopress. Dandy blog.)

I would like to change my setting so that things look like this:

  • http://mydomain.com → Simple html landing page
  • http://mydomain.com/blog → Octopress Blog in all its glory
  • http://mydomain.com/sdf → Simple other simple html sites I would like to host
  • http://mydomain.com/sdfsdfdsf → As above
  • ... (an arbitrary number of other sites at the root level)

However ... I would like my landing page (and other different sites) to be hosted from the repository of GitHub pages and the source stored next to Octopress.

Ideally, «octopress»/source/ would look like this:

  • «octopress»/source/index.html → My «octopress»/source/index.html Page
  • «octopress»/source/blog/* → Normal Octopress source folder (contains _posts , assets , _layouts , etc.)
  • «octopress»/source/sdf/index.html → Other Miscellaneous Sites

So far, I have found instructions on how to deploy Octopress in a subdirectory . But, as far as I can tell, these instructions do not allow you to have other different sites under «octopress»/source/ .

I would like suggestions on how to accomplish what I need. I have a feeling that it will not be difficult (just maybe some tricks to some Jekyll files, maybe).

Thank you very much,

+4
source share
2 answers

If you use Jekyll locally rather than using the version on the github server, you don’t need to do everything in Jekyll - just use the shell script, move several folders between the generation and deployment steps.

After starting Jekyll, all these are static files, and the deployment step simply captures and pushes everything that happens in the output folder at this point.

+2
source

You can change your blog’s index page to blog/index.html , for example a description of the document . Then place the landing page and other sites in the /source directory.

+3
source

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


All Articles