Skip to content

Instantly share code, notes, and snippets.

View LochanLoch's full-sized avatar
🏠
Working from home

LochanLoch

🏠
Working from home
  • Germany - Unknown City - Lost City ;-)
View GitHub Profile
@candidexmedia
candidexmedia / Publii-Google-Fonts-Self-Hosted.md
Last active December 22, 2023 03:33
Self-Host Google Fonts to Publii

(Code Snippets for: https://forum.getpublii.com/topic/where-should-the-font-files-be-put-if-self-host-google-fonts/#post-7040)

Update: it is now easier than ever to add custom fonts in Publii. See: How to Add a Custom Font (Publii Docs). You can still use the Google Webfonts Helper to download the woff2 files (or download directly from the Google Fonts, or the Font Foundry)

In terms of where to put the fonts: that's up to you. I've shared what I've done for my sites below.

In terms of referring: I would just use the Google Webfonts Helper to go faster: https://gwfh.mranftl.com/fonts. Just indicate which fonts you want, which weights, charset, where the files are located, etc. and it will format the code that you need to add at the top of your main.css file. This code will include the src.

@johan
johan / laughing-man.svg
Created July 6, 2011 04:56
The Laughing Man (Ghost in the Shell), 1000 byte SVG :-)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.