A simple (but yet another) blog engine written in node.js. It basically takes the articles/
folder full of markdown post and serves them as a website.
npm is not used yet, the dependencies are built-in in this repo, except for datejs;
In order to use it:
- clone it
- $> git submodule update --init --recursive
- $> npm install datejs =======
h5b node.js(thanks xonecas!) server configuration is used.
Yabe mainly due to my lack of inspiration when it comes to chose a name. I chose to create yet another blog engine. It is a reference to this play framework sample project.
Right now, this application does the barely minimum, and uses the node filesystem API to get articles content. This is a work in progress (and mostly just fun).
The dependencies are placed in the node_modules
folder to load them as if they are native modules. no package.json yet
- connect 1.2.1
- mime 1.2.1
- node-jqtpl 0.1.0
- markdown and prettify node module are node ports of showdown and prettify syntax highlighter by creationix for the Wheat blog engine.
GET /
rendering index.html view. a simple list of available post.GET /article/:post/
rendering a full article. :post is the filename, minus the markdown suffix.GET /feed.xml
providing a basic rss feed
Views are defined within their own 'themes' folder/
within themes/
one.
- index.html that lists articles with a short intro
- articles.html actually used when viewing an article
- feed.xml provides a simple and really basic rss feed
- layout.html is used to decorate index/articles templates
The template engine used is node-jqtpl by kof, a node port of jQuery Templates plugin.
a custom sidebar file allows you to define a custom placeholder that you can later use in your templates, heavily inspired by gollum. It's not as brilliant and is roughly implemented but you can use a custom _sidebar.markdown
file in artciles
folder, its content would be available in your template files like so:
{{if has_sidebar}}
<div class="article-sidebar">
{{html sidebar}}
</div>
{{/if}}
config.js
file acts as a really basic configuration hook. It should expose a simple hash object:
module.exports = {
// control cross domain if you want. allow cross domain (for your subdomains) disallow other domains.
hostAdress: 'localhost',
// server port
port: 3001,
// themes folder path
themeDir: 'themes',
// theme folder name
theme: 'testr'
};
Tim Caswell([creationix](Tim Caswell)) and Wheat, a really beautiful piece of node hacking. The markdown and pretiffy modules are directly coming from Wheat, the whole is heavily based on Wheat which inspired me this experiments, mostly for fun. I'm using wheat since a few months now to blog and I really think that solutions like Jekyll or Wheat, both based on markdown (textile is also pretty good) are ideal and really pleasant to work with.