A configurable blog engine for your Ember app. Inspired by Middleman but integrated with Ember.
Want to run your blog as a static site, but miss everything you get from an Ember app? Don't want to spin up a Ghost or Wordpress Instance or worry about configuring a load balancer to serve subdirectories just to add a blog?
Ember writer can help.
Features:
- Parses posts written in Markdown format with support for YAML frontmatter
- Written as an engine to mount a fully featured blog at any path
- Builds a static API for articles, tags, and authors
- Includes syntax highlighting for code blocks via highlightjs
NOTE: This addon requires engines, so your app must be running Ember 2.8 beta or later.
We have one known blocker for initial release: See #30 for details.
ember install ember-writer
Router.map(function() {
this.mount('ember-writer', { path: 'blog' });
});
ember g blog-post "My Amazing Post Title"
/*jshint node:true*/
module.exports = [
{
name: "Chris Ball",
image: "https://www.gravatar.com/avatar/6254dc2b7e4f26b2ab5d05c560834671?s=400",
twitter: "cball_",
github: "cball"
}
];
Ember writer will place a config file at config/ember-writer
. Uncomment or change any of these lines to set config options.
// config/ember-writer.js
/*jshint node:true*/
// Use this file to configure Ember Writer. Commented lines are the defaults.
module.exports = {
// dateFormat: 'MM-DD-YYYY'
};
Article summaries are supported by the READMORE
keyword, which is stripped
from the full article body:
---
title: Draft Article
date: Tue Aug 30 2016 12:19:38 GMT-0400 (EDT)
author: Chris Ball
---
I'm a **new** article summary! READMORE
This is the main body:
If you don't supply READMORE
, article summary will truncate at 250 characters.
Create draft articles using published: false
in the frontmatter:
---
title: Draft Article
date: Tue Aug 30 2016 12:19:38 GMT-0400 (EDT)
author: Chris Ball
published: false
---
Draft articles are visible in the development environment only.
Syntax highlighting is provided by highlightjs. Add theme styles to your app (see the dummy app for an example).
To customize article templates, generate a template of the same name in your application. Note: this addon is currently under heavy development, so expect the template structure to change.
This is currently pending (tracked in #30), and is a major blocker for releasing this addon.
Ember Writer is Copyright © 2016 Echobind. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
Ember Writer is maintained and funded by Echobind.
We love open source! See our other projects or hire us to bring your idea to life.