Skip to content

site.github.url metadata provides http url creating a mixed content error when used on github.io pages #238

@seamustuohy

Description

@seamustuohy

Before submitting an issue, please be sure to

  • Read the contributing instructions
  • Update to the latest Gem version (either gem update pages-gem or bundle update pages-gem)
    Not a build "error" but a configuration request.

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

What did you do (e.g., steps to reproduce)

  • Create a github.io page
  • install HTTPS everywhere or configure browser to reject mixed content
  • Add local static CSS file to github page prepended with site.github.url
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.github.url }}">
  • open chrome developers tab and go to network section
  • load website in browser
  • encounter mixed content error that stops css from loading.

What did you expect to happen?

I expected the site url protocol to match the protocol provided by github pages.

What happened instead?

The url I was provided was HTTP while the github page was delivered using HTTPS

Additional information

  • Link to the live site (if applicable):
  • Link to the source repo (if applicable):

I plan to create a fix for this in the next few minutes. But it can be recreated using the following commit in my repository. (It is easy enough to reproduce without, but I thought I'd make it available.)

https://github.com/OpenInternet/copilot/tree/219d9508737b1a0b0edd14380fece63cb3d8c60d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions