Remove func-content.html

This commit is contained in:
Will Faught
2025-03-07 18:30:15 -08:00
parent 7f5f41f276
commit 65e307e0ad
4 changed files with 3 additions and 34 deletions

View File

@@ -1,31 +0,0 @@
{{ $page := . }}
{{ $result := $page.Content }}
{{ $matches := findRESubmatch "<h([1-6])[ >]" $result }}
{{ with $matches }}
{{ $max := 0 }}
{{ range . }}
{{ $level := index . 1 | int }}
{{ if gt $level $max }}
{{ $max = $level }}
{{ end }}
{{ end }}
{{ if and $max (lt $max 6) }}
{{ $shift := sub 6 $max }}
{{ range seq $max | collections.Reverse }}
{{ $old := . }}
{{ $new := add $old $shift }}
{{ $result = replaceRE (printf "<h%d([ >])" $old) (printf "<h%d$1" $new) $result }}
{{ $result = replaceRE (printf "</h%d>" $old) (printf "</h%d>" $new) $result }}
{{ end }}
{{ end }}
{{ end }}
{{ return $result }}

View File

@@ -1,7 +1,7 @@
{{ $page := . }}
{{ $class := slice }}
{{ $content := partial "paige/func-content.html" $page }}
{{ $content := $page.Content }}
{{ $draft := $page.Draft }}
{{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }}
{{ $future := and $page.PublishDate (gt $page.PublishDate now) }}