simpleblogmaker
v0.1.6
Published
a really quick static blog creator from markdown
Downloads
1
Readme
What is this?
A quick static web blog creator, for quickly pulling together a vanilla 1990s blog. A bit of a hack. Not ready for use.
Create a folder for your blog and install
mkdir blog && cd blog
npm init
npm install static-blog-builder --save
Create homepage:
touch index.html
add the following:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="Description" content="">
<title>Posts</title>
</head>
<body>
<h1>Posts</h1>
<ul>
{{#each this}}
<li><a href="{{link}}/index.html">{{title}}</a></li>
{{/each}}
</ul>
</body>
</html>
add a blog template
touch blogtemplate.html
Add the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{title}}</title>
<meta name="Description" content="Post about {{title}}">
</head>
<body>
<a href="../index.html">Back to contents</a>
<h1>{{title}}</h1>
{{{body}}}
</body>
</html>
Create a folder called posts
mkdir posts
cd posts
Add a new folder for each post
mkdir helloworld
cd helloworld
Inside each folder, create a file called post.md
and add your post in the following format:
---
title: Hello World
description: A description of the post
date: 2020-06-15
status: published
---
Your content in markdown here...
- Apple
- Orange
- Fruit
Each folder contains a post.
Add build script to package.json
"scripts": {
"build": "build"
}
To generate site run
npm run build