Get blogging with node.js and wintersmith
I had a ghost blog but felt silly paying $10 a month. Now I enjoy blogging about things I make. We will create a blog using wintersmith.
Generate blog and install
$ npm i -g wintersmith
$ wintersmith connorsblog
$ cd connorsblog
$ wintersmith preview
So now we're happy, we have a static blog. We're a little peeved because there's no apostrophe when blog is in fact possessive, but computers -- what can you do.
Do not add git yet.
Add author
Go into contents/authors/<your_name>.json
. So I made a connor.json
and it looks like:
{
"name": "Connor Leech",
"email": "connorleech@gmail.com",
"bio": "Connor made this blog"
}
Create an article
They are called articles, not posts. It is a blog article in wintersmith, not a blog post. Enough of that. We will create a new article. There are many example articles in the blog template with notes about how to use wintersmith. Score. +1
$ mkdir articles/my-first-article
$ touch contents/articles/my-first-article/index.md
Our article file looks like:
---
title: My First Article on Wintersmith
author: connor
date: 2015-09-22
template: article.jade
---
Hello everyone.
> I am so excited to have a customizable free blogging platform where I can
###### Write in
`markdown`
and write **javascript** and *jade*
You have made an article on your blog! Now start customizing and writing.
Build
$ wintersmith build
Deploy
Written by Connor Leech
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Blog
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#