Skip to content

Use the service_link at the start of the path to the favicon images i… #399

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

Conversation

johnsgp
Copy link
Contributor

@johnsgp johnsgp commented May 1, 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, only if use_service_link_for_favicon is set to true (default: false).

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.

This cannot be applied to all services, so needs an additional switch, use_service_link_for_favicon to be set to true.

Copy link
Contributor

@marcotranchino marcotranchino left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kr8n3r
Copy link
Contributor

kr8n3r commented May 2, 2025

tested with local docs, works well now

@kr8n3r kr8n3r merged commit 37f322b into alphagov:main May 2, 2025
3 checks passed
kr8n3r added a commit that referenced this pull request May 2, 2025
## 4.4.0

### New features

- [Use the service link as the start of the path to the favicon images if required](#399)

To use the service_link at the start of the path to the favicon images, you need to
- set `use_service_link_for_favicon: true`
@kr8n3r kr8n3r mentioned this pull request May 2, 2025
maverickvi pushed a commit to hmrc/tech-docs-gem that referenced this pull request May 15, 2025
## 4.4.0

### New features

- [Use the service link as the start of the path to the favicon images if required](alphagov#399)

To use the service_link at the start of the path to the favicon images, you need to
- set `use_service_link_for_favicon: true`
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.

3 participants