You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by rl...@apache.org on 2023/04/29 08:46:36 UTC

[comdev-site] 04/06: Add published_by entry to blog posts

This is an automated email from the ASF dual-hosted git repository.

rlenferink pushed a commit to branch import-blogs
in repository https://gitbox.apache.org/repos/asf/comdev-site.git

commit 8f987ec5de439ae0a6c085eeeb042d466a91f327
Author: Roy Lenferink <le...@gmail.com>
AuthorDate: Sat Apr 29 10:43:32 2023 +0200

    Add published_by entry to blog posts
---
 layouts/_default/single.html           | 2 +-
 layouts/partials/page-summary.html     | 2 +-
 layouts/partials/published-date.html   | 1 -
 layouts/partials/published-info.html   | 6 ++++++
 source/blog/2023-preparing-the-move.md | 1 +
 static/css/main.css                    | 2 +-
 6 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 78f64cf..d1ea9b5 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,7 +1,7 @@
 {{ define "main" }}
 	{{ if .Params.blog_post }}
 		<h2>{{ .Title }}</h2>
-		{{ partial "published-date" .}}
+		{{ partial "published-info" .}}
 	{{ end }}
 	{{ .Content }}
 {{ end }}
diff --git a/layouts/partials/page-summary.html b/layouts/partials/page-summary.html
index a49ed07..b09828d 100644
--- a/layouts/partials/page-summary.html
+++ b/layouts/partials/page-summary.html
@@ -1,7 +1,7 @@
 <li class="page-summary" itemscope itemtype="http://schema.org/CreativeWork">
     <h2 class="title">
         <a href="{{ .Permalink }}" itemprop="headline">{{ .Title }}</a>
-        <p>{{ partial "published-date" .}}</p>
+        <p>{{ partial "published-info" .}}</p>
     </h2>
     {{ if .Description }}
     <p class="summary" itemprop="about">{{ .Description }}</p>
diff --git a/layouts/partials/published-date.html b/layouts/partials/published-date.html
deleted file mode 100644
index 084dd32..0000000
--- a/layouts/partials/published-date.html
+++ /dev/null
@@ -1 +0,0 @@
-<span class="published-date">{{ time.Format "Monday, Jan 2, 2006" .Date }}</span>
\ No newline at end of file
diff --git a/layouts/partials/published-info.html b/layouts/partials/published-info.html
new file mode 100644
index 0000000..495f5eb
--- /dev/null
+++ b/layouts/partials/published-info.html
@@ -0,0 +1,6 @@
+<span class="published-info">Published on {{ time.Format "Monday, Jan 2, 2006" .Date }}
+
+    {{ if .Params.Published_by }}
+    by {{ .Params.Published_by }}
+    {{ end }}
+</span>
\ No newline at end of file
diff --git a/source/blog/2023-preparing-the-move.md b/source/blog/2023-preparing-the-move.md
index 7ed525f..3039ab1 100644
--- a/source/blog/2023-preparing-the-move.md
+++ b/source/blog/2023-preparing-the-move.md
@@ -3,6 +3,7 @@ title: Preparing the Community Development blog move
 description: We're about to move our blog here
 date: 2023-04-20
 blog_post: true
+published_by: bdelacretaz
 tags: ["blog","help-wanted"]
 ---
 
diff --git a/static/css/main.css b/static/css/main.css
index ff4e60e..08baacb 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -40,7 +40,7 @@ dt:hover > .headerlink, p:hover > .headerlink, td:hover > .headerlink, h1:hover
   font-style: italic;
 }
 
-.published-date {
+.published-info {
   font-size: 80%;
   font-style: italic;
 }