You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by bd...@apache.org on 2023/04/20 16:14:33 UTC

[comdev-site] branch main updated: COMDEV-529 create /blog/ section

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

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


The following commit(s) were added to refs/heads/main by this push:
     new de3b576  COMDEV-529 create /blog/ section
de3b576 is described below

commit de3b576e0e4f0984adc1b0ea388ce56f3ee863ca
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Apr 20 18:14:24 2023 +0200

    COMDEV-529 create /blog/ section
---
 layouts/_default/baseof.html           |  1 +
 layouts/_default/list.html             |  8 +++++++-
 layouts/_default/single.html           |  4 ++++
 layouts/partials/page-summary.html     |  9 +++++++++
 layouts/partials/pagination.html       | 15 +++++++++++++++
 layouts/partials/published-date.html   |  1 +
 source/blog/2023-preparing-the-move.md | 10 ++++++++++
 source/blog/_index.md                  | 14 ++++++++++++++
 static/css/main.css                    | 17 +++++++++++++++++
 9 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 040042a..7d5f5ea 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -133,6 +133,7 @@
                 Join the Conversation
               </a>
               <div class="dropdown-menu" aria-labelledby="conversDropdown">
+                <a class="dropdown-item" href="/blog/">Blog</a>
                 <a class="dropdown-item" href="https://www.facebook.com/ApacheSoftwareFoundation">Facebook</a>
                 <a class="dropdown-item" href="https://twitter.com/ApacheCommunity">Twitter</a>
                 <a class="dropdown-item" href="/lists.html">Mailing List</a>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index c1339be..5e47456 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,3 +1,9 @@
 {{ define "main" }}
-	{{ .Content }}
+    {{ .Content }}
+    {{ if .Params.list_pages }}
+        <ul class="child-pages">
+            {{ range .Paginator.Pages.ByWeight }} {{ partial "page-summary" . }} {{ end }}
+            <section>{{ partial "pagination" .}}</section>
+        </ul>
+    {{ end }}
 {{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index c1339be..78f64cf 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,3 +1,7 @@
 {{ define "main" }}
+	{{ if .Params.blog_post }}
+		<h2>{{ .Title }}</h2>
+		{{ partial "published-date" .}}
+	{{ end }}
 	{{ .Content }}
 {{ end }}
diff --git a/layouts/partials/page-summary.html b/layouts/partials/page-summary.html
new file mode 100644
index 0000000..a49ed07
--- /dev/null
+++ b/layouts/partials/page-summary.html
@@ -0,0 +1,9 @@
+<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>
+    </h2>
+    {{ if .Description }}
+    <p class="summary" itemprop="about">{{ .Description }}</p>
+    {{ end }}
+</li>
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
new file mode 100644
index 0000000..95353e5
--- /dev/null
+++ b/layouts/partials/pagination.html
@@ -0,0 +1,15 @@
+<nav class="pagination pager align-center">
+            <hr>
+    <ul>
+           {{if .Paginator.HasPrev }}
+        <li class="prev"><a href="{{ .Paginator.Prev.URL }}">Previous</a></li>
+        {{ end }}
+        <li>
+
+        <a href="" class="button round small outline">Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</a>
+        </li>
+            {{ if .Paginator.HasNext }}</a>
+        <li class="next"><a href="{{ .Paginator.Next.URL }}">Next</a></li>
+           {{ end }}
+    </ul>
+</nav>
\ No newline at end of file
diff --git a/layouts/partials/published-date.html b/layouts/partials/published-date.html
new file mode 100644
index 0000000..084dd32
--- /dev/null
+++ b/layouts/partials/published-date.html
@@ -0,0 +1 @@
+<span class="published-date">{{ time.Format "Monday, Jan 2, 2006" .Date }}</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
new file mode 100644
index 0000000..f4de61e
--- /dev/null
+++ b/source/blog/2023-preparing-the-move.md
@@ -0,0 +1,10 @@
+---
+title: Preparing the Community Development blog move
+url: /blog/preparing-the-move/
+description: We're about to move our blog here
+date: 2023-04-20
+blog_post: true
+---
+
+We're in the process of moving our content here from the 
+existing [blogs.apache.org](https://blogs.apache.org/) location.
diff --git a/source/blog/_index.md b/source/blog/_index.md
new file mode 100644
index 0000000..9c3666f
--- /dev/null
+++ b/source/blog/_index.md
@@ -0,0 +1,14 @@
+---
+title: Community Development Blog
+url: /blog/
+list_pages: true
+---
+
+## Community Development Blog
+
+Contributions to this blog are welcome!
+
+We are looking for posts related community building, community-related success or failure stories
+and related topics.
+
+### Posts
\ No newline at end of file
diff --git a/static/css/main.css b/static/css/main.css
index b7ccc4a..87b221d 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -27,3 +27,20 @@ footer.page-footer .footer-copyright {
 dt:hover > .headerlink, p:hover > .headerlink, td:hover > .headerlink, h1:hover > .headerlink, h2:hover > .headerlink, h3:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, h6:hover > .headerlink {
   visibility: visible
 }
+
+.child-pages {
+  list-style-type: none;  
+}
+.page-summary .title {
+  font-size:100%;
+}
+
+.page-summary .summary {
+  margin-left: 1em;
+  font-style: italic;
+}
+
+.published-date {
+  font-size: 80%;
+  font-style: italic;
+}
\ No newline at end of file