DEV Community

Cover image for How to Start a Blog with Vim
PythonBasics
PythonBasics

Posted on

How to Start a Blog with Vim

If Web technologies got out of the way, what would the Web be?

These days JavaScript frameworks are all the rage. Long term though, will this framework be around?

The answer is probably no (The Brutal Lifecycle of JavaScript Frameworks). JavaScript frameworks come and go, who is still using ExtJS or MooTools?

For a blog you want technology that lasts and you don't want your blog to turn into work.

tech deprecated

If you use WordPress you'll quickly find it starts to become work: installing updates, updating the server, your plugins will be deprecated, (frameworks) plugins use will stop to be supported etc

But what will be around in the next 10 years? Linux and bash scripting and plain HTML files.

Create blog with vim

You can use bashblog, a simple bash script that converts Markdown to HTML.

Simply download the script then edit your post in files. And finally upload your html files to your server.

I recommend using vim for text editing because it's a very powerful editor. This is an editor often used by Linux users.

To create your first post, first make the script executable:

chmod +x bb.sh
Enter fullscreen mode Exit fullscreen mode

Then just run:

./bb.sh post
Enter fullscreen mode Exit fullscreen mode

Be aware that vim has a steep learning curve. For now know that you can use ZQ to quit, learn vim first. There's a vim tutorial at vim.is

Once you wrote your posts, upload them to your server. The neat thing is that this solution will work 10 years from now - zero work ;-)

blogging in vim

Another advantage besides that this will work for the next 10 (or 50?) years is the security benefit.

  • There is no database, the database cannot be hacked.

  • There is no login screen, nobody can hack your login (as opposed to the WordPress /wp-admin/ that's always under constant attack).

Oldest comments (0)