Files
cocoa-eh-hugo-theme/layouts/partials/head_includes.html
Robin Stocker 97f796f224 Support additional languages for highlight.js
highlight.min.js only includes 22 commonly used languages. E.g. Go and
Rust are not part of that set. This change allows users to add the JS
for additional languages via a config option.

I've also updated the library to the newest version.
2016-12-02 11:21:00 +11:00

57 lines
1.5 KiB
HTML

<!-- HTTPS -->
<script type="text/javascript">
var baseURL = '{{ .Site.BaseURL }}';
var host = baseURL.substring(0, baseURL.length - 1).replace(/\//g, '');
if ((host === window.location.host) && (window.location.protocol !== 'https:')) {
window.location.protocol = 'https:';
}
</script>
<!-- CSS -->
{{ if .Site.Params.highlightjs }}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/styles/default.min.css">
{{ end }}
{{ if eq true .Site.Params.cachebuster }}
<link rel="stylesheet" href="/css/reset.css">
<link rel="stylesheet" href="/css/pygments.css">
<link rel="stylesheet" href="/css/main.css">
{{range .Site.Params.extracssfiles}}
<link rel="stylesheet" href="{{.}}">
{{end}}
{{ else }}
<link rel="stylesheet" href="/css/reset.css?{{ .Now.Unix }}">
<link rel="stylesheet" href="/css/pygments.css?{{ .Now.Unix }}">
<link rel="stylesheet" href="/css/main.css?{{ .Now.Unix }}">
{{range .Site.Params.extracssfiles}}
<link rel="stylesheet" href="{{.}}?{{ .Now.Unix }}">
{{end}}
{{ end }}
<!-- Icon -->
<link rel="shortcut icon"
{{ if .Site.Params.faviconfile }}
href="/{{ .Site.Params.faviconfile }}"
{{ else }}
href="/img/favicon.ico"
{{ end }}
>
<!-- RSS -->
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->