Drassil / git-wiki-theme

A revolutionary full-featured wiki for github pages and jekyll. You don't need to compile it!

Home Page:http://drassil.github.io/git-wiki/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo URL cannot be relative

nekketsuuu opened this issue · comments

Describe the bug

_config.yml.dist says that logo_url is "Url of logo image, it can be full, absolute or relative", but it cannot be relative. If the URL is relative, then the logo is not displayed on blog posts which are in subdirectories.

To Reproduce

I used the gh-pages branch of this repository to reproduce.

  1. Change logo_url in _config.yml to be relative.

    --- a/_config.yml
    +++ b/_config.yml
    @@ -9,7 +9,7 @@
     show_wiki_posts: true
     show_wiki_posts_limit: 5
    -logo_url: http://drassil.github.io/git-wiki/assets/images/1200px-Wikipedia-logo-v2.svg_.png
    +logo_url: assets/images/1200px-Wikipedia-logo-v2.svg_.png
     google_analytics:
     git_branch: gh-pages
    
  2. Go to git-wiki/blog/posts/2018/12/17/first-post.html.

  3. The logo is not displayed. See a screenshot below.

Expected behavior

The logo is displayed correctly.

Screenshots

a logo on upper left is not displayed

Desktop:

  • OS: Windows 10
  • Browser: Google Chrome
  • Version: 79.0.3945.88

Additional context

There are also small issues related to the logo. I noticed:

  • The logo is not displayed when logo_url is relative. (Main issue)
  • When being the mobile layout, a img tag for logo is generated even if logo_url is not set (this line).
  • On the gh-pages branch, logo_url is using HTTP, not HTTPS. This may cause the mixed content error. Currently this error doesn't occur because //www.drassil.org/ is served over HTTP (on the other hand //***.github.io/ is served over HTTPS).

Fixed in a882fa2