You are not logged in.

#1 2012-03-10 00:33:06

bladdo
Member
From: Blacksburg, VA
Registered: 2008-05-05
Posts: 111
Website

Markdown Tree - Site generator to serve a hierarchy of markdown files

Hi Guys,

I created a simple script which serves a directory structure of Markdown files with simple styling and navigation. Why use this? A simple notes system, basic content-based sites, who know what else? If you're looking for a small micro-cms solution, this may fit your needs.

Basically you feed it a directory with markdown files (with as much nesting as you want) and a template directory and it serves that folder. Think Jekyll only even lighter weight and dynamic.

Example Live Site:
Example Site
Corresponding Folder Hierarchy

For more info, check out the project on github: https://github.com/mil/markdown-tree/

Feedback Appreciated!

Miles


bladdo / mil / Miles
userbound.com - blog and projects

Offline

#2 2012-03-10 00:59:55

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Markdown Tree - Site generator to serve a hierarchy of markdown files

In the README, bladdo wrote:

There are many similar scripts done in a static fashion but I couldn't find a minimal system for serving markdown hierarchy based sites that was dynamic.

Just out of curiosity, did you consider Xac before writing this?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2012-03-10 01:50:50

kaen
Member
Registered: 2012-03-03
Posts: 3

Re: Markdown Tree - Site generator to serve a hierarchy of markdown files

Whoa I really like the idea behind these. And I love the fact that two different Archers wrote two different ones in my two favorite languages big_smile

Offline

#4 2012-03-18 23:55:01

bladdo
Member
From: Blacksburg, VA
Registered: 2008-05-05
Posts: 111
Website

Re: Markdown Tree - Site generator to serve a hierarchy of markdown files

Xyne wrote:
In the README, bladdo wrote:

There are many similar scripts done in a static fashion but I couldn't find a minimal system for serving markdown hierarchy based sites that was dynamic.

Just out of curiosity, did you consider Xac before writing this?

Hadn't heard about Xac until now. Looks nice and I'll definetly have to check out more indepth how you handle your plugins if I ever want to do the same with markdown-tree.

I am more of a ruby than a python person though. Also with markdown-tree I wanted to see how simply I could create such functionality in ruby. Turns out 69 lines of code, ha.

By the way - I'm a big fan of quickserve.


bladdo / mil / Miles
userbound.com - blog and projects

Offline

#5 2012-03-19 05:14:13

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Markdown Tree - Site generator to serve a hierarchy of markdown files

bladdo wrote:

I am more of a ruby than a python person though. Also with markdown-tree I wanted to see how simply I could create such functionality in ruby. Turns out 69 lines of code, ha.

Nice. Xac is quite a bit longer than that due to other features that I needed (file handling, markdown tags for files, atom feeds). The core does the same thing though (markdown hierarchy -> static website), which is why I asked if you had seen it. I definitely understand why some might consider the extra features bloat if they just want to publish markdown.

Then again, 69 lines might be considered bloat too:

#!/bin/bash
len=${#1}
IFS="
"
for foo in $(find "$1" -type f); do
  bar="${2%/}/${foo:$len}"
  mkdir -p "${bar%/*}"
  pandoc -f markdown -t html -s -o "${bar%.*}".html "$foo"
done

tongue

bladdo wrote:

By the way - I'm a big fan of quickserve.

smile

Last edited by Xyne (2012-03-19 05:22:54)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2012-03-19 11:56:03

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: Markdown Tree - Site generator to serve a hierarchy of markdown files

Looks pretty good!!


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

Board footer

Powered by FluxBB