Skip to content

Commit

Permalink
Fix #922 (regression in base_path support) (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite authored Nov 16, 2024
1 parent 010d8ba commit fc342c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bridgetown-core/lib/roda/plugins/bridgetown_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,16 @@ def bridgetown
scope.initialize_bridgetown_context
scope.initialize_bridgetown_root

# Run the static file server
ssg

# There are two different code paths depending on if there's a site `base_path` configured
if Bridgetown::Current.preloaded_configuration.base_path == "/"
ssg # static file server
Bridgetown::Rack::Routes.load_all scope
return
end

# Support custom base_path configurations
on(Bridgetown::Current.preloaded_configuration.base_path.delete_prefix("/")) do
ssg # static file server
Bridgetown::Rack::Routes.load_all scope
end

Expand Down

0 comments on commit fc342c0

Please sign in to comment.