MemoRack
Rack Application for markdown memo
Installation
Add this line to your application's Gemfile:
gem 'memorack'
And then execute:
$ bundle
Or install it yourself as:
$ gem install memorack
Usage
$ memorack create PATH # Generate template folder
$ memorack theme # Show theme list
$ memorack theme THEME # Show theme info
$ memorack theme -c THEME # Copy theme
$ memorack server [PATH] # Instant Server
$ memorack build [PATH] # Build static site
Standard startup
$ memorack create memo
$ cd memo
(Customizing...)
$ rackup
Instant server
$ mkdir content
$ echo '# Hello World' > content/hello.md
(Customizing...)
$ memorack server content
OS X (Pow + powder)
$ memorack create memo
$ cd memo
(Customizing...)
$ powder link
$ open http://memo.dev/
- Pow: Zero-configuration Rack server for Mac OS X
gem install powder
Build static site
$ memorack create memo
$ cd memo
(Customizing...)
$ memorack build --url http://foo.bar.baz
Build 'content/' -> '_site'
Directory
Template
.
Customization
Layout
index.html is mustache template
$ cd themes/custom
$ memorack theme -c basic/index.html
Created 'index.html'
(Edit 'index.html'...)
Directory
Logo
Syntax highlighting
Download highlight.js
Add code to index.html
<link rel="stylesheet" href="{{site.url}}/highlight.js/styles/default.css">
<script src="{{site.url}}/highlight.js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
org-mode
Install
$ gem install org-ruby
Edit config.json
{
"formats": ["markdown", "org"],
...
}
mustache variables
Basic variables -- {{VAR}}
site.urltitlepage.titleapp.nameapp.versionapp.url- other variable in config.json
Special variables -- {{{VAR}}}
__menu____content__
TODO
- Template comments translate english
- Add customizing tips
- More test program
- Generate EPUB3
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request