Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added usage example

  • Loading branch information...
commit 25f798ac0e218e2dcf58ef6b6289045fbfe32483 1 parent 9b01fbd
@pvorb authored
View
1  .npmignore
@@ -0,0 +1 @@
+example/
View
16 example/conf/bake.json
@@ -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
9 example/markdown.js
@@ -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
11 example/pub/test.mkd
@@ -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
15 example/tpl/post.tpl
@@ -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>
+
Please sign in to comment.
Something went wrong with that request. Please try again.