GSA / digitalgov.gov

Digital.gov: Better websites. Better government.
https://digital.gov
Other
219 stars 299 forks source link

Bug: Preview Sites Do Not Include the Preview Site Hostnames #7709

Open RileySeaburg opened 2 months ago

RileySeaburg commented 2 months ago

Describe the Bug When using Federalist to build preview sites, the BASEURL environment variable does not include the preview site hostnames. This results in incomplete URLs, affecting og:url meta tags and social share links, which breaks indexing, sharing, and link generation functionalities on social media platforms.

Steps to Reproduce

  1. Set up a Hugo site with the provided config.yaml configuration.
  2. Deploy the Hugo site to Federalist.
  3. Access the preview site generated by Federalist.
  4. Inspect the generated HTML for the og:url meta tag and social share links.
  5. Notice that the URLs do not include the complete preview site hostname.

Expected Behavior The BASEURL should dynamically include the correct hostname for the preview sites, ensuring that og:url meta tags and social share links are complete and functional.

Screenshots Current output for og:url on preview sites:

<meta property="og:url" content="/preview/gsa/digitalgov.gov/nl-fix-og-url/" />

Expected output for og:url on preview sites:

<meta property="og:url" content="https://federalist-466b7d92-5da1-4208-974f-d61fd4348571.sites.pages.cloud.gov/preview/gsa/digitalgov.gov/nl-fix-og-url/" />

The hostname should be updated at each build.