x-govuk / govuk-eleventy-plugin

Write documentation using Markdown and publish it using GOV.UK styles.
https://x-govuk.github.io/govuk-eleventy-plugin/
MIT License
55 stars 14 forks source link

base.njk is missing canonicalUrl for css - meaning images don't work on subdomain github repositories #310

Closed vickytnz closed 2 months ago

vickytnz commented 3 months ago

My crown footer wasn't showing on https://vickytnz.github.io/govuk-header-footer/ even when i set up the eleventy config file.

It turned out that in @x-govuk/govuk-eleventy-plugin/layouts/base.nkk

line 44

<link rel="stylesheet" href="/assets/govuk.css"> needs to be changed to <link rel="stylesheet" href="{{ '/assets/govuk.css' | canonicalUrl }}">

After I changed this the CSS worked