feat: Added support for Google Fonts (#255)
| | |
| | | - Open Graph support |
| | | - MIT License |
| | | - Fontawesome 5.15.1 icons |
| | | - Google Fonts support |
| | | - Custom CSS (optional) |
| | | - Custom JavaScript (optional) |
| | | - Medium like zoom for images |
| | |
| | | |
| | | Replace the hash with the one Google provided you. |
| | | |
| | | ### Google Fonts |
| | | |
| | | You can enable any [Google Font](https://fonts.google.com/) by selecting a font on the Google Font website and adding the `family` parameter of the font url to the `googleFonts` option in `[params]`, e.g.: |
| | | |
| | | ```toml |
| | | [params] |
| | | googleFonts = [ |
| | | "Indie+Flower", |
| | | "Roboto:ital,wght@0,100;0,400;0,700;1,400" |
| | | ] |
| | | ``` |
| | | |
| | | ### Beautiful math functions |
| | | |
| | | ```toml |
| | |
| | | doNotLoadAnimations = false |
| | | # Form Spree Contact Form |
| | | #contactFormAction = "https://formspree.io/f/your-form-hash-here" |
| | | # Google Fonts |
| | | #googleFonts = ["Indie+Flower", "Roboto:ital,wght@0,100;0,400;0,700;1,400"] |
| | | # Google Site Verify |
| | | #googleSiteVerify = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" |
| | | singleDateFormat = "2/1/2006" |
| | |
| | | /> |
| | | |
| | | {{- end -}} |
| | | {{ if .Site.Params.googleFonts }} |
| | | {{ $baseUrl := "https://fonts.googleapis.com/css2?family=" }} |
| | | {{ $fontParam := delimit .Site.Params.googleFonts "&family=" }} |
| | | {{ $url := printf "%s" "&display=swap" | printf "%s%s" $fontParam | printf "%s%s" $baseUrl | printf "%s" }} |
| | | <link rel="preconnect" href="https://fonts.googleapis.com"> |
| | | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| | | <link href="{{ $url }}" rel="stylesheet"> |
| | | |
| | | {{- end -}} |
| | | |
| | | |
| | | <!-- Favicons --> |