Enable custom CSS and bring in writing layout from blog.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -50,6 +50,13 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Params.custom_css }}
|
||||||
|
{{ range $customCss := .Params.custom_css }}
|
||||||
|
{{ $renderedCustomCss := page.Resources.Get $customCss | css.Sass (dict "includePaths" (slice "themes/vanilla/assets/scss")) | resources.Minify }}
|
||||||
|
<link rel="stylesheet" href="{{ $renderedCustomCss.Permalink }}">
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if hugo.IsServer }}
|
{{ if hugo.IsServer }}
|
||||||
<!-- KaTeX auto-rendering for when we don't have a post-processing step. -->
|
<!-- KaTeX auto-rendering for when we don't have a post-processing step. -->
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
|
||||||
|
|||||||
25
layouts/writing/baseof.html
Normal file
25
layouts/writing/baseof.html
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{{- /* Note: changing the baseof template because the title, tags, etc. of a regular post are still valid. */ -}}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ .Site.Language.Lang }}">
|
||||||
|
{{- partial "head.html" . -}}
|
||||||
|
<body>
|
||||||
|
{{ with .Params.body_start_partial }}
|
||||||
|
{{ partial . $ }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ $writingcss := resources.Get "scss/writing.scss" | css.Sass | resources.Minify }}
|
||||||
|
<link rel="stylesheet" href="{{ $writingcss.Permalink }}">
|
||||||
|
{{- partial "header.html" . -}}
|
||||||
|
<div class="container"><hr class="header-divider"></div>
|
||||||
|
<main class="container">
|
||||||
|
|
||||||
|
{{- if .Draft -}}
|
||||||
|
{{- partial "warning.html" (i18n "postDraft") -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- block "main" . }}{{- end }}
|
||||||
|
</main>
|
||||||
|
{{- block "after" . }}{{- end }}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user