Security issues documented, and more nice improvements

This commit is contained in:
2022-06-10 15:35:31 +00:00
parent f3668df846
commit 93934438c7
21 changed files with 178 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
{{ define "main" }}
<article>
<header>
<h1>{{ .Title | humanize }}</h1>
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
{{if gt (len .Pages) 0}}
@@ -10,9 +10,7 @@
<ul class='contents'>
{{ range .Pages }}
<br />
<a href='{{ .RelPermalink }}'>
<li>{{ partial "summary.html" . }}</li>
</a>
<a href='{{ .RelPermalink }}'><li>{{ partial "summary.html" . }}</li></a>
{{ end }}
</ul>
{{ end }}

View File

@@ -1,7 +1,7 @@
{{ define "main" }}
<article>
<header>
<h1>{{ .Title | humanize }}</h1>
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
</article>

View File

@@ -1,4 +1,4 @@
{{ if .IsTranslated }}<h4>{{ T "translations" }}</h4>
{{ if .IsTranslated }}<h6>{{ T "translations" }}:</h6>
<ul>{{ range .Translations }}
<li>
<a href='{{ .RelPermalink }}'>{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>

View File

@@ -2,8 +2,7 @@
{{- $lastmod := .Lastmod.Format "02/01/2006" }}
<article>
<div>
<!-- <h3><a href='{{ .RelPermalink }}'>{{ .Title }}</a></h3> -->
<h3>{{ .Title | humanize }}</h3>
<h3>{{ .Title }}</h3>
{{ i18n "published" }} {{ $pubdate }}
{{ if ne $pubdate $lastmod }}
{{ i18n "modified" }} {{ $lastmod }}

View File

@@ -1,21 +1,32 @@
<aside id='meta'>
<header>
<h4>{{ or (.Param "tit") .Title | humanize }}</h4>
<h4>{{ or (.Param "tit") .Title }}</h4>
<p>
{{ i18n "readingTime" .ReadingTime }}.
{{ i18n "wordCount" .WordCount }}.
{{ i18n "readingTime" .ReadingTime }}.
</p>
</header>
{{ if .Param "docs" }}
<h6>Documentation:</h6>
<h5>Documentation:</h5>
<ul>
{{ range .Param "docs" }}
<li><a href='{{ .url }}' target='_blank'>{{ .name }}</a></li>
<li><a href='{{ .url }}' target='_blank'>{{ .name }}</a></li>
{{ end }}</ul>{{ end }}
{{ with .Param "git" }}
<p>Check out the git repo; <a href='{{ .url }}'>{{ .name }}</a>!</p>
{{ end }}
<h6>Table of Contents:</h6>
{{ .TableOfContents }}
{{ $toc := .TableOfContents }}
{{ if ne $toc "<nav id=\"TableOfContents\"></nav>" }}
<h6>Table of Contents:</h6>
{{ $toc }}
{{ end }}
{{ partial "i18n/list.html" . }}
{{ if and (ne (len .Pages) 0) $.IsNode }}
<h5>Posts:</h5>
<ul>
{{ range .Pages }}
<li><a href='{{ .RelPermalink }}' target='_top'>{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
</aside>

View File

@@ -2,4 +2,9 @@
{{ if .Get 1 }}
{{ $opts = $opts | append (split (.Get 1) ",") }}
{{ end }}
{{ transform.Highlight (htmlUnescape .Inner) (.Get 0) (delimit $opts ",") }}
{{ $content := .Inner }}
{{ $in := split .Inner "\n" }}
{{ if gt (len $in) 1 }}
{{ $content = (delimit (after 1 $in) "\n") }}
{{ end }}
{{ transform.Highlight (htmlUnescape $content) (.Get 0) (delimit $opts ",") }}