Skip to content

Commit

Permalink
Implement destination on config file to help htmlproofer to support s…
Browse files Browse the repository at this point in the history
…ites with baseurl

Also, implement a change in the rake tasks to avoid the baseurl configuration when developing
  • Loading branch information
cetinajero committed Dec 9, 2019
1 parent ab42034 commit 3f48355
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace :serve do
begin
puts "## Running: bundle exec jekyll serve --config _config-dev.yml --host 0.0.0.0"
config_prod=YAML.load_file("_config.yml")
config_prod.merge!({ "baseurl" => nil })
config_prod.each do |key, value|
if key == "defaults"
value[2].each do |key, value| # collections.radios.published = false
Expand All @@ -45,7 +46,12 @@ namespace :serve do
task :prod do
begin
puts "## Running: bundle exec jekyll serve --host 0.0.0.0"
system "bundle exec jekyll serve --host 0.0.0.0"
config_prod=YAML.load_file("_config.yml")
config_prod.merge!({ "baseurl" => nil })
config_dev=File.new("_config-dev.yml","w")
config_dev.write(config_prod.to_h.to_yaml)
config_dev.close
system "bundle exec jekyll serve --config _config-dev.yml --host 0.0.0.0"
rescue Exception => e
puts e
puts "\n## Shutting down server"
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description: > # this means to ignore newlines until "keywords:"
Google search results) and in your feed.xml site description.
keywords: Jekyll, GitHub Pages, theme, website, blog
baseurl: /jekyll-theme-marketing
destination: ./_site/jekyll-theme-marketing
domain: converse.mx
original: true
lang: en_US
Expand Down

0 comments on commit 3f48355

Please sign in to comment.