-
-
Save dmj111/4947701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -20,9 +20,10 @@ blog_index_dir = 'source' # directory for your blog's index pa | |
deploy_dir = "_deploy" # deploy directory (for Github pages deployment) | |
stash_dir = "_stash" # directory to stash posts for speedy generation | |
posts_dir = "_posts" # directory for blog files | |
+org_posts_dir = "org_posts" | |
themes_dir = ".themes" # directory for blog files | |
-new_post_ext = "markdown" # default new post file extension when using the new_p | |
-new_page_ext = "markdown" # default new page file extension when using the new_p | |
+new_post_ext = "org" # default new post file extension when using the new_post t | |
+new_page_ext = "org" # default new page file extension when using the new_page t | |
server_port = "4000" # port for preview server eg. localhost:4000 | |
@@ -99,13 +100,14 @@ task :new_post, :title do |t, args| | |
puts "Creating new post: #{filename}" | |
open(filename, 'w') do |post| | |
system "mkdir -p #{source_dir}/#{posts_dir}/"; | |
+ post.puts "#+BEGIN_HTML" | |
post.puts "---" | |
post.puts "layout: post" | |
post.puts "title: \"#{title.gsub(/&/,'&').titlecase}\"" | |
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" | |
post.puts "comments: true" | |
post.puts "categories: " | |
- post.puts "---" | |
+ post.puts "#+END_HTML" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment