mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-16 06:05:00 -05:00
Render drafts if Octopress.env is not production.
This commit is contained in:
parent
17311872d6
commit
fcc512626a
2
Rakefile
2
Rakefile
@ -110,7 +110,7 @@ task :generate do
|
|||||||
configurator.write_configs_for_generation
|
configurator.write_configs_for_generation
|
||||||
puts "## Generating Site with Jekyll"
|
puts "## Generating Site with Jekyll"
|
||||||
system "compass compile --css-dir #{configuration[:source]}/stylesheets"
|
system "compass compile --css-dir #{configuration[:source]}/stylesheets"
|
||||||
system "jekyll build"
|
system "jekyll build #{"--drafts" unless Octopress.env == 'production'}"
|
||||||
unpublished = get_unpublished(Dir.glob("#{configuration[:source]}/#{configuration[:posts_dir]}/*.*"), {env: Octopress.env, message: "\nThese posts were not generated:"})
|
unpublished = get_unpublished(Dir.glob("#{configuration[:source]}/#{configuration[:posts_dir]}/*.*"), {env: Octopress.env, message: "\nThese posts were not generated:"})
|
||||||
puts unpublished unless unpublished.empty?
|
puts unpublished unless unpublished.empty?
|
||||||
configurator.remove_configs_for_generation
|
configurator.remove_configs_for_generation
|
||||||
|
@ -20,7 +20,7 @@ module Guard
|
|||||||
if Watcher.match_files(self, Dir.glob('{,**/}*{,.*}').uniq).size > 0
|
if Watcher.match_files(self, Dir.glob('{,**/}*{,.*}').uniq).size > 0
|
||||||
configurator = Octopress::Configuration.new
|
configurator = Octopress::Configuration.new
|
||||||
configurator.write_configs_for_generation
|
configurator.write_configs_for_generation
|
||||||
system "jekyll build"
|
system "jekyll build #{"--drafts" unless Octopress.env == 'production'}"
|
||||||
configurator.remove_configs_for_generation
|
configurator.remove_configs_for_generation
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -28,7 +28,7 @@ module Guard
|
|||||||
def run_on_changes(_)
|
def run_on_changes(_)
|
||||||
configurator = Octopress::Configuration.new
|
configurator = Octopress::Configuration.new
|
||||||
configurator.write_configs_for_generation
|
configurator.write_configs_for_generation
|
||||||
system "jekyll build"
|
system "jekyll build #{"--drafts" unless Octopress.env == 'production'}"
|
||||||
configurator.remove_configs_for_generation
|
configurator.remove_configs_for_generation
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user