mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-10-31 23:35:00 -04:00
Merge branch '2.1' into site-2.1
This commit is contained in:
commit
53fdadd764
7
Rakefile
7
Rakefile
@ -91,10 +91,13 @@ end
|
|||||||
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
|
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
|
||||||
desc "Begin a new post in #{source_dir}/#{posts_dir}"
|
desc "Begin a new post in #{source_dir}/#{posts_dir}"
|
||||||
task :new_post, :title do |t, args|
|
task :new_post, :title do |t, args|
|
||||||
|
if args.title
|
||||||
|
title = args.title
|
||||||
|
else
|
||||||
|
title = get_stdin("Enter a title for your post: ")
|
||||||
|
end
|
||||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||||
mkdir_p "#{source_dir}/#{posts_dir}"
|
mkdir_p "#{source_dir}/#{posts_dir}"
|
||||||
args.with_defaults(:title => 'new-post')
|
|
||||||
title = args.title
|
|
||||||
filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
|
filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
|
||||||
if File.exist?(filename)
|
if File.exist?(filename)
|
||||||
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||||
|
@ -46,7 +46,7 @@ module Jekyll
|
|||||||
SITEMAP_FILE_NAME = "sitemap.xml"
|
SITEMAP_FILE_NAME = "sitemap.xml"
|
||||||
|
|
||||||
# Any files to exclude from being included in the sitemap.xml
|
# Any files to exclude from being included in the sitemap.xml
|
||||||
EXCLUDED_FILES = ["atom.xml"]
|
EXCLUDED_FILES = ["atom.xml, 404.html"]
|
||||||
|
|
||||||
# Any files that include posts, so that when a new post is added, the last
|
# Any files that include posts, so that when a new post is added, the last
|
||||||
# modified date of these pages should take that into account
|
# modified date of these pages should take that into account
|
||||||
|
Loading…
Reference in New Issue
Block a user