diff --git a/.gitignore b/.gitignore index 0e80248..1325818 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ node_modules -bower_components # Logs logs diff --git a/bin/deardesi.js b/bin/deardesi.js index 7550824..c41f625 100644 --- a/bin/deardesi.js +++ b/bin/deardesi.js @@ -5,6 +5,7 @@ var PromiseA = require('bluebird') , path = require('path') , cli = require('cli') , UUID = require('node-uuid') + , Desi ; cli.parse({ @@ -12,6 +13,13 @@ cli.parse({ //, output: ['o', 'name of output directory within ~/path/to/blog', 'string', './compiled'] }); +function init() { + Desi = require('desirae').Desirae; + + Desi.registerDataMapper('ruhoh', require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); + Desi.registerDataMapper('ruhoh@2.6', require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); +} + function serve(blogdir) { var http = require('http') //, https = require('https') @@ -27,8 +35,7 @@ function serve(blogdir) { } function build(blogdir) { - var Desi = require('desirae').Desirae - , desi = {} + var desi = {} , env = {} ; @@ -60,9 +67,7 @@ function createPost(originalDir, blogdir, title, extra) { process.exit(1); } - var Desi = require('desirae').Desirae - //, desi = {} - , env = {} + var env = {} , post = {} , slug , filepath @@ -149,7 +154,10 @@ function createPost(originalDir, blogdir, title, extra) { }); } + cli.main(function (args, options) { + init(); + var command = args[0] , blogdir = options.blogdir , originalDir = blogdir diff --git a/bower.json b/bower.json index e44d877..7b1f5a0 100644 --- a/bower.json +++ b/bower.json @@ -38,6 +38,7 @@ "html5-boilerplate": "~4.3.0", "bootstrap": "~3.3.1", "md5": "~0.1.3", - "desirae": "~0.9.0" + "desirae": "~0.9.6", + "desirae-datamap-ruhoh": "~1.0.0" } } diff --git a/components/desirae/desirae.js b/components/desirae/desirae.js index 7b3fbff..d1ff193 100644 --- a/components/desirae/desirae.js +++ b/components/desirae/desirae.js @@ -4,6 +4,10 @@ angular.module('myApp.services', []). , desi = {/*TODO api_base: '/api'*/} ; + // TODO what version of ruhoh are ruhoh-twitter and ruhoh-boostrap-2 + Desi.registerDataMapper('ruhoh', window.DesiraeDatamapRuhoh || require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); + Desi.registerDataMapper('ruhoh@2.6', window.DesiraeDatamapRuhoh || require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); + function getBlogdir () { return $http.get('/api/fs/rootdir').then(function (resp) { desi.blogdir = resp.data; diff --git a/index.html b/index.html index 4258797..bece5d1 100644 --- a/index.html +++ b/index.html @@ -100,6 +100,7 @@ + diff --git a/package.json b/package.json index 0f3e72b..0834553 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "desi", - "version": "0.5.2", + "version": "0.5.3", "description": "A nice, friendly tool to help you get set up and start blogging, built on the Desirae blogging platform", "main": "server.js", "scripts": { @@ -44,7 +44,8 @@ "connect": "^3.3.4", "connect-query": "^0.2.0", "connect-send-json": "^1.0.0", - "desirae": "^0.9.3", + "desirae": "^0.9.6", + "desirae-datamap-ruhoh": "^1.0.0", "fs.extra": "^1.3.0", "node-uuid": "^1.4.2", "require-yaml": "0.0.1", diff --git a/views/about/about.html b/views/about/about.html index dc3b7c9..6b4c4b1 100644 --- a/views/about/about.html +++ b/views/about/about.html @@ -3,7 +3,7 @@
+
+npm install -g desi
+
+git clone https://github.com/DearDesi/desirae-blog-template.git blog
+
+pushd blog
+
+git submodule add https://github.com/DearDesi/ruhoh-twitter.git \
+ themes/ruhoh-twitter
+
+desi serve
+
+