I am trying to load local fonts stored in /static, but it seems to not being loading any of the static files. I have the files in /static, and I can see them when I look in /public (the files Hugo generates). I just don’t know why it isn’t loading the files. If you want to look at the repo, I have it on GitHub on the local-fonts branch.
Here is the console log, but it doesn’t give much info except that it can’t find the files.
GET
http://localhost:1313/favicon.ico
[HTTP/1.1 404 Not Found 0ms]
GET
http://localhost:1313/fonts/inter-v18-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2
[HTTP/1.1 404 Not Found 0ms]
GET
http://localhost:1313/fonts/inter-v18-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700.woff2
[HTTP/1.1 404 Not Found 0ms]
downloadable font: download failed (font-family: "Inter" style:normal weight:400 stretch:100 src index:0): status=2147746065 source: http://localhost:1313/fonts/inter-v18-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2
downloadable font: download failed (font-family: "Inter" style:normal weight:700 stretch:100 src index:0): status=2147746065 source: http://localhost:1313/fonts/inter-v18-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700.woff2
GET
http://localhost:1313/fonts/roboto-v47-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2
[HTTP/1.1 404 Not Found 0ms]
downloadable font: download failed (font-family: "Roboto" style:normal weight:400 stretch:100 src index:0): status=2147746065 source: http://localhost:1313/fonts/roboto-v47-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2
Done! Do you happen to know if there is a way to change the baseURL using the commandline? Because when running it on GitHub pages, I need it to be the old baseURL.
You don’t need that parameter if you’re running hugo server locally, usually. It’s needed if you want to access hugo server from other devices on your network. Eg, you run hugo server on your Linux box and want to access it via WLAN from your iPhone. Then you set --baseURL to http://192.168.44.xx:port, for example.
You should, however, not run server to server pages in production. Which seems what you’re planning to do. baseURL in your config must be set to the base URL of your site
Not a must but best practice. If you do so, you get the same experience browsing locally (hugo-server) and published (hugo). Makes spotting and solving errors much easier and on the long run will save you time.
You are correct, I am looking to make this a theme. I will move the content over to the exampleSite/. Should I move the data/ files over to exampleSite/ or keep it where it is?
Sorry again for all the questions, but I was wondering if you know of a repo that using GitHub Pages and exampleSite/ that I could refer to? All the ones I have looked at so far use something else for hosting or don’t have it in exampleSite/ like you should.