productiontype / Spectral

Spectral is an original typeface designed by Production Type, primarily intended for use inside Google’s Docs and Slides.
https://productiontype.github.io/Spectral/
SIL Open Font License 1.1
243 stars 20 forks source link

Not working when served from a directory #9

Open davelab6 opened 6 years ago

davelab6 commented 6 years ago

It seems https://googlefonts.github.io/spectral/ renders as a blank page because even though the links are relative URLs, eg

<script src="scripts/main.js"></script>

they act like absolute URLs, eg

 https://googlefonts.github.io/scripts/main.js
ahmedghazi commented 6 years ago

Hi, That's because the website is set with relative path to the domain https://googlefonts.github.io and not to the subfolder https://googlefonts.github.io/spectral/ I can fix it with

ahmedghazi commented 6 years ago

I pushed a modified index.html to the gh-pages branch

ahmedghazi commented 6 years ago

Hi, any change?

davelab6 commented 6 years ago

I pushed this repo's gh-pages branch to the gf fork

$ git push -f git@github.com:googlefonts/spectral.git gh-pages

but https://googlefonts.github.io/spectral/ is still not loading for me :(

Can you get it to load on https://productiontype.github.io/Spectral/ ?

ahmedghazi commented 6 years ago

Hi i modified the index.html here https://github.com/productiontype/Spectral/tree/gh-pages so that the assets are loaded relatively to the folder like this /spectral/styles/main.css Can you merge?