From c2ba253e37bd8695f03ef6041cf31d241eb9abb9 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Thu, 25 Jan 2018 16:59:16 -0500 Subject: [PATCH] This should generate the right URL's --- Gemfile.lock | 3 +++ Rakefile | 9 ++++++--- _config.yml | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e2ba386..8e73a4b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -130,5 +130,8 @@ DEPENDENCIES sass uglifier +RUBY VERSION + ruby 2.4.2p198 + BUNDLED WITH 1.16.1 diff --git a/Rakefile b/Rakefile index 445ca2d..f4c8268 100644 --- a/Rakefile +++ b/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 diff --git a/_config.yml b/_config.yml index 1627eb5..f56f104 100644 --- a/_config.yml +++ b/_config.yml @@ -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