At some point in the career software dev comes up with idea to share his knowledge in the blog. In the blog you can share thoughts, experiences, battle stories.
So you want to have blog. How it should look like? How add content? Where to host?
There are ton of answers on those questions and ready solutions. Medium, Tumblr, Blogger, Ghost, Facebook, Google+ and etc. My answers are simple design, adding content in the most simple way and hosting for free. All of this plus some geekness.
Probably most simple way is writting blog post in text file and host this TXT file on some free CDN like Github Pages. Reading TXT file is boring, espesially in 21th century. So you need at least simple design to entertain readers with fancy text alignment, pictures, media embeddes, fonts and links to other articles. Host simple HTML file but styling articles in HTML/CSS takes time. Write text similar to TXT format but auto-magically formatted for reading. Sounds good. What is this? This is Markdown markup plus tools that allow to format it to HTML with commands and upload it to hosting with another command!
Suggested toolset for blogging includes:
- Install fresh Git version from https://git-scm.com/.
- You need Github account. Read short step-by-step guide on Github Pages how to create you blog repo. At the end you will have
username.github.iogit repo locally on disk.
- Download and install Docker.
- Using docker start container with jekyll, install and generate blog in
cd username.github.io docker run --rm --label=jekyll --volume="$(pwd)":/srv/jekyll \ -it jekyll/jekyll:builder jekyll new /srv/jekyll chown -hR $USER:$GROUP .
docker-compose.ymlthat allow to start jekyll server in docker on
jekyll: image: jekyll/jekyll:builder command: jekyll serve --watch --incremental ports: - 4000:4000 volumes: - .:/srv/jekyll
- Run using one command
- Add new post file in directory
_postswith markdown extension
- Write you post using Markdown
- Check it in the browser
- Commit your blog to git repo
git add --all . git commit -m "my first blog post"
- Push your changes to Github Pages
git push origin
Basically that’s all.
For advanced Jekyll usage read docs https://jekyllrb.com/docs/home/