Skip to content

spygi/tech-blog

Repository files navigation

My tech blog built with Jekyll and published on Github pages. Uses the basically basic from this awesome guy.

Writing

Locally

  • Posts go under _posts (or _drafts)
  • bundle exec jekyll serve (check incremental builds, autogeneration)
  • Navigate to localhost:4000/

Publishing

Setting up

Resources

Configuration on Github (pages) side

  • Regarding repos/branches: You can use Github Pages once per user/organisation (special repository named "spygi.github.io", master branch) or per project (on master branch, master branch /docs folder or special "gh-pages" branch). This repo is using the per repo method with the master branch (not /docs). Serving through Github pages

  • _site is .gitignored (that's where Jekyll puts its output)

  • CNAME file for custom domain.

Jekyll configuration

  • Added the github-pages gem in the Gemfile

  • Ideally I would like to host this under a spygi.me/tech url but this is not possible with DNS since DNS works on another layer. For that I tried various combinations of the baseurl parameters in _config.yml in order to both run locally and still have CSS and other assets correctly linked in Github.io. At the end, I used a different subdomain with an APEX as explained here

Theme configuration

  • Regarding themes the easiest way to publish on Pages is by using one of the Github pages supported themes. You simply add them on the Gemfile and _config.yml and you are done.
  • I didn't find something that I liked so I added Travis integration following instructions from the Jasper 2 theme. The idea is by pushing to master, a Travis job is started to build the site with Rake and then push it to the gh-pages branch. For more details see the related post. This is not required anymore since Github added full support of any Github-located theme. I just use remote_theme: owner/name in _config.yml

Credits

Initial inspiration by Laurent Pellegrino's blog and Marco's though neither of the the 2 worked out of the box for me: Laurent's worked locally but when pushing on Github.io, CSS and other static assets where not linked correctly (tried various combinations of base_url and relative_url but then linking of the pages would not work) and Marco used the special user repo method which I want to keep free for other stuff.

Thanks to Michael aka mmistakes for the theme.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published