Nov. 6th, 2013

Thoughts for the day

Dev Notes on Ghost for Contributors

Overview of Ghost Codebase

Looking to help contribute to Ghost I first needed to get a grounding of the codebase and an overview of the project. More specifically I wanted to know what features exist or do not exist and where they fall within the milestones. I hope that this analysis/overview is helpful for others.

Features and Functionality under review * Photo Uploads * Static Pages * Importers (tumblr) * Plugin Status * Ghost Admin Architecture

Photo Uploads

Overview of the state of image uploads for Ghost posts and theming.

Current State of Uploads as of 0.3.3

Post Photo Uploads

When creating content posts with Ghost, the html5 drag-in-drop target markers will auto-upload any image dropped in. The defined target is ‘content/images///

Once an image is uploaded it can not be deleted from the file-system via the UI - clicking the trash icon only removes the markdown url link.

Blog Logo/Cover Uploads

These uploads are also sent to the ‘content/images/// target. There must be a link-ref stored in the db.

Future of Photo Uploads - Milestone 0.4

There is an active branch image-refactor where a configuration option is set to upload images to the local file system or to s3 - issue. It appears a working version is available, I’ve yet to pull it and test.

Static Pages

There is a github-issue with two pull-requests from halfdan and egdelwonk

To try the static page feature out do the following from project root.

git checkout -b 969-static-pages

git remote add halfdan
git remote add egdelwonk

git pull egdelwonk feature/969_static_pages
git pull halfdan 969-static-pages

You may have a small merge conflict between their two naming schemes. I tried just pulling halfdan first but his pr alone wasn’t enough the static page toggle wouldn’t work correctly. So you will want to pull both. Unfortunately static pages will not allow you to set url paths like projects/code/Glaxal


Currently my website is powered by django which is pulling my posts from tumblr. Ghost currently has a separate milestone for importers. Based on issue #950 an import path works for wordpress and tumblr - using the tumblr-wordpress plugin. Need to test this functionality and figure out the ideal export methods from the tumblr-wordpress export tool.

Plugin Status

There is a considerable amount of progress made towards plugin architecture according to issue #769. The issue is marked as top priority and regarded as part of the 0.4 milestone release. The dialog contains a link to a working plugin and how it would ideally integrate and function within Ghost.

Ghost Admin - Backbone Review

The Ghost Admin interface is built using backbonejs and all the src files are located in the /core/client/ directory. These files are combined into a handful of javascript files and placed in the /core/built/scripts/ folder by grunt.

The best place to start reading the admin javascript code is in /core/client/init.js and /core/client/router.js. These two files show how a Ghost js namespace container is created and then Models, Collections, Layouts, Views, and Validate are then hung off the Ghost app. Handlebar templates (hbs) files are located in /core/client/tpl/.

Backbone Architecture


The models/base.js file contains a single model called TemplateModel which has one method override for fetch which acts as a wrapper for NPProgress.

Models that extend TemplateModel

  • User
  • Posts
  • Themes
  • Widget
  • Settings
  • uploadModal

Collections that extend TemplateModel * Tags [not sure how this collection extends a model?]


The following model files contain a corresponding collection

  • Posts
  • Tags [contain no model?]
  • Widget


All the primary Ghost views inherit from two levels. First there is the


Which contains a the basic template/rendering methods that all views will inherit.

The next inheritance layer and primary view class used


Which will contain several methods such as addSubView and removeSubView that allow you to compose your backbone views. A great example of this is the admin editor which contains several nested Subviews for the various components (publish bar, actions widget, and uploads).

Tumblr - 2:40 PM

Aug. 12th, 2013

Thoughts for the day

Finding the Future of Programming

A few weeks ago someone had linked to this incredible performance by Bret Victor, 4-5 minutes into the video you will realize why I say performance instead of presentation. Regardless, he hits on the key issue that our methodology of programming hasn’t changed in nearly 40 years.

Fast forward to now. I saw the announcement of noflo on kickerstarter and instantly became a backer. Whether or not this will be the future, I’m glad someone out there is trying to find it.

I’m looking forward to giving noflo a try. Mongoose-Fixture maybe a candidate for noflo conversion. Followed by the release of several additional game components that are in the works.

Tumblr - 11:46 AM

May. 10th, 2013

Thoughts for the day

Apr. 24th, 2013

Thoughts for the day

Mongoose-Fixture Release 1.1.2

Mongoose-Fixture has been in development for the past several months as I’ve been working on Glaxal. It has grown out of my necessity to easily load static game-data assets into mongoDB.

NPM install just simply type

npm install -g mongoose-fixture

you may also want to read the Getting Started Section

Tumblr - 8:43 PM

Apr. 18th, 2013

Thoughts for the day

Mar. 13th, 2013

Thoughts for the day

Console Disruption

Incredible insight from Horace of Asymco on video game / console disruption.

His analysis around mark (30mins) about teen usage is dead on. There is an underlying disruption happening in the console business as my generation (pc & console gamers) are being replaced by the next generation of gamers that are all about mobile devices. I’ve seen this first hand during a birthday party where I met several teens that play minecraft on an ipod-touch.

Tumblr - 2:31 PM

Feb. 13th, 2013

Thoughts for the day

Jan. 10th, 2013

Thoughts for the day

Bower - NPM for FrontEnd Development

I remember a discussion on the nodeup about people putting front-end js libraries in npm and whether or not that was a good thing. The dev team at twitter has built a front-end js version of npm called Bower which uses a ‘component.js’ file that then installs your js code dependencies. Not sure how exactly it will merge into the development tools for the javascript community. But think this Bower project could have some legs.

Tumblr - 10:40 AM

Oct. 12th, 2012

Thoughts for the day

Learning to Node Tip


module.exports = function(){
     // keep it simple


Tumblr - 10:42 AM

Sep. 28th, 2012

Thoughts for the day


Managing the state of a frontend application interface, it starts out simple, but with each feature the complexity builds slow like a wave. And before you know it, the wave crashes overtop knocking you on your ass.

Tumblr - 2:32 PM

Aug. 31st, 2012

Thoughts for the day

Coffeescript Docco an Installation Guide (Ubuntu or Mac OSX)

Docco is a documentation generator that has a beautiful interface for reading code. I’ve also recently been using it to document json structures that I’m modeling for a side project.

Configuring the generator should take only 3-5 mins.


First, you will need nodes/npm installed. If do not have these configured please go to nodejs.

Secondly, outside of the javascript modules installed via npm. Docco uses pygments a python library that handles the syntax-highlighting. Installing this library is easy and will be covered.

Onto the Installation

Use npm to install the followings modules Note the use of -g parameter to do a global install. These modules have bash commands associated with them and will work best as global installs.

sudo npm install -g coffee-script
sudo npm install -g docco

Configuring Pygments will require the installation of pip which is python’s version of npm.

sudo easy_install pip
sudo pip install pygments

That should complete the installation


To use docco go into your local folder containing .coffee files and use the bash command

docco *.coffee

This will create a local folder ./docs/ which will contain .html files for every .coffee file.

Tumblr - 10:43 AM

Jul. 31st, 2012

Thoughts for the day

" Resolving deltas, check back later "

Tumblr - 11:05 AM

May. 23rd, 2012

Links for the day

May. 22nd, 2012

Links for the day

Viewing 231 of 231 Older Entries >