mitodl / ocw-studio

Open Source Courseware authoring tool
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

The mass build sites pipeline's prefix feature doesn't properly set Hugo baseURL #2113

Closed gumaerc closed 4 months ago

gumaerc commented 5 months ago

Expected Behavior

If I specify --prefix to upsert_mass_build_pipeline, that prefix should be applied to the baseURL setting

Current Behavior

The prefix is not included in the baseURL setting, and links are all relative to the root of the site using site.get_url_path()

Steps to Reproduce

  1. Upsert a mass build pipeline using the upsert_mass_build_pipeline management command and specify --prefix with a custom prefix
  2. Run the pipeline and let it deploy a few sites
  3. Once one of the sites has deployed, browse to it and try clicking any of the internal links

Possible Solution

Take the prefix into account when setting baseURL in Hugo