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

try to fix broken logo and favicon #126

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion theme/src/main/assets/page.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $!
$ elseif (page.properties.("material.author")) $
<meta name="author" content="$page.properties.("site.author")$">
$ endif $
<link rel="shortcut icon" href="$page.base$$page.properties.("material.favicon")$">
<link rel="shortcut icon" href="$page.properties.("assets.hostname")$$page.base$$page.properties.("material.favicon")$">
Copy link
Member

Choose a reason for hiding this comment

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

I doubt that this is related to #86. I'm not sure if page.properties ("assets.hostname") exists, but using it with $page.base$ may be a bad idea.

Copy link
Member

Choose a reason for hiding this comment

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

The icon link of all modules is broken, but the pekko homepage is not, which also proves this. $page.base$ is the path of a specific project.

Copy link
Member

Choose a reason for hiding this comment

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

The link is to https://pekko.apache.org/docs/pekko-http/current/assets/images/pekko_logo.png

Should be https://pekko.apache.org/assets/images/pekko_logo.png

The previous comments should be no problem. $page.base$ is not a problem. At present, it is always the root directory of the project, that is.

The documents generated by all these modules (http, connector, pekko) are "assets/xxxx", even if the string template adds assets.home, but due to pekko, conn Ector These modules do not have the default value of assets.home, so they still do not point the path to CDN.

So I think the PR needs to set a default value for assets.home, or explicitly add the assets.home configuration value for each project.

$ if (page.properties.("title")) $
<title>$page.properties.("title")$</title>
$ elseif (page.title) $
Expand Down
4 changes: 2 additions & 2 deletions theme/src/main/assets/partials/nav.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ $!
<i class="md-icon">$page.properties.("material.logo.icon")$</i>
$ else $
$ if (page.properties.("material.logo.uri")) $
<img src="$page.properties.("material.logo.uri")$" width="24" height="24">
<img src="$page.properties.("assets.hostname")$$page.base$$page.properties.("material.logo.uri")$" width="24" height="24">
$ else $
<img src="$page.base$$page.properties.("material.logo")$" width="24" height="24">
<img src="$page.properties.("assets.hostname")$$page.base$$page.properties.("material.logo")$" width="24" height="24">
$endif$
$endif$
</a>
Expand Down
Loading