mirror of
https://github.com/danbee/danbarber.me
synced 2025-03-04 08:59:10 +00:00
This should generate the right URL's
This commit is contained in:
parent
a5cef57a32
commit
c2ba253e37
@ -130,5 +130,8 @@ DEPENDENCIES
|
||||
sass
|
||||
uglifier
|
||||
|
||||
RUBY VERSION
|
||||
ruby 2.4.2p198
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.1
|
||||
|
||||
9
Rakefile
9
Rakefile
@ -5,7 +5,6 @@ task default: %w[build]
|
||||
|
||||
desc "Build the site"
|
||||
task :build do
|
||||
puts "Deploying for: #{site_url}"
|
||||
config = Jekyll.configuration(config_params)
|
||||
site = Jekyll::Site.new(config)
|
||||
Jekyll::Commands::Build.build(site, config)
|
||||
@ -16,9 +15,13 @@ def config_params
|
||||
end
|
||||
|
||||
def site_url
|
||||
if ENV["CONTEXT"] == "production"
|
||||
if production?
|
||||
ENV["URL"]
|
||||
else
|
||||
ENV["DEPLOY_URL"]
|
||||
end || "https://danbarber.me"
|
||||
end
|
||||
end
|
||||
|
||||
def production?
|
||||
ENV["CONTEXT"] == "production"
|
||||
end
|
||||
|
||||
@ -10,7 +10,6 @@ collections:
|
||||
title: Uploads
|
||||
output: true
|
||||
|
||||
url: https://danbarber.me
|
||||
author: Dan Barber
|
||||
markdown: Kramdown
|
||||
description: Web designer and developer for thoughtbot in London. Drummer and all
|
||||
|
||||
Loading…
Reference in New Issue
Block a user