README
PLEASE DO NOT USE YET, VERY UNSTABLE/NOT WORKING 🍰
Markdown driven blogging
Minimal markdown blog builder.
Homepage
🏠Quickstart
npm i plix -g
plix new my-fabulous-blog
cd my-fabulous-blog
plix page my-first-page
plix build
plix.json
In the root of your generated blog you will find the plix.json
file.
Here is the default:
{
"title": "My New Plix Blog",
"theme": "simplest",
"themeData": {
"headerOverlayColour": "rgba(59, 48, 84, 0.6)"
},
"author": {
"name": "Blog Owner",
"bio": "Insert your bio here",
"photo": "https://i.pravatar.cc/300",
"job": "Describe your job here."
},
"social": {
"Twitter": "leenattress",
"Github": "leenattress",
"LinkedIn": "leenattress"
},
"links": {
"Home": "/",
"Github": "https://www.npmjs.com/package/plix",
"NPM": "https://www.npmjs.com/package/plix"
}
}
This file is passed into every page, its a good place to keep global key/values such as settings specific to your blog.
Template language and concepts
Plix uses Nunjucks for it's templates and you will find only a single file in the theme folder: page.html
.
This page contains all the necessary logic to create not only the homepage and it's numbered indexes, but the blog content page. Remember that Plix is a minimal blog engine, so we deliberately dont get complicated. We want the simplest possible blog.
Each markdown you'll notice has some metadata at the top. This is not rendered as part of the page, but rather extracted and available in the Nunjucks template. This is the structure of the data available in the Nunjucks page:
{{pageTitle}}
is the title found in the markdown meta-data.{{pageDate}}
is the data found in the markdown meta-data.{{pageContent}}
is the html, rendered using the markdown found in the remainder of the file.{{pageLink}}
is the filename of this file, with a html extension.{{pageFeaturedImage}}
is the path to a featured image for this blog entry.{{siteConfig}}
is the config, found inplix.json
{{siteConfig}}
, by default contains the title of your blog, as well as any data you see fit to put in there.
You can access the data like this: {{siteConfig.title}}
or {{siteConfig.author.name}}
.
For more help creating a template in Nunjucks see here, or open page.html
in your favourite editor to take a look at a simple example, with loops and conditional statements in Nunjucks.
Author
👤 Lee Nattress leenattress1981@gmail.com (http://leenattress.com)
- Twitter: @leenattress
- Github: @leenattress
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2019 Lee Nattress leenattress1981@gmail.com (http://leenattress.com).
This project is ISC licensed.
This README was generated with ❤️ by readme-md-generator