When I decided to write this tech blog, I had to choose for a blog framework…
Let’s choose a blog framework ?
Let’s write my own blog framework !
That’s not an option… Or a very poor choice.
Don’t reinvent the whell.
Many people have already done it and maybe better than what I would do.
Let’s choose “popular” blogs then !
With “popular” blogs, I mean big blogs/CMS like Drupal, Wordpress, Joomla, …
That’s maybe an interesting choice when you want plenty of features and get headaches on those mammoths !
Not for me. I hate all of these and for sure that’s not the good choice for a simple techie blog.
What’s left then ?
When you don’t to write your own blog framework or use the “popular” ones, you have to look for less known frameworks.
They may not be as popular but they are perfectly suited for my need : simple, responsive and nice to handle frameworks.
What I want is something easy and kind of “plug ‘n play”.
What’s easier than focusing on writing and everthing comes in place by magic ?
Something like… let’s say… Markdown and static HTML pages generation ?
Generated blog is for you !
Generated blogs do exists and luckily, I’m not alone in this world and many people already had the same need and will than I !
Very nice projects exist such as :
Jekyll is a nice project but based on ruby on rails and I don’t want a new technical dependancy. I don’t/use ruby so I’m out no this.
Hugo has the same drawback for me : build is based on Go and I dont go Go ;)
Hexo.io is based on npm and Node.js and nowadays everyone has npm and/or Node.js installed, even me !
We have a winner : Hexo.io
So let’s sum up, hexo.io :
- A fast, simple & powerful blog framework
- Based on markdown
- Handles theming (templating with Jade or ejs)
- Plugins friendly (CoffeeScript, Jade)
- Automated deploy (Git, Heroku, Rsync, OpenShift, FTPSync, SFTP, custom…)
- Everything is done through a single CLI (Command Line Interface) command : hexo
What about hosting ?
Any hosting service with a web server is suited since what you deploy is HTML, CSS and JS files
I have decided to use Bitbucket Pages on my free bitbucket account.
Hexo.io & Bitbucket Pages : Howto
1. Requirements
2. Install Hexo.io
Install hexo-cli :
Check if hexo-cli install is ok :
3. Create your project using your Bitbucket Pages account
Make sure you already created you Bitbucket Repository for hosting your blog.
How to use Bitbucket Pages
For the sake of this tutorial, let’s be clear about some datas :
- thedigital : my Bitbucket account
- thedigital.bitbucket.org : my Bitbucket repository for my Bitbucket Pages
Create your local project :
4. Test your local installation
Open your browser and test “http://localhost:4000/“ : Hexo.io default blog should display
5. Configure your blog
official documentation : https://hexo.io/docs/configuration.html
Edit and configure your config file :
6. Configure Git deployment
official documentation : https://hexo.io/docs/deployment.html
Install Git pluin for Hexo.io :
Configure your _config.yml file :
**7. Automatic page generation
official documentation : https://hexo.io/docs/generating.html
When you write, you want to see how it displays. Nothing is messier than having to generate the corresponding static page after every change…
Hexo.io provides a command that automatically generates static pages on content modification.
|
|
8. Create your first post
official documentation : https://hexo.io/docs/writing.html
|
|
Check http://localhost:4000/, your post in now available.
9. Let’s go online !
|
|
This is now online : https://thedigital.bitbucket.io/ !
10. Plenty of other features
Just check official documentation : https://hexo.io/docs/
Just a few links :
- helpers : https://hexo.io/docs/helpers.html
- variables : https://hexo.io/docs/variables.html
- plugins : https://hexo.io/docs/plugins.html
- themes :
- existing themes : https://github.com/hexojs/hexo/wiki/Themes
- create your own : https://hexo.io/docs/themes.html
Please feel free to leave me a message below.
|
|