Skip to content

Instantly share code, notes, and snippets.

Last active Apr 26, 2018
What would you like to do?
Ember.js publishing tools

Ember publishing tools

This document is intended as a "scratchpad" to think through Ember-based systems.

CMS Design Requirements

  • MUST have a content store
    • Content MAY be stored with source
    • Content models MAY be related to other, differently-formed content models
  • MUST support POJO content metadata
  • MUST NOT store content in app bundle
  • MUST support lazy-loading item content vs metadata
  • MUST support components, actions, state-passing to loaded content

Userspace Example

  • Public example at
  • Content is generated from .mbs (markdownbars :) files in arbitrary directory (link)
    • Content may use simple hbs component invocation (link)
    • Content may also use blocks (link)
  • Critical metadata may be fetched in route hooks: (link)
    • While this example uses an ember-data model, this is not a requirement. You can consume asyncResource.fetch directly (link)
  • Async content is easy to use:
    • Just fetch it—protip: do this with e-concurrency (link)
    • Then present it (link)

Here's a relevant diff

Current state

  • ember-cli-hyde: published 0.2.4
    • Supports passing arbitrary dirs to parser, which collects .yml, .md, .mbs files and outputs an analogous tree with the resulting .json metadata & .m* content
    • Supports pre-configuring prember URLs to content paths
    • Files are added to + preprocessed in the template tree
  • ember-cli-markdownbars: unpublished, in-repo addon in the Cook For Mom project
    • Supports handlebars syntax in Markdown content
    • Works for any .mbs content in the template tree
  • ember-async-layout: unpublished, in-repo addon in the Cook For Mom project
    • FastBoot-safe tools for fetching arbitrary content; useful when developing on your fs, but publishing to CDN
    • Includes easy fn to download and register precompiled template files from trusted remote hosts
    • Includes lightweight, tagless component to present downloaded templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment