[postgis-tickets] [SCM] postgis.net branch hugo updated. cd9c1f98af0ed1da37d15ba4d908dd11fcea1186

git at osgeo.org git at osgeo.org
Sun Feb 27 00:43:26 PST 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "postgis.net".

The branch, hugo has been updated
       via  cd9c1f98af0ed1da37d15ba4d908dd11fcea1186 (commit)
      from  0223f16042de79ea7abe9bcfa4a01b1665371e24 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cd9c1f98af0ed1da37d15ba4d908dd11fcea1186
Author: Regina Obe <lr at pcorp.us>
Date:   Sun Feb 27 03:43:21 2022 -0500

    Change to use custom for events

diff --git a/content/events/past.md b/content/events/past.md
index 8af074b..08a26f9 100644
--- a/content/events/past.md
+++ b/content/events/past.md
@@ -7,9 +7,6 @@ thumbnail: event.png
 type: event
 ---
 
-<div style="text-align:left;width:250px;vertical-align: middle">
-	<a href="https://info.crunchydata.com/postgis-day-by-crunchy-data">PostGIS Day 2019 St. Louis</a> <a href="https://info.crunchydata.com/stl-postgis-day-2019-presentations" target="_blank">Videos</a><br />Nov 14 2019, St. Louis, MO, USA
-</div>
 <div style="text-align:left;width:250px;vertical-align: middle">
 	<a href="https://www.postgresql.eu/events/pgconfeu2019/schedule/"><img src="https://2019.pgconf.eu/static/a85ca83/img/logo2019.png" alt="PGConf EU, Milan Italy" style="height:100px;align-content: left"><br />PGConf EU 2019</a><br />Oct 15-18 2019, Milan, Italy
 </div>
diff --git a/content/events/postgisday2019.md b/content/events/postgisday2019.md
new file mode 100644
index 0000000..17a6b95
--- /dev/null
+++ b/content/events/postgisday2019.md
@@ -0,0 +1,13 @@
+---
+title: PostGIS Day 2019
+series: events
+date: "2020-11-18"
+eventDates: "2020 November 18th"
+tags: ["events", "postgisday"]
+type: event
+featured: false
+eventLink: https://info.crunchydata.com/postgis-day-by-crunchy-data
+videosLink: https://info.crunchydata.com/stl-postgis-day-2019-presentations
+location: "St. Louis, MO, USA"
+image: "https://info.crunchydata.com/hubfs/PostGIS%20Day%202020-05.png"
+---
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
new file mode 100644
index 0000000..7f59b9b
--- /dev/null
+++ b/layouts/_default/rss.xml
@@ -0,0 +1,55 @@
+{{- $pctx := . -}}
+{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
+{{- $pages := slice -}}
+{{- if or $.IsHome $.IsSection -}}
+{{- $pages = (where $pctx.RegularPages "Type" "in" site.Params.mainSections) -}}
+{{- else -}}
+{{- $pages = (where $pctx.Pages "Type" "in" site.Params.mainSections) -}}
+{{- end -}}
+{{- $limit := .Site.Config.Services.RSS.Limit -}}
+{{- if ge $limit 1 -}}
+{{- $pages = $pages | first $limit -}}
+{{- end -}}
+{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+  <channel>
+    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
+    <link>{{ .Permalink }}</link>
+    <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
+    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
+    <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
+    <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
+    <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
+    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
+    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
+    {{- with .OutputFormats.Get "RSS" -}}
+    {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
+    {{- end -}}
+    {{ range $pages }}
+    <item>
+      <title>{{ .Title }}</title>
+      <link>{{ .Permalink }}</link>
+      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
+      {{if .Params.author}}<author>{{ .Params.author }}</author>{{end}}
+      <guid>{{ .Permalink }}</guid>
+      <description>
+        {{ if ne site.Params.rss_summary false }}
+          {{ if .Params.summary }}
+            {{ .Params.summary | html }}
+          {{ else if .Params.abstract }}
+            {{ .Params.abstract | html }}
+          {{ else if .Summary }}
+            {{ .Summary | html }}
+          {{ end }}
+          {{ if site.Params.rss_summary_read_more_link }}
+            {{ $trans := i18n "read_more" -}}
+            {{ printf "<p><a href=\"%s\">%s</a></p>" .RelPermalink $trans | html }}
+          {{ end }}
+        {{ else }}
+          {{ .Content | html }}
+        {{ end }}
+      </description>
+    </item>
+    {{ end }}
+  </channel>
+</rss>
diff --git a/layouts/index.html b/layouts/_default/single.html
similarity index 82%
copy from layouts/index.html
copy to layouts/_default/single.html
index 4290953..397d63e 100644
--- a/layouts/index.html
+++ b/layouts/_default/single.html
@@ -10,10 +10,13 @@
 {{- $image := $scratch.Get "image" }}
 {{- $bg := absLangURL (path.Join "images" $image) }}
 <div class="{{ if ne $p.singleColumn true }}grid-inverse {{ end }}wrap content">
+	{{if eq $p.series "events"}}
+		{{- partial "event" . }}
+	{{ else }}
   <article class="post_content">
     {{- $t := .Title }}
     <h1 class="post_title">{{ $t }}</h1>
-    {{- partial "page-meta" . }}
+    {{- partial "post-meta" . }}
     {{- partial "image-feature" . }}
     {{ if $p.toc }}
     <div class="post_toc">
@@ -22,18 +25,9 @@
     </div>
     {{ end }}
     <div class="post_body">
-      {{- .Content }}
+      	{{- .Content }}
     </div>
 
-		<h1 class="post_title">News</h1>
-		<ul style="list-style-type: none" class="posts" id="posts">
-			{{- range where .Site.RegularPages ".Params.category" "eq" ("news") }}
-				{{ partial "excerpt" . }}
-			{{- end }}
-		</ul>
-
-
-
     {{- $showRelatedInArticle := true }}
     {{- if eq $s.showRelatedInArticle false }}
       {{- $showRelatedInArticle = false }}
@@ -57,7 +51,8 @@
 
   </article>
   {{- if ( ne $p.sidebar false ) }}
-    {{- partial "sidehome" . }}
+    {{- partial "sidebar" . }}
   {{ end }}
+	{{ end }}
 </div>
 {{- end }}
diff --git a/layouts/events/single.html b/layouts/events/single.html
deleted file mode 100644
index 124cb64..0000000
--- a/layouts/events/single.html
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ define "main" }}
-  {{- partial "event" . }}
-{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index 4290953..2b48af0 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -27,7 +27,7 @@
 
 		<h1 class="post_title">News</h1>
 		<ul style="list-style-type: none" class="posts" id="posts">
-			{{- range where .Site.RegularPages ".Params.category" "eq" ("news") }}
+			{{- range first 5 (where .Site.RegularPages ".Params.category" "eq" ("news")) }}
 				{{ partial "excerpt" . }}
 			{{- end }}
 		</ul>
diff --git a/layouts/partials/event.html b/layouts/partials/event.html
index 6b2f0d7..9703398 100644
--- a/layouts/partials/event.html
+++ b/layouts/partials/event.html
@@ -1,4 +1,16 @@
 <div class="post_item">
+	<div class="post_neta">
+		{{- with .Params.tags -}}
+    <span>
+      {{- range . }}
+        {{- $tag := urlize . -}}
+        <a href='{{ absLangURL (printf "tags/%s" $tag) }}' title="{{ . }}" class="post_tag button button_translucent">
+          {{- . }}
+        </a>
+      {{- end }}
+    </span>
+  {{- end }}
+	</div>
 	<div class="pale">
 		<a href="{{.Params.eventLink}}">{{- if .Params.image}}<img src="{{.Params.image}}" alt="{{.Title}}" style="height:75px" /><br />{{ end }}
 			<b>{{.Title}}</b><br />
diff --git a/layouts/partials/excerpt.html b/layouts/partials/excerpt.html
new file mode 100644
index 0000000..1539fe0
--- /dev/null
+++ b/layouts/partials/excerpt.html
@@ -0,0 +1,66 @@
+<li class="post_item">
+	{{if eq .Params.series "events"}}
+	{{ partial "event" . }}
+	{{else}}
+  <div class="excerpt">
+    <div class="excerpt_header">
+      <h3 class="post_link">
+        <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title  }}</a>
+      </h3>
+      {{ partial "post-meta" . }}
+    </div>
+    {{- with .Params.thumbnail }}
+    <div class="excerpt_footer partition">
+
+      {{- $file := . | safeURL }}{{/* filename of image */}}
+
+      {{/* Check if page bundles are set. */}}
+      {{- $bundle := $.Site.Params.usePageBundles }}
+      {{ if eq $.Params.usePageBundles false }}
+        {{- $bundle = false }}
+      {{ end }}
+      {{ if eq $.Params.usePageBundles true }}
+        {{- $bundle = true }}
+      {{ end }}
+
+      {{- $fileWeb := "" -}}{{/* full path to image, relative to the web root */}}
+      {{- $fileDisk := "" -}}{{/* full path to image, relative to the file root */}}
+      {{ if eq $bundle true }}
+        {{- $fileWeb = (add $.Page.RelPermalink $file) -}}
+        {{- $fileDisk = (add "/content/" (add $.Page.File.Dir $file)) }}
+      {{ else }}
+        {{- $fileWeb = absURL . -}}
+        {{- $fileDisk = (add "/static/" $file) }}
+      {{ end }}
+
+      {{- if fileExists $fileDisk }}
+        {{- $img := imageConfig $fileDisk -}}{{/* image element (passed through imageConfig) */}}
+
+        {{- partial "image-thumbnail" (dict "file" $file "fileWeb" $fileWeb "fileDisk" $fileDisk "img" $img "alt" $.Title) }}
+
+      {{- else }}
+        {{ partial "image-error" (dict "fileWeb" $fileWeb "fileDisk" $fileDisk "bundle" $bundle) }}
+      {{- end }}
+      {{ else }}
+      <div class="excerpt_footer">
+        {{- end }}
+        <div class="pale">
+          {{- $summary := truncate 320 .Summary }}
+          {{- if .Params.summary }}
+            {{- $summary = .Params.summary }}
+          {{- else if .Params.abstract }}
+            {{ $summary = .Params.abstract }}
+          {{- end }}
+          {{ if not ( strings.Contains $summary "<p>" ) }}
+            <p>{{ $summary }}</p>
+          {{ else }}
+            {{ $summary }}
+          {{ end }}
+          <br>
+          {{- $r := T "read_more" }}
+          <a href="{{ .Permalink }}" title="{{ $r }}" class="excerpt_more button">{{ $r }}</a>
+        </div>
+      </div>
+    </div>
+		{{ end }}
+  </li>
diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html
index 2d99791..49f9cdd 100644
--- a/layouts/partials/post-meta.html
+++ b/layouts/partials/post-meta.html
@@ -5,7 +5,7 @@
 {{- $scratch := newScratch }}
 {{- $scratch.Set "writeSeparator" false }}
 {{- if $showPostMeta }}
-  <div class="post_meta">
+  	<div class="post_meta">
 {{- end }}
   {{- if $showDate }}
 
diff --git a/layouts/partials/sidehome.html b/layouts/partials/sidehome.html
index 120e06f..e6e925e 100644
--- a/layouts/partials/sidehome.html
+++ b/layouts/partials/sidehome.html
@@ -43,14 +43,14 @@
 		{{end }}
 
 		<h2 class="mt-4">Past Events</h2>
-		{{ range first 5 (where $events "Params.featured" "ne" true)  }}
+		{{ range first 3 (where $events "Params.featured" "ne" true)  }}
 				{{ partial "event" . }}
 		{{end }}
 
 			<div class="flex-column wrap">
 				<h2 class="post_related">Tips</h2>
 				<ul class="post_content" style="list-style-type: none;text-indent: -5px;">
-					{{ range where .Site.RegularPages ".Params.category" "eq" ("tips") }}
+					{{ range first 3 (where .Site.RegularPages ".Params.category" "eq" ("tips")) }}
 							{{ partial "excerpt" . }}
 					{{end }}
 				</ul>

-----------------------------------------------------------------------

Summary of changes:
 content/events/past.md                                      |  3 ---
 content/events/postgisday2019.md                            | 13 +++++++++++++
 {themes/hugo-clarity/layouts => layouts}/_default/rss.xml   |  2 +-
 .../hugo-clarity/layouts => layouts}/_default/single.html   |  6 +++++-
 layouts/events/single.html                                  |  3 ---
 layouts/index.html                                          |  2 +-
 layouts/partials/event.html                                 | 12 ++++++++++++
 .../hugo-clarity/layouts => layouts}/partials/excerpt.html  |  4 ++++
 layouts/partials/post-meta.html                             |  2 +-
 layouts/partials/sidehome.html                              |  4 ++--
 10 files changed, 39 insertions(+), 12 deletions(-)
 create mode 100644 content/events/postgisday2019.md
 copy {themes/hugo-clarity/layouts => layouts}/_default/rss.xml (95%)
 copy {themes/hugo-clarity/layouts => layouts}/_default/single.html (93%)
 delete mode 100644 layouts/events/single.html
 copy {themes/hugo-clarity/layouts => layouts}/partials/excerpt.html (96%)


hooks/post-receive
-- 
postgis.net


More information about the postgis-tickets mailing list