added support for injecting content
This commit is contained in:
parent
25cf285710
commit
15c730e637
10 changed files with 24 additions and 0 deletions
|
|
@ -10,5 +10,6 @@
|
|||
{{- partial "footer.html" . -}}
|
||||
</div>
|
||||
{{- partial "plausible.html" . -}}
|
||||
{{- partial "inject/body.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{{ define "main" }}
|
||||
{{- partial "inject/content-before.html" . -}}
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="date">{{ .Date.Format "2006-01-02" }}</p>
|
||||
|
|
@ -13,6 +14,7 @@
|
|||
</p>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{- partial "inject/content-after.html" . -}}
|
||||
{{ if .Site.Params.commento }}
|
||||
<script
|
||||
defer
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<footer>
|
||||
<hr />
|
||||
{{- partial "inject/footer.html" . -}}
|
||||
<p><small>
|
||||
{{ now.Format "2006" }} © {{ .Site.Copyright }}
|
||||
</small></p>
|
||||
|
|
|
|||
|
|
@ -22,4 +22,5 @@
|
|||
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet">
|
||||
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }}
|
||||
<link type=text/css rel=stylesheet href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" />
|
||||
{{- partial "inject/head.html" . -}}
|
||||
</head>
|
||||
|
|
|
|||
1
layouts/partials/inject/body.html
Normal file
1
layouts/partials/inject/body.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected before closing the body tag -->
|
||||
1
layouts/partials/inject/content-after.html
Normal file
1
layouts/partials/inject/content-after.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected after a post or page content -->
|
||||
1
layouts/partials/inject/content-before.html
Normal file
1
layouts/partials/inject/content-before.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected before a post or page content -->
|
||||
1
layouts/partials/inject/footer.html
Normal file
1
layouts/partials/inject/footer.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected at the beginning of the footer -->
|
||||
1
layouts/partials/inject/head.html
Normal file
1
layouts/partials/inject/head.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!-- This code will be injected before closing the head tag -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue