Skip to content

Use the service link as the start of the path to the favicon images #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 30, 2025

Conversation

johnsgp
Copy link
Contributor

@johnsgp johnsgp commented Apr 23, 2025

What’s changed

The location of the favicons in the page <head> has been changed to include the service_link from the tech-docs.yml configuration file.

Identifying a user need

The favicon links added to the core template in v4.0.0 does not work for sites that have a service link. As an example, see the Self Assessment End-to-End Service Guide which has its source in GitHub. There is no favicon on the browser tab because the links look like
<link rel="icon" sizes="48x48" href="/assets/govuk/assets/images/favicon.ico">
which resolves to https://developer.service.hmrc.gov.uk/assets/govuk/assets/images/favicon.ico which does not exist. The icon is located at https://developer.service.hmrc.gov.uk/guides/self-assessment-end-to-end-service-guide/assets/govuk/assets/images/favicon.ico. The service_link configuration matches what is missing from the link.

This was raised as an issue by a service guide author. There are 2 dozen or more service guides and roadmaps that either already are or will be affected when updated.

@kr8n3r
Copy link
Contributor

kr8n3r commented Apr 25, 2025

hey @johnsgp thanks for this. We merge a fix for rack into main. You'll need to rebase your branch with main and hopefully test will pass.
Can you update the CHANGELOG under the 'Unreleased' heading with this change?

@johnsgp johnsgp force-pushed the use-service-link-for-favicon branch from 4a083db to 8c2cfea Compare April 25, 2025 12:27
@johnsgp johnsgp changed the title Use the service link as the start of the path to the images Use the service link as the start of the path to the favicon images Apr 25, 2025
Copy link
Contributor

@kr8n3r kr8n3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with docs locally and it appears to work as expected.
Thanks for the contribution

@kr8n3r kr8n3r merged commit b3adc53 into alphagov:main Apr 30, 2025
3 checks passed
kr8n3r added a commit that referenced this pull request Apr 30, 2025
- [Bump govuk-frontend to v5.9.0 and pin middleman to v4.5.1](#390)

- [Fix: Update Rack::File to Rack::Files in test specs](#394)

- [Fix: Use the service link as the start of the path to the favicon images](#391)

by @johnsgp
@kr8n3r kr8n3r mentioned this pull request Apr 30, 2025
tombye added a commit to alphagov/notifications-tech-docs that referenced this pull request Apr 30, 2025
This bumps the tech docs gem to v4.3.0 which
brings in [v5.9.0 of GOVUK
Frontend](alphagov/tech-docs-gem#390).
This also includes the following changes from the
gem:
- [Fix: Update Rack::File to Rack::Files in test specs](alphagov/tech-docs-gem#394)
- [Fix: Use the service link as the start of the path to the favicon images](alphagov/tech-docs-gem#391)
- [Allow non-GOV.UK favicon and opengraph assets](alphagov/tech-docs-gem#387)

The last change, sets favicon and opengraph images
to be sourced from `source/images` so adds
defaults for any GOV.UK tech docs.

This also bumps all the dependencies to the latest
version within their semver range. Check the
Gemfile.lock for a full list of these bumps.
kr8n3r added a commit that referenced this pull request Apr 30, 2025
- Revert [Fix: Use the service link as the start of the path to the favicon images](#391)
@johnsgp johnsgp deleted the use-service-link-for-favicon branch May 1, 2025 16:16
maverickvi pushed a commit to hmrc/tech-docs-gem that referenced this pull request May 15, 2025
- [Bump govuk-frontend to v5.9.0 and pin middleman to v4.5.1](alphagov#390)

- [Fix: Update Rack::File to Rack::Files in test specs](alphagov#394)

- [Fix: Use the service link as the start of the path to the favicon images](alphagov#391)

by @johnsgp
maverickvi pushed a commit to hmrc/tech-docs-gem that referenced this pull request May 15, 2025
- Revert [Fix: Use the service link as the start of the path to the favicon images](alphagov#391)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants