Skip to content
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

Render favicons using Hugo Pipes #46325

Merged
merged 1 commit into from May 13, 2024

Conversation

sftim
Copy link
Contributor

@sftim sftim commented May 11, 2024

Manage favicons for the site using Hugo Pipes to render the sizes we want.
Also, work out the theme color automatically.

Helps with issue #41171

/area web-development

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label May 11, 2024
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label May 11, 2024
@k8s-ci-robot k8s-ci-robot requested a review from tengqm May 11, 2024 22:33
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 11, 2024
@sftim sftim force-pushed the 20240511_favicon_hugo_pipes branch from a4db38c to 9e271ed Compare May 11, 2024 22:35
@@ -0,0 +1 @@
<link rel="manifest" href="/manifest.webmanifest">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously found within layouts/partials/favicons.html

Copy link

netlify bot commented May 11, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit a4db38c
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/663ff222322c5c00080df5ba
😎 Deploy Preview https://deploy-preview-46325--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

{{- end -}}

{{- $sizes := slice 256 196 192 180 167 160 152 120 76 -}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can render Apple icons at whatever sizes we like. These seem commonly used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a good approach

Copy link

netlify bot commented May 11, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 6357c3c
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/6640115d8358c70008be6350
😎 Deploy Preview https://deploy-preview-46325--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

Choose a reason for hiding this comment

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

It seems that relocating and renaming this asset has unintentionally caused the logo to disappear from the navbar on small screens. This might be due to the CSS class (code reference).

image

// Browser Console Error
GET https://deploy-preview-46325--kubernetes-io-main-staging.netlify.app/images/favicon.png 404 (Not Found)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot; I have a fix!

@sftim sftim force-pushed the 20240511_favicon_hugo_pipes branch from 9e271ed to b1669ed Compare May 12, 2024 00:42
Manage favicons for the site using Hugo Pipes to render the sizes we
want.
@sftim sftim force-pushed the 20240511_favicon_hugo_pipes branch from b1669ed to 6357c3c Compare May 12, 2024 00:46
Copy link
Member

@dipesh-rawat dipesh-rawat left a comment

Choose a reason for hiding this comment

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

The changes in the build preview appear good to me.
Preview Site

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: dc3a1acb52c442c22017141da1870c32725fe244

@ricardoamaro
Copy link
Contributor

I also reviewed the changes and they lgtm also!

@salaxander
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: salaxander

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2024
@k8s-ci-robot k8s-ci-robot merged commit 160df71 into kubernetes:main May 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants