Red Hat Nordics SA Demo lab

We are Red Hat Solution Architects, in this blog we are sharing content that we have used to create our own demos and labs. Some of it has proven to be useful starting points for our customers and partners. You are free to use it as is. If you use it, and it breaks your stuff, you get to keep both pieces ;-). Ansible, Tower, CloudForms, Satellite, RHV, IdM, RHEL, Gluster, Ceph. Disclaimer, This is not a Red Hat official blog, nor a service and we will not provide support on this.

18 February 2019

Writing new blog on Jekyll

Written by Ilkka Tengvall

The Challenge - How to write new blog on Jekyll

I was asked how to write a new blog into our Jekyll. It’s really straight forward. Here’s list of steps you need to do.

  1. Clone this repository: git clone git@github.com:RedHatNordicsSA/RedHatNordicsSA.github.io.git
  2. Make sure you have Jekyll installed, instructions for RHEL
  3. If on RHEL, enter software channel: scl enable rh-ruby23 bash
  4. Edit your blog in _posts directory, create new file with name: YYYY-MM-DD-topic.markdown. e.g. atom _posts/2019-02-18-new-post.markdown
  5. Add header to post, like in this topic:
    ---
    layout: post
    title:  "Writing new blog on Jekyll"
    date:   2019-02-18 15:20:00 +0200
    tags: jekyll
    author: ikke
    ---
    
  6. Start writing using markdown language. If you want to attach e.g pictures, add them to assets/images -directory. We use Hacker theme for now, see their example here.
  7. Once done, make sure the date and time in header is passed, or drop the post into _drafts folder. Jekyll uses the time to publish blog only after given time.
  8. Try locally by starting local Jekyll server in repository directory (bundle install is here just in case you skipped something):
      bundle install
      jekyll serve
    

    Now you can browse to http://localhost:4000 to review your blog. If you dropped the blog into _drafts/, add --drafts to command.

  9. Once happy, do git status to verify no junk is added, and do git add for added files, and git commit and git push
  10. After few seconds, your blog should be visible at site blog list.

For reference, see this blog markdown file.

Happy Writing!

BR,
ikke


Written by Ilkka Tengvall   Twitter Linkedin Github
I work as an SA at Red Hat Nordics, mainly with speeding things up using automation and hybrid cloud.

tags: random