You are not logged in.
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
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 Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
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
Offline
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
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
By the way - I'm a big fan of quickserve.
Last edited by Xyne (2012-03-19 05:22:54)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline