Git Product home page Git Product logo

ember-blog's Introduction

Ember Blog

Adds a blog to any Ember CLI application.

  • Write your posts in markdown and HTMLBars
  • Add post metadata using YAML front matter

This addon compiles posts and associated categories into fixtures, adds new routes to your application for rendering that data (e.g. posts, categories, etc), and provides additional blog infrastructure.

Installation

ember install ember-blog

Edit your application's package.json and make sure ember-cli-htmlbars is >=0.7.7. This addon requires htmlbars 0.7.7 or greater.

Usage

Documentation coming soon. This is early stage, currently under testing. In the meantime, see the tests/dummy app for example usage.

Posts are written in the following format and are saved at app-name/posts/any-old-name.js. The file name does not affect the blog post in any way.

---
title: More Ember stuff
description: This is a description of the ember stuff in this article
published: 2014-02-29
author: Some Dude
categories:
 - ember
 - design
---

This is the blog content. I am writing this blog post all about Ember and stuff. This is a lot more content for markdown parsing.

**Some bold blog content**

{{#link-to 'about'}}This is a HTMLBars link{{/link-to}}

Add the blog routes to your application as follows:

import Ember from 'ember';
import config from './config/environment';
import blogRoutes from 'ember-blog/routes';

var Router = Ember.Router.extend({
  location: config.locationType
});

Router.map(function() {

  blogRoutes(this); // Added

});

export default Router;

Once you've added a post and the routes, navigate to localhost:4200/blog and you will see the blog in action!

Complementary Addons

The following addons are great complements to ember-blog to take your app's blog one step further.

Development

For all issues and features requests please open an issue or submit a PR.

ember-blog's People

Contributors

ember-tomster avatar kategengler avatar sukima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ember-blog's Issues

Ember-cli 0.2.5 _templateCompiler no longer exists

Seems _templateCompiler no longer exists. In fact a console.log reveals the following:

{ name: 'ember-cli-htmlbars', ext: 'hbs', toTree: [Function] }

This is probably a breaking change in ember-cli 0.2.5 especially because of the use of a non-documented private function. Any idea where it might have been moved to?

Fixtures should be compiled pre-deploy

The app could be sped up, especially in production, if the app deploys with static Ember fixtures instead of compiling them in an Ember initializer.

This is my attempt so far, but I am having trouble compiling the individual post objects into a single Fixtures object acessible inside the Ember app.

Use grunt (to match ember app kit)

I realize Brunch has some benefits over Grunt, but since https://github.com/stefanpenner/ember-app-kit uses Grunt, do you think there would be benefit to mirroring their approach?

I thought this might be useful, since I use the Ember App Kit not only for building live Ember apps, but also for building static prototypes. It would be great to use your work the same as I use Ember App Kit, whether static or dynamic.

If you think this would be useful, I could take a crack at transitioning. If not, I can probably use Brunch for now!

Does this still work?

Hi @sir-dunxalot, keep finding more and more repos where you have implemented things I need ๐Ÿ˜„ . Does this still work? If not, have you experimented with generating static blog pages with something like hexo or hugo and embedding the output in an ember app? I'm trying to determine the best way to host my blog inside my ember app, as navigating away to ghost right now, is not ideal.

compass dependencies not captured

When I compile (brunch watch -s) I am getting app.css with "ERROR: Cannot load compass."

  1. If compass is a dependency, we should capture that within npm install (or add a gemfile? seems odd to have a ruby dependency?)
  2. In the meantime would you mind confirming which versions of sass and compass you're using?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.