xonecas.io

dustymarkdown

A low abstraction content manager for node.js. Uses Markdown and Dust.js for the magic stuff

pre-AI small frontend backend jquery node

18 commits · 2011-04-28 to 2011-06-04 · 268 files

xonecasupdated modules0983b4e2011-06-04
▸ htdocs/ 2011-06-04
▸ lib/ 2011-06-04
▸ markdown/ 2011-06-04
▸ node_modules/ 2011-06-04
▸ static/ 2011-06-04
· README.md 2011-05-05
· server.js 2011-06-04

README.md

Dusty Markdown

This project is the new content manager under xonecas.com. It's very minimal and light, developer friendly. The idea is that you can write the dynamic content in markdown and use dust to combine static and dynamic.

This app is only possible thanks to:

  • HTML5 Boilerplate
  • Dust.js
  • Markdown

The gist:

So the build.js file grabs the source files you write and compiles them into static assets (@TODO add compression and concatenation). The way it knows what to do with your files is because it expects a specific folder/naming convention.

This app is the example of that convention:

  root/
     build.js                   // compiler
     server.js                  // static asset provider

     templates/                 // home to your pages/views
        index.dust              // root of the app
        pagename.dust           // pagename becomes 
                                // http://server/pagename

     markdown/                  // where your content goes
        keyname.md              // you can refer to this in 
                                // your template susing {keyname}
        section_keyname.md      // you can refer to several
                                // keynames using {#section}
     htdocs/                    // your static content
        ...
        ...                     // organize it how you want it
                                // just remember that the .html
                                // files are created by build.js
                                // so don't edit them by hand

The default htdocs folder is from HTML5 Boilerplate and so is the static file server. There is also a very simple unique visitors/request counter.

Browse the content of this repo for an example.

Dependencies

  • npm install connect dust node-markdown

More docs: