biopython / biopython.github.io

Source of biopython.org website, migrated from MediaWiki
biopython.org
153 stars 281 forks source link

Favicon not working as expected #179

Closed LalitNM closed 3 years ago

LalitNM commented 3 years ago

I am reporting a problem with the Biopython website at http://biopython.org

My web browser is chromium version 83.0.4103.116, running on operating system Linux (parrot os).

I noticed that the logo of biopython is not visible as favicon on any page other than main page, e.g. wiki/SourceCode.

Proposed fix: At present the favicon is rendered from current direcory as of the page, this should be changed to root directory.

peterjc commented 3 years ago

Probably {{ site.baseurl }}favicon-32x32.png is not working as expected, as it gave <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"> on the source code page.

peterjc commented 3 years ago

It should be expanded as / according to https://github.com/biopython/biopython.github.io/blob/master/_config.yml#L16

MarkusPiotrowski commented 3 years ago

After some reading I understand that site.baseurl should only be used if the whole site is sitting in another subfolder, so if our starting site would sit in e.g. biopython.org\biopython instead of biopython.org. Obviously, there have been some changes how site.baseurl works:

If I understand this (https://talk.jekyllrb.com/t/relative-url-and-baseurl/2051) correctly, site.baseurl should be empty, otherwise you end up with //? Edit: It seems that / in baseurl will be automatically converted to "" since some time now. In this post (https://github.com/github/pages-gem/issues/460) they propose to replace {{site.baseurl}} with {{ "/" | relative_url }}

It seems in our case indeed the relative_url filter seems to be appropriate tool.

MarkusPiotrowski commented 3 years ago

In this post (github/pages-gem#460) they propose to replace {{site.baseurl}} with {{ "/" | relative_url }}

This did the trick for me, see: http://markuspiotrowski.github.io/