Add support for custom CSS and JS assets

This commit is contained in:
George Cushen 2016-05-10 02:20:22 +01:00
commit 280d5ca1d4
3 changed files with 12 additions and 0 deletions

View file

@ -26,6 +26,10 @@ googleAnalytics = ""
# Examples: "Mon, Jan 2, 2006" or "2006-01-02"
date_format = "Mon, Jan 2, 2006"
# Link custom CSS and JS assets (relative to /static/css and /static/js respectively)
custom_css = []
custom_js = []
[[params.education]]
course = "PhD in Artificial Intelligence"
institution = "Stanford University"

View file

@ -3,6 +3,9 @@
<script src="{{ .Site.BaseURL }}js/jquery-1.12.3.min.js"></script>
<script src="{{ .Site.BaseURL }}js/bootstrap.min.js"></script>
<script src="{{ .Site.BaseURL }}js/hugo-academic.js"></script>
{{ range .Site.Params.custom_js }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}js/{{ . }}">
{{ end }}
{{ with .Site.GoogleAnalytics }}
<script>

View file

@ -15,6 +15,11 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/academicons.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/hugo-academic.css" />
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}css/{{ . }}">
{{ end }}
<link rel="shortcut icon" href="{{ .Site.BaseURL }}img/favicon.ico" type="image/x-icon" />
<link rel="canonical" href="{{ .Permalink }}" />