From da620f59d2d534dcdbe9dda785972f1fddd6a331 Mon Sep 17 00:00:00 2001 From: Justin Searls Date: Sat, 28 Dec 2013 22:34:36 -0500 Subject: [PATCH] Initial commit --- .gitignore | 3 ++ README.md | 20 ++++++++++++ config/plugins/markdown.coffee | 60 ++++++++++++++++++++++++++++++++++ main.js | 3 ++ package.json | 31 ++++++++++++++++++ 5 files changed, 117 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 config/plugins/markdown.coffee create mode 100644 main.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2481347 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/node_modules + +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..8e3d76e --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# lineman-blog + +This is a plugin to get started writing a blog with +[Lineman](http://linemanjs.com) managing the build and bringing with it both excellent markdown parsing as well as static asset (JS/CSS) management. We recommend you look at our +[Blog template project](https://github.com/testdouble/lineman-blog-template/) +as a starting point. + +If you'd like to add this to a fresh Lineman project on your own, just: + +``` +$ npm install --save-dev lineman-blog +``` + +And then start adding Underscore templates to `app/templates/**/*.us`, posts to `app/posts/*.md`, and static pages to `app/pages/**/*.md`. Refer to the [Lineman docs](http://linemanjs.com) for details about how to use Lineman generally. + +To review what the default configuration and paths are specific to this plugin, run: + +``` +$ lineman config markdown +``` diff --git a/config/plugins/markdown.coffee b/config/plugins/markdown.coffee new file mode 100644 index 0000000..0f10394 --- /dev/null +++ b/config/plugins/markdown.coffee @@ -0,0 +1,60 @@ +module.exports = (lineman) -> + app = lineman.config.application + + files: + pages: + source: ["app/pages/**/*.*", "!app/pages/**/*.md"] + + markdown: + posts: "app/posts/*.md" + pages: "app/pages/**/*.md" + templates: "app/templates/**/*.us" + + config: + + loadNpmTasks: app.loadNpmTasks.concat("grunt-markdown-blog") + + prependTasks: + common: app.prependTasks.common.concat("markdown:dev") + dist: app.prependTasks.dist.concat("markdown:dist") + + markdown: + options: + author: "FirstName LastName" + title: "my lineman blog" + description: "where I post all my brilliant ideas" + url: "http://www.mylinemanblog.com" + rssCount: 10 #<-- remove, comment, or set to zero to disable RSS generation + #disqus: "my_disqus_name" #<-- uncomment and set your disqus account name to enable disqus support + layouts: + wrapper: "app/templates/wrapper.us" + index: "app/templates/index.us" + post: "app/templates/post.us" + page: "app/templates/page.us" + archive: "app/templates/archive.us" + paths: + posts: "<%= files.markdown.posts %>" + pages: "<%= files.markdown.pages %>" + index: "index.html" + archive: "archive.html" + rss: "index.xml" + pathRoots: + posts: "posts" + pages: "" + + dev: + dest: "generated" + context: + js: "/js/app.js" + css: "/css/app.css" + + dist: + dest: "dist" + context: + js: "/js/app.js" + css: "/css/app.css" + + watch: + markdown: + files: ["<%= files.markdown.posts %>", "<%= files.markdown.pages %>", "<%= files.markdown.templates %>"] + tasks: ["markdown:dev"] diff --git a/main.js b/main.js new file mode 100644 index 0000000..99cb562 --- /dev/null +++ b/main.js @@ -0,0 +1,3 @@ +module.exports = { + version: require('./package').version +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..2c88eb0 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "lineman-blog", + "title": "An Markdown blogging plugin for Lineman", + "version": "0.0.1", + "homepage": "https://github.com/testdouble/lineman-blog", + "author": { + "name": "Justin Searls", + "company": "Test Double" + }, + "repository": { + "type": "git", + "url": "git://github.com/testdouble/lineman-blog.git" + }, + "main": "main.js", + "dependencies": { + "grunt": "~0.4.1", + "grunt-markdown-blog": ">= 0.2.0", + "coffee-script": "~1.6.3" + }, + "devDependencies": { + }, + "peerDependencies": { + "lineman": ">= 0.19.0" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://mit-license.org" + } + ] +}