You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ocw-studio, you can use the upsert_mass_build_pipeline management command to generate a pipeline in Concourse that will build all publishable websites that ocw-studio knows about and deploy them. This command has an argument called --prefix. When this argument is set the prefix is applied to the baseURL argument when Hugo is run, and the site is deployed to the prefixed URL.
In the www theme, we have a number of hard coded links that do not respect the Hugo baseURL setting. Search results from the search app also do not respect this setting. So, in order for the prefixed sites to be fully self-contained, we will need another way to set the prefix so it can be respected when building a root website with the www theme.
Plan/Design
Create an environment variable for storing the prefix, something like OCW_OUTPUT_PREFIX (name tbd)
If this prefix is set, apply it to links that need it (this list may not be complete and should be updated):
Header links
Logo (home)
About
Contact
Course carousels
Featured Courses
New Courses
Home page collections
OCW Stories
Footer links
Terms & Conditions
About
Search
Search and explore buttons on home page
Links to search results
Courses
Resources
Link to terms & conditions page at the bottom of the facets area
The text was updated successfully, but these errors were encountered:
Just confirming, should this be in Needs triage or Ready ?
As long as there isn't anything else high priority, I'd say you can grab it. I put it in "needs triage" because fixing this isn't really super critical. There are plenty of workarounds for viewing prefixed pages that aren't too frustrating to use, such as visiting pages directly. I put up the other PR in ocw-studio because it was an easy win. We only had to change a few lines of code to get Hugo to render the prefix. This one is a bit more complicated, and will require another PR in ocw-studio afterward to set the env variable mentioned above.
Another complication that comes to mind, now that I'm thinking about it, are the links built into search. Since we build theme assets once per branch of ocw-hugo-themes using the theme assets pipeline, then consume those with each site build, whatever env value is used during the theme assets build will determine what the links in search results are. So, it would be impossible to create two different prefixed builds pointing at the same branch of ocw-hugo-themes. I don't think this is something we would commonly do, if ever, but it does make the --prefix argument on the mass build pipeline a bit disingenuous because setting the prefix there would do nothing for the links in search.
Description/Context
In
ocw-studio
, you can use theupsert_mass_build_pipeline
management command to generate a pipeline in Concourse that will build all publishable websites thatocw-studio
knows about and deploy them. This command has an argument called--prefix
. When this argument is set the prefix is applied to thebaseURL
argument when Hugo is run, and the site is deployed to the prefixed URL.In the
www
theme, we have a number of hard coded links that do not respect the HugobaseURL
setting. Search results from the search app also do not respect this setting. So, in order for the prefixed sites to be fully self-contained, we will need another way to set the prefix so it can be respected when building a root website with thewww
theme.Plan/Design
OCW_OUTPUT_PREFIX
(name tbd)The text was updated successfully, but these errors were encountered: