diff --git a/README.markdown b/README.markdown index ce449e214..cefc5bb82 100644 --- a/README.markdown +++ b/README.markdown @@ -2,6 +2,28 @@ It is automatically transformed by [Jekyll](http://github.com/mojombo/jekyll) into a static site. +## Development + +Development is done in the `next` branch, while `master` contains the docs and guides for the latest stable release. + +## Contributing with the blog + + Create a new file inside `_posts/YYYY-MM-DD-post-title.markdown` following the template: + + --- + layout: post + title: + author: + category: + excerpt: + --- + + Body text goes here... + + Or use `_bin/newpost` to bootstrap a new post file: + + export EDITOR=vim; _bin/newpost 'Post title' + ## License * The Elixir logo and website contents are copyrighted to [Plataformatec](http://plataformatec.com.br/). @@ -9,4 +31,4 @@ You may not reuse anything therein without permission. * The HTML and CSS are copyrighted to [AlienWp](http://alienwp.com/) under [GPL license, version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html). -* The Social Icons are copyrighted to [Xeloader](http://xeloader.deviantart.com/art/Socialis-2-Freebie-213292616). \ No newline at end of file +* The Social Icons are copyrighted to [Xeloader](http://xeloader.deviantart.com/art/Socialis-2-Freebie-213292616). diff --git a/_bin/newpost b/_bin/newpost new file mode 100755 index 000000000..5ab318a70 --- /dev/null +++ b/_bin/newpost @@ -0,0 +1,32 @@ +#!/usr/bin/env ruby + +unless ARGV[0] + puts 'Usage: _bin/newpost "Post Title"' + exit(-1) +end + +date_prefix = Time.now.strftime("%Y-%m-%d") +post_name = ARGV.join ' ' +permalink = post_name.strip.downcase.gsub(/[^a-zA-Z0-9]/, '-') +filename = "#{date_prefix}-#{permalink}.markdown" +post = File.expand_path("../_posts/#{filename}", File.dirname(__FILE__)) + +header = <<-END +--- +layout: post +title: #{post_name} +author: +category: +excerpt: +--- + +Body text goes here... +END + +File.open(post, 'w') do |f| + f << header +end + +editor = ENV['EDITOR'] || "mate" +system(editor, post) +exit(0) diff --git a/_config.yml b/_config.yml index ae2414c98..8ee0a103b 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,3 @@ markdown: rdiscount pygments: true -total_guides: 6 \ No newline at end of file +permalink: /blog/:year/:month/:day/:title diff --git a/_includes/bottom.html b/_includes/bottom.html index 6072500e5..d8f7db9c2 100644 --- a/_includes/bottom.html +++ b/_includes/bottom.html @@ -1,36 +1,19 @@ - -
-
- 
-
-