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

[BUG] favicon's links not match the full baseURL #1366

Open
novrain opened this issue Dec 26, 2023 · 1 comment
Open

[BUG] favicon's links not match the full baseURL #1366

novrain opened this issue Dec 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@novrain
Copy link

novrain commented Dec 26, 2023

Describe the bug
favicon's links not match the full baseURL

  • Hugo Version : 0.112.1
  • Theme Version : latest

Steps to reproduce the behavior:

build with baseURL param.

hugo --gc --baseURL http://a.com/base

index.html:

<link rel="canonical" href="http://a.com/base/">
<link crossorigin="anonymous" href="/base/assets/css/stylesheet.423bd960c236740ff23ffa9df8188a5393264504058af5c3c9414fd4643be13b.css" integrity="sha256-QjvZYMI2dA/yP/qd&#43;BiKU5MmRQQFivXDyUFP1GQ74Ts=" rel="preload stylesheet" as="style">

<!--wrong url prefix, should be http://a.com/base/assets/favicon.ico -->
<link rel="icon" href="http://a.com/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="http://a.com/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="http://a.com/assets/favicon.ico">
<link rel="apple-touch-icon" href="http://a.com/assets/favicon.ico">
<link rel="mask-icon" href="http://a.com/assets/favicon.ico">


<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="http://a.com/base/index.xml">
<link rel="alternate" type="application/json" href="http://a.com/base/index.json">
<link rel="alternate" hreflang="en" href="http://a.com/base/">
<link rel="alternate" hreflang="zh" href="http://a.com/base/zh/">

Expected behavior:
favicon's link should match the baseURL

@novrain novrain added the bug Something isn't working label Dec 26, 2023
@novrain
Copy link
Author

novrain commented Jan 10, 2024

@adityatelange
Sorry to make you confused.

I mean if I set the baseURL to be http://a.com/base, the following part of html pages generated by paperMod:

<link rel="icon" href="http://a.com/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="http://a.com/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="http://a.com/assets/favicon.ico">

should be:

<link rel="icon" href="http://a.com/base/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="http://a.com/base/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="http://a.com/base/assets/favicon.ico">

Cause sometimes, there are multi-sub-sites under the same domian in sub directories.

root-
       -siteA
       -siteB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant