Use camel case for vars
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{{- $href := cond (.Destination | not | not) (printf ` href="%s"` .Destination) "" -}}
|
||||
{{- $targetvalue := partial "paige/func-target.html" (dict "page" .Page "url" .Destination) -}}
|
||||
{{- $targetValue := partial "paige/func-target.html" (dict "page" .Page "url" .Destination) -}}
|
||||
{{- $title := cond (.Title | not | not) (printf ` title="%s"` .Title) "" -}}
|
||||
|
||||
{{- $targetattr := cond ($targetvalue | not | not) (printf ` target="%s"` $targetvalue) "" -}}
|
||||
{{- $targetAttr := cond ($targetValue | not | not) (printf ` target="%s"` $targetValue) "" -}}
|
||||
|
||||
{{- printf `<a%s%s%s>%s</a>` $href $targetattr $title .Text | safeHTML -}}
|
||||
{{- printf `<a%s%s%s>%s</a>` $href $targetAttr $title .Text | safeHTML -}}
|
||||
|
@@ -1,13 +1,13 @@
|
||||
{{ $page := . }}
|
||||
|
||||
{{ $itemattrs := slice }}
|
||||
{{ $itemAttrs := slice }}
|
||||
{{ $microdata := $page.Params.paige.page.microdata }}
|
||||
|
||||
{{ range $k, $v := $microdata }}
|
||||
{{ $itemattrs = $itemattrs | append (printf `%s="%v"` $k $v) }}
|
||||
{{ $itemAttrs = $itemAttrs | append (printf `%s="%v"` $k $v) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $itemattrs = delimit (sort $itemattrs) " " }}
|
||||
{{ $itemAttrs = delimit (sort $itemAttrs) " " }}
|
||||
|
||||
<!doctype html>
|
||||
{{ partial "paige/tag-html.html" $page }}
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col mt-3" id="paige-site" {{ with $itemattrs }} {{ $itemattrs | safeHTMLAttr }} {{ end }}>
|
||||
<div class="col mt-3" id="paige-site" {{ with $itemAttrs }} {{ $itemAttrs | safeHTMLAttr }} {{ end }}>
|
||||
{{ if templates.Exists "partials/paige/site-first.html" }}
|
||||
{{ partial "paige/site-first.html" $page }}
|
||||
{{ end }}
|
||||
|
@@ -98,19 +98,19 @@
|
||||
{{ range $subpage := $subpages }}
|
||||
<entry>
|
||||
{{ $content := .Content }}
|
||||
{{ $external := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
|
||||
{{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }}
|
||||
{{ $paramlink := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
|
||||
{{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $format) "" }}
|
||||
{{ $summary := .Description | markdownify }}
|
||||
{{ $title := .Title | markdownify }}
|
||||
{{ $updated := .Lastmod.Format $format }}
|
||||
|
||||
{{ $link := cond $paramlink .Params.link .Permalink }}
|
||||
{{ $link := cond $external .Params.link .Permalink }}
|
||||
|
||||
{{ if and $content $paramlink }}
|
||||
{{ $link := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
|
||||
{{ if and $content $external }}
|
||||
{{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
|
||||
|
||||
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape .Title) $link | safeHTML }}
|
||||
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape .Title) $text | safeHTML }}
|
||||
|
||||
{{ $content = print $content $footer }}
|
||||
{{ end }}
|
||||
|
@@ -1,19 +1,19 @@
|
||||
{{ $page := . }}
|
||||
|
||||
{{ $build := false }}
|
||||
{{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }}
|
||||
{{ $description := or $page.Description (i18n "paige_recent_content") }}
|
||||
{{ $editor := $page.Param "paige.feed.rss.managing_editor" }}
|
||||
{{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }}
|
||||
{{ $language := site.LanguageCode | default site.Language.Lang }}
|
||||
{{ $lastbuilddate := false }}
|
||||
{{ $limit := site.Config.Services.RSS.Limit }}
|
||||
{{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }}
|
||||
{{ $managingeditor := $page.Param "paige.feed.rss.managing_editor" }}
|
||||
{{ $master := $page.Param "paige.feed.rss.web_master" }}
|
||||
{{ $subpages := slice }}
|
||||
{{ $webmaster := $page.Param "paige.feed.rss.web_master" }}
|
||||
|
||||
{{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }}
|
||||
{{ if or (and (not $lastbuilddate) (not .Lastmod.IsZero)) (and $lastbuilddate (lt $lastbuilddate .Lastmod)) }}
|
||||
{{ $lastbuilddate = .Lastmod }}
|
||||
{{ if or (and (not $build) (not .Lastmod.IsZero)) (and $build (lt $build .Lastmod)) }}
|
||||
{{ $build = .Lastmod }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (.Param "paige.feed.disable") }}
|
||||
@@ -72,19 +72,19 @@
|
||||
<language>{{ . }}</language>
|
||||
{{ end }}
|
||||
|
||||
{{ with $lastbuilddate }}
|
||||
{{ with $build }}
|
||||
<lastBuildDate>{{ . }}</lastBuildDate>
|
||||
{{ end }}
|
||||
|
||||
<link>{{ $link }}</link>
|
||||
|
||||
{{ with $managingeditor }}
|
||||
{{ with $editor }}
|
||||
<managingEditor>{{ . }}</managingEditor>
|
||||
{{ end }}
|
||||
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
{{ with $webmaster }}
|
||||
{{ with $master }}
|
||||
<webMaster>{{ . }}</webMaster>
|
||||
{{ end }}
|
||||
|
||||
@@ -93,12 +93,12 @@
|
||||
{{ $author := "" }}
|
||||
{{ $authors := partial "paige/func-authors.html" . }}
|
||||
{{ $description := .Content }}
|
||||
{{ $external := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
|
||||
{{ $guid := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") (cond (.Params.id | not) .RelPermalink .Params.id) }}
|
||||
{{ $paramlink := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
|
||||
{{ $pubdate := .PublishDate.Format $format }}
|
||||
{{ $published := .PublishDate.Format $format }}
|
||||
{{ $title := .Title | markdownify | plainify | htmlUnescape }}
|
||||
|
||||
{{ $link := cond $paramlink .Params.link .Permalink }}
|
||||
{{ $link := cond $external .Params.link .Permalink }}
|
||||
|
||||
{{ with $authors }}
|
||||
{{ $primary := index . 0 }}
|
||||
@@ -110,10 +110,10 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and $description $paramlink }}
|
||||
{{ $pagelink := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
|
||||
{{ if and $description $external }}
|
||||
{{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
|
||||
|
||||
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $pagelink | safeHTML }}
|
||||
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $text | safeHTML }}
|
||||
|
||||
{{ $description = print $description $footer }}
|
||||
{{ end }}
|
||||
@@ -143,7 +143,7 @@
|
||||
<link>{{ . }}</link>
|
||||
{{ end }}
|
||||
|
||||
{{ with $pubdate }}
|
||||
{{ with $published }}
|
||||
<pubDate>{{ . }}</pubDate>
|
||||
{{ end }}
|
||||
|
||||
|
Reference in New Issue
Block a user