├── Gemfile
├── template
├── images
│ ├── page.png
│ ├── folder.png
│ └── page_edit.png
├── template.erb
└── css
│ └── style.css
├── content
├── Misc
│ └── Credits.md
├── Todos.md
├── Structure.md
└── index.md
├── config.yaml
├── LICENSE
├── markdown-tree.rb
└── README.md
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | gem 'sinatra'
3 | gem 'redcarpet'
4 |
--------------------------------------------------------------------------------
/template/images/page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mil/markdown-tree/HEAD/template/images/page.png
--------------------------------------------------------------------------------
/template/images/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mil/markdown-tree/HEAD/template/images/folder.png
--------------------------------------------------------------------------------
/template/images/page_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mil/markdown-tree/HEAD/template/images/page_edit.png
--------------------------------------------------------------------------------
/content/Misc/Credits.md:
--------------------------------------------------------------------------------
1 | Credits
2 | =======
3 | - Inspiration taken from static site generator mksite [mksite](http://zziplib.sourceforge.net/mksite/)
4 | - Icons are [famfam's silk set](http://www.famfamfam.com/lab/icons/silk/)
5 |
--------------------------------------------------------------------------------
/content/Todos.md:
--------------------------------------------------------------------------------
1 | Todos
2 | =====
3 | - Clean up the default template's css
4 | - Create example site using same example structure in repo
5 | - Add more error handling for reading file
6 | - Add support for .mkd, .markdown, and more extensions
7 |
--------------------------------------------------------------------------------
/content/Structure.md:
--------------------------------------------------------------------------------
1 | Folder Structure / Customization
2 | ================================
3 | - **markdown-tree.rb** : The ruby script to run which serves your site
4 | - **config.yaml** : 3 option config used by markdown-tree.rb
5 | - **template/** : Contains the default template
6 | * **template.erb** : ERB template pages are built from
7 | - **content/** : Contains the hierarchy of markdown files for your site
8 |
--------------------------------------------------------------------------------
/config.yaml:
--------------------------------------------------------------------------------
1 | #Site Title, passed to the template when rendering
2 | site-title: Markdown Tree Example Site
3 |
4 | #Template folder, relative to root directory of markdown-tree
5 | template-folder: template
6 |
7 | #Hierarchy folder, should contain tree of folders and markdown files
8 | hierarchy-folder: content
9 |
10 | #Markdown extension you use for your files (md, mkd, markdown, etc.)
11 | markdown-extension: md
12 |
--------------------------------------------------------------------------------
/content/index.md:
--------------------------------------------------------------------------------
1 | Markdown Tree
2 | =============
3 |
4 | What is it?
5 | -----------
6 | Take a folder with a hierarchy of markdown files and use this script to serve that folder as a live styled site with a built in navigation.
7 |
8 | Basically this is a Sinatra script to serve a hierarchy / tree directory of markdown files as a live dynamic site. Use intended for small sites built in markdown.
9 |
10 |
11 | Why
12 | ---
13 | 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.
14 |
15 | For that reason I created Markdown Tree. Having a dynamically generated site allows me to not have to worry about regenerating my site every time I make a minor change.
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Miles Sandlar
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/template/template.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |