Sha256: 9255760970dea180815d91a0c0a536ad6743b3a9360b35461e050f2bf66d6c76

Contents?: true

Size: 326 Bytes

Versions: 24

Compression:

Stored size: 326 Bytes

Contents

# frozen_string_literal: true

class Builders::VercelUrl < SiteBuilder
  def build
    hook :site, :pre_render do |site|
      next unless ENV["VERCEL_URL"] && ENV["VERCEL_ENV"] != "production"

      Bridgetown.logger.info("Subbing Vercel URL")
      site.config.update(url: "https://#{ENV["VERCEL_URL"]}")
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
bridgetown-core-2.0.0.beta3 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-2.0.0.beta2 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-2.0.0.beta1 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.4 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.3 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.2 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.1 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.0 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.2.0 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.2.0.beta2 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.2.0.beta1 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.1.0 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.1.0.beta3 lib/bridgetown-core/configurations/vercel/vercel_url.rb
bridgetown-core-1.1.0.beta2 lib/bridgetown-core/configurations/vercel/vercel_url.rb