Skip to content

Allow non-GOV.UK favicon and opengraph assets #387

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 2 commits into from
Feb 26, 2025

Conversation

kr8n3r
Copy link
Contributor

@kr8n3r kr8n3r commented Jan 21, 2025

Fixes: #347

We already provide a way to non display the crown next to the service name by setting show_govuk_logo: false in config/tech-docs.yml. This is used by external users such as MOJ.

This work extends the usage of that setting enabled custom favicon and opengraph image insted of the default Crown. It's limited to just the favicon.ico, favicon.svg and opengraph-image.png, but this should suffice.

Users need to create those assets and place them in their source/images folder.

Before

Screenshot 2025-01-21 at 13 49 27

After

Screenshot 2025-01-21 at 13 48 43

@kr8n3r kr8n3r force-pushed the optional-non-govuk-favicon branch from 6801fa3 to 75cc5b0 Compare January 21, 2025 13:52
@kr8n3r kr8n3r changed the title Allow non-GOV.UK favicon and opengraph assets WIP: Allow non-GOV.UK favicon and opengraph assets Jan 21, 2025
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.

Lovely stuff! 👌

@kr8n3r kr8n3r force-pushed the optional-non-govuk-favicon branch 2 times, most recently from 5182727 to 9d88ddd Compare January 21, 2025 14:42
@kr8n3r kr8n3r changed the title WIP: Allow non-GOV.UK favicon and opengraph assets Allow non-GOV.UK favicon and opengraph assets Jan 21, 2025
Fixes: #347

We already provide a way to non display the crown next to the service name by setting `show_govuk_logo: false` in config/tech-docs.yml. This is used by external users such as [MOJ](https://user-guide.modernisation-platform.service.justice.gov.uk).

This work extends the usage of that setting enabled custom favicon and opengraph image insted of the default Crown.
It's limited to just the `favicon.ico`, `favicon.svg` and `opengraph-image.png`, but this should suffice.

Users need to create those assets and place them in their `source/images` folder.
@kr8n3r kr8n3r force-pushed the optional-non-govuk-favicon branch from 9d88ddd to c7ade1d Compare February 26, 2025 11:16
@kr8n3r kr8n3r merged commit 3d994eb into main Feb 26, 2025
3 checks passed
@kr8n3r kr8n3r deleted the optional-non-govuk-favicon branch February 26, 2025 11:21
kr8n3r added a commit that referenced this pull request Feb 26, 2025
## 4.2.0

## New features

- [Allow non-GOV.UK favicon and opengraph assets](#387)

To use a non-crown assets, you need to
- add `favicon.ico`, `favicon.svg` and `opengraph-image.png` to your `source/images` folder.
- set `show_govuk_logo: false`
@kr8n3r kr8n3r mentioned this pull request Feb 26, 2025
maverickvi pushed a commit to hmrc/tech-docs-gem that referenced this pull request Apr 8, 2025
## 4.2.0

## New features

- [Allow non-GOV.UK favicon and opengraph assets](alphagov#387)

To use a non-crown assets, you need to
- add `favicon.ico`, `favicon.svg` and `opengraph-image.png` to your `source/images` folder.
- set `show_govuk_logo: false`
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.
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.

Crown favicon optional
2 participants