Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
Go to file
Hannah Wolfe bb6880ea49 closes #33 - api example
Moving towards using an API which we can both expose publicly, and use internally.
Due to issues with JugglingDB, this breaks updating contentHTML on edit
Also, language, status, featured etc are all no long set / updated.
2013-05-16 12:21:13 +01:00
content adding Casper as a submodule of Ghost 2013-05-11 17:46:16 +01:00
core closes #33 - api example 2013-05-16 12:21:13 +01:00
docs Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00
.afignore Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00
.gitignore Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00
.gitmodules Updates to travis setup to cope with the submodule. 2013-05-12 21:22:58 +01:00
.groc.json Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00
.travis.yml (Even more) updates to travis setup to cope with the submodule. 2013-05-12 22:21:25 +01:00
app.js closes #33 - api example 2013-05-16 12:21:13 +01:00
config.js Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00
config.rb Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00
Gruntfile.js Remove predefined globals list in favor of node:true and browser:true 2013-05-14 10:07:41 -05:00
LICENSE Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00
package.json closes #33 - api example 2013-05-16 12:21:13 +01:00
README.md Adding the much coveted Travis-ci build badge 2013-05-13 21:46:49 +01:00

Build Status

Ghost

Welcome to the Ghost core repo. The code here is the result of a few stolen hours of free time hacking a proof of concept for the Kickstarter video. Pretty much everything is subject to and expected to change.

The top priorities right now are:

  • Having a core RESTful API and consuming it internally
  • Data model design & implementation - including a potential switch from JugglingDB to bookshelf.js
  • Authentication and ACL
  • Improving core architecture & design - modular structure, better dependency injection, testable code with tests

###To Install:

Note: It is highly recommended that you use the Ghost-Vagrant setup for developing Ghost.

  1. Clone the git repo
  2. cd into the project folder and run npm install.
    • If the install fails with errors to do with "node-gyp rebuild", follow the Sqlite3 install instructions
  3. cd into /core/admin/assets and run compass compile --css-dir=css

Frontend can be located at localhost:3333, Admin is at localhost:3333/ghost

Sqlite3 Install Instructions

Ghost depends upon sqlite3, which has to be built for each OS. NPM is as smart as it can be about this, and as long as your machine has all the pre-requisites for compiling/building a C++ program, the npm install still works.

However, if you don't have the required pre-requisites, you will need to either get them, or as a shortcut, obtain a precompiled sqlite3 package for your OS.

I have created some of these, and they can be obtained from this GitHub issue.

The pre-compiled package should be downloaded, extracted and placed in the node_modules folder, such that it lives in node_modules/sqlite3, if you have a partial install of the sqlite3 package, replace it with the files you downloaded from github. Be sure that all the sqlite3 files and folders live directly in node_modules/sqlite3 - there should note be a node_modules/sqlite3/sqlite3 folder.

###Dependencies:

  • express.js framework
  • handlebars for templating
  • standard css for frontend
  • sass for admin (pre-compiled)
  • moment.js for time / date manipulation
  • underscore for object & array utils
  • showdown for converting markdown to HTML
  • nodeunit for unit testing
  • sqlite3 for data storage
  • jugglingdb ORM for interacting with the database
  • Polyglot.js for i18n

Frontend libraries:

  • jQuery 1.9.1
  • showdown for converting markdown to HTML
  • codemirror editor

Working features:

  • Dashboard
    • new post link
  • Admin menu
    • G, dashboard, content, new post & settings menu items go to correct pages
  • Content screen
    • Lists all posts with correct titles (incorrect time etc)
    • Select post in list highlights that post and opens it in the preview pane
  • Write screen
    • Live preview works for all standard markdown
    • Save draft button saves entered title & content. Everything is published by default.
    • Editing/opening existing post puts correct info in title and content panels & save updates content.
  • Database
    • The database is created and populated with basic data on first run of the server
    • New posts and edits save and last forever
    • The data can be reset by opening data/datastore.db and emptying the file. The next restart of the server will cause the database to be recreated and repopulated.
  • Frontend
    • Homepage lists a number of posts as configured in config.js
    • Clicking on an individual post loads an individual post page
    • Date formatting helper uses moment

Front End Work

A SASS compiler is required to work with the CSS in this project.

Run compass compile --css-dir=css from /core/admin/assets.

We also recommend CodeKit (Paid/Mac) and Scout (Free/Mac/PC).