Add possibility to include custom CSS files

This commit is contained in:
vimux 2019-01-18 11:53:31 -05:00
parent c54f9a9b06
commit d178091ccd
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
2 changed files with 4 additions and 0 deletions

View file

@ -128,6 +128,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
mainSections = ["post"] # Set main page sections mainSections = ["post"] # Set main page sections
post_meta = ["date", "categories"] # Enable post meta fields in given order post_meta = ["date", "categories"] # Enable post meta fields in given order
dateFormat = "January 02, 2006" # Change the format of dates dateFormat = "January 02, 2006" # Change the format of dates
customCSS = ["css/custom.css"] # Include custom CSS files
authorbox = true # Show authorbox at bottom of single pages if true authorbox = true # Show authorbox at bottom of single pages if true
toc = true # Enable Table of Contents for all site pages toc = true # Enable Table of Contents for all site pages
tocOpen = true # Open Table of Contents block. Optional tocOpen = true # Open Table of Contents block. Optional

View file

@ -13,6 +13,9 @@
{{ template "_internal/twitter_cards.html" . }} {{ template "_internal/twitter_cards.html" . }}
{{- end }} {{- end }}
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}"> <link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
{{- range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}
<link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png"> <link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png">
<link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png"> <link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png">
{{- with .OutputFormats.Get "rss" }} {{- with .OutputFormats.Get "rss" }}