Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Remove full url from links where possible
Browse files Browse the repository at this point in the history
This allows more thorough checks with HTMLProofer.
  • Loading branch information
razor-x committed May 25, 2016
1 parent fb1ad5e commit d46ed93
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
17 changes: 14 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,20 @@ end
desc 'Generate and test a production build of the Jekyll site'
task build: :clean do
ENV['JEKYLL_ENV'] ||= 'production'
sh(*%W(bundle exec jekyll build
--config _config.yml,_config.#{ENV['JEKYLL_ENV']}.yml))
HTMLProofer.check_directory('dist', disable_external: true).run
configs = %W(_config.yml _config.#{ENV['JEKYLL_ENV']}.yml)
config = configs.map(&YAML.method(:load_file)).reduce(&:merge)

sh(*%(bundle exec jekyll build --config #{configs.join(',')}))

HTMLProofer.check_directory(
'dist',
enforce_https: true,
check_html: true,
check_favicon: true,
assume_extension: true,
url_ignore: [%r{^#{config['url']}/} => '/'],
url_swap: { %r{^#{config['baseurl']}/} => '/' }
).run
end

desc 'Start a local Jekyll development server'
Expand Down
3 changes: 0 additions & 3 deletions _config.production.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
baseurl: /jekyll-site
url: https://makenew.github.io

assets:
cdn: https://makenew.github.io
2 changes: 1 addition & 1 deletion src/_includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<meta name="msapplication-config" content="none">
<meta name="mobile-web-app-capable" content="yes">
<link type="text/plain" rel="author"
href="{{ site.url }}{{ site.baseurl }}/humans.txt">
href="{{ site.baseurl }}/humans.txt">
{% include favicon.html %}

0 comments on commit d46ed93

Please sign in to comment.