Permalink
Browse files

Added usage example

  • Loading branch information...
1 parent 9b01fbd commit 25f798ac0e218e2dcf58ef6b6289045fbfe32483 @pvorb committed Aug 21, 2011
Showing with 52 additions and 0 deletions.
  1. +1 −0 .npmignore
  2. +16 −0 example/conf/bake.json
  3. +9 −0 example/markdown.js
  4. +11 −0 example/pub/test.mkd
  5. +15 −0 example/tpl/post.tpl
View
@@ -0,0 +1 @@
+example/
View
@@ -0,0 +1,16 @@
+{
+ "directories": {
+ "bake": "pub",
+ "templates": "tpl"
+ },
+ "fileExtensions": {
+ "mkd": "html",
+ "md": "html",
+ "markdown": "html"
+ },
+ "defaultTemplate": "default",
+ "defaultAuthor" : "Paul Vorbach",
+ "properties": {
+ "websiteTitle": "Paul Vorbach"
+ }
+}
View
@@ -0,0 +1,9 @@
+var bake = require("bake"),
+ marked = require("marked");
+
+// Bake some markdown files
+bake(process.cwd() + "/conf/bake.json", {
+ __content: function(file) {
+ return marked(file.__content);
+ }
+});
View
@@ -0,0 +1,11 @@
+title: First post
+date: August 14th, 2011
+author: Paul
+template: post
+
+This is my **first** blog post.
+
+Here's a heading
+----------------
+
+> And this is a block quote
View
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title><%= file.title %> » <%= global.websiteTitle %></title>
+ </head>
+ <body>
+ <h1><%= file.title %></h1>
+ <p>Written on <%= file.date %> by <%= file.author %></p>
+
+<%= file.__content %>
+
+ </body>
+</html>
+

0 comments on commit 25f798a

Please sign in to comment.