You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by wa...@apache.org on 2020/10/23 20:30:31 UTC

[openoffice-org] branch main updated: Navigator template in place

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

wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openoffice-org.git


The following commit(s) were added to refs/heads/main by this push:
     new fd17a27  Navigator template in place
fd17a27 is described below

commit fd17a27b4b1900ec6fa42ba707513d00b1a08aa3
Author: Dave Fisher <da...@davefisher.tech>
AuthorDate: Fri Oct 23 13:30:18 2020 -0700

    Navigator template in place
---
 content/topnav.md        |  5 ++++-
 jbake.properties         | 14 ++++----------
 templates/feed.gsp       | 24 ++++++++++++++++++++++++
 templates/navigator.gsp  |  1 +
 templates/navigator.html |  1 -
 5 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/content/topnav.md b/content/topnav.md
index 64c134b..8c35fbd 100644
--- a/content/topnav.md
+++ b/content/topnav.md
@@ -1,4 +1,7 @@
-divid:	topnava
+type=navigator
+status=published
+divid=topnava
+~~~~~~
 
 - [Product][m0]
 - [Download][m1]
diff --git a/jbake.properties b/jbake.properties
index fa4618d..19819e3 100644
--- a/jbake.properties
+++ b/jbake.properties
@@ -2,20 +2,14 @@
 site.host=http://localhost:8820
 render.tags=false
 render.sitemap=false
-template.homepage.file=homepage.gsp
-template.projectspage.file=projectspage.gsp
-template.simplepage.file=simplepage.gsp
-template.retired.file=retired.gsp
+template.brand.file=brand.gsp
+template.navigator.file=navigator.gsp
+template.html_page.file=html_page.gsp
+template.md_page.file=md_page.gsp
 template.archive.file=archive.gsp
 template.tag.file=tags.gsp
 template.sitemap.file=sitemap.gsp
-template.post.file=post.gsp
-template.page.file=page.gsp
 template.feed.file=feed.gsp
-template.guide.file=guide.gsp
-template.proposalGuide.file=guide.gsp
-template.pmcGuide.file=guide.gsp
-template.policy.file=policy.gsp
 render.index=false
 index.file=index.html
 content.folder=content
diff --git a/templates/feed.gsp b/templates/feed.gsp
new file mode 100644
index 0000000..b418c0a
--- /dev/null
+++ b/templates/feed.gsp
@@ -0,0 +1,24 @@
+<% import static groovy.xml.XmlUtil.escapeXml %><?xml version="1.0"?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+  <channel>
+    <title>OpenOffice.org</title>
+    <link>${config.site_host}</link>
+    <atom:link href="${config.site_host}/${config.feed_file}" rel="self" type="application/rss+xml" />
+    <description>OpenOffice.org Feed</description>
+    <language>en-us</language>
+    <pubDate>${new java.text.SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.ENGLISH).format(published_date)}</pubDate>
+    <lastBuildDate>${new java.text.SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.ENGLISH).format(published_date)}</lastBuildDate>
+    <%published_posts.each {post -> %>
+    <item>
+      <title>${post.title}</title>
+      <link>${config.site_host}/${post.uri}</link>
+      <pubDate>${new java.text.SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.ENGLISH).format(post.date)}</pubDate>
+      <guid isPermaLink="false">${post.uri}</guid>
+      <description>
+      ${escapeXml(post.body)}
+	  </description>
+    </item>
+    <%}%>
+
+  </channel> 
+</rss>
\ No newline at end of file
diff --git a/templates/navigator.gsp b/templates/navigator.gsp
new file mode 100644
index 0000000..f2a4678
--- /dev/null
+++ b/templates/navigator.gsp
@@ -0,0 +1 @@
+<div id="${content.divid}">${content.body}</div>
diff --git a/templates/navigator.html b/templates/navigator.html
deleted file mode 100644
index b2e744f..0000000
--- a/templates/navigator.html
+++ /dev/null
@@ -1 +0,0 @@
-<div id="{{ headers.divid }}">{% block content %}{{ content|markdown }}{% endblock %}</div>