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/29 19:11:56 UTC

[openoffice-org] branch main updated: Cleanup templates, further work on template readme, and restore google analytics

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 e1501a2  Cleanup templates, further work on template readme, and restore google analytics
e1501a2 is described below

commit e1501a28770e380779905f5b251f82eb9e87c846
Author: Dave Fisher <da...@davefisher.tech>
AuthorDate: Thu Oct 29 12:10:37 2020 -0700

    Cleanup templates, further work on template readme, and restore google analytics
---
 content/privacy.md              |  12 +-
 content/privacy_old.md          |  27 ----
 templates/README.md             |  56 +++++--
 templates/html_page.html        |   3 -
 templates/page.gsp              |   2 +
 templates/single_narrative.html |   1 -
 templates/skeleton.html         |  29 ----
 templates/ssi.json              | 322 ----------------------------------------
 8 files changed, 54 insertions(+), 398 deletions(-)

diff --git a/content/privacy.md b/content/privacy.md
index b40af3e..5c1ee5a 100644
--- a/content/privacy.md
+++ b/content/privacy.md
@@ -3,7 +3,8 @@ notice=http://www.apache.org/licenses/LICENSE-2.0
 ~~~~~~
 
 Information about your use of this website is collected using server access
-logs. The collected information consists of the following:
+logs and a tracking cookie. The collected information consists of the
+following:
 
 1. The IP address from which you access the website;
 1. The type of browser and operating system you use to access our site;
@@ -11,11 +12,10 @@ logs. The collected information consists of the following:
 1. The pages you visit; and
 1. The addresses of pages from where you followed a link to our site.
 
-Access logs are retained for up to 30 days. Aggregate information is extracted.
-
-The formerly used tracking cookie set by the [Google Analytics](https://www.google.com/analytics/) service and handled by
-Google as described in their [privacy policy](https://www.google.com/privacy.html) may be deleted.
-See your browser documentation for instructions on how to disable or delete the
+Part of this information is gathered using a tracking cookie set by the
+[Google Analytics](https://www.google.com/analytics/) service and handled by
+Google as described in their [privacy policy](https://www.google.com/privacy.html).
+See your browser documentation for instructions on how to disable the
 cookie if you prefer not to share this data with Google.
 
 We use the gathered information to help us make our site more useful to
diff --git a/content/privacy_old.md b/content/privacy_old.md
deleted file mode 100644
index 90c47bc..0000000
--- a/content/privacy_old.md
+++ /dev/null
@@ -1,27 +0,0 @@
-title=Apache OpenOffice - Privacy (Old)
-notice=http://www.apache.org/licenses/LICENSE-2.0
-~~~~~~
-
-Information about your use of this website is collected using server access
-logs and a tracking cookie. The collected information consists of the
-following:
-
-1. The IP address from which you access the website;
-1. The type of browser and operating system you use to access our site;
-1. The date and time you access our site;
-1. The pages you visit; and
-1. The addresses of pages from where you followed a link to our site.
-
-Part of this information is gathered using a tracking cookie set by the
-[Google Analytics](https://www.google.com/analytics/) service and handled by
-Google as described in their [privacy policy](https://www.google.com/privacy.html).
-See your browser documentation for instructions on how to disable the
-cookie if you prefer not to share this data with Google.
-
-We use the gathered information to help us make our site more useful to
-visitors and to better understand how and when our site is used. We do not
-track or collect personally identifiable information or associate gathered
-data with any personally identifying information from other sources.
-
-By using this website, you consent to the collection of this data in the
-manner and for the purpose described above.
diff --git a/templates/README.md b/templates/README.md
index 0f3e516..82bd745 100644
--- a/templates/README.md
+++ b/templates/README.md
@@ -4,14 +4,50 @@ This describes the Simple Groovy templates (GSP) that are used to build the site
 
 ## Templates that Generate HTML
 
-1. page.gsp
+1. `page.gsp`
    This template is used to generate html pages from both html and md files. It uses the following steps.
-   * If an html file then html_extract.gsp is included to parse the html into the header, bodytag, and body.
-   * breadcrumbs.gsp is included to generate the breadcrumbs and save the uri path to each directory on that content's path.
-   * ssi_paths.gsp is included to determine which brand, topnav, leftnav, and rightnav SSIs to include. leftnav and rightnav are optional.
-   * the html skeleton is then filled in with the data model.
 
-1. brand.gsp
+```
+<%
+  // from jbake - content.file, content.uri and content.body
+  // from page metadata - content.title and content.css
+  if ( content.file.endsWith(".html") ) {
+    // using content.body if html get content.header, content.bodytag, and content.extracted_body
+    include "html_extract.gsp"
+  }
+  // insert breadcrumbs and ssi logic
+  // using content.uri get content.breadcrumbs and content.ssi[]
+  include "breadcrumbs.gsp"
+  // using content.ssi[] get content.brand, content.topnav, content.leftnav and content.rightnav
+  include "ssi_paths.gsp"
+%>
+```
+   The html skeleton may use any of the following content model properties
+   - content.header (optional)
+   - content.title (optional)
+   - content.css (optional)
+   - content.bodytag
+   - content.brand
+   - content.topnav
+   - content.breadcrumbs
+   - content.leftnav (optional)
+   - content.rightnav (optional)
+   - content.extracted_body (html)
+   - content.body (md)
+
+   The following SSI files may be used.
+   - `/doctype.html`
+   - `/scripts/google-analytics.js`
+   - `/scripts/entourage.js`
+   - content.brand
+   - content.topnav
+   - content.leftnav (optional)
+   - content.rightnav (optional)
+   - `/footer.html`
+
+   The CSS file that is used for these pages is `/css/ooo.css`
+   
+1. `brand.gsp`
    This template is used to generate the top / branding portion of each page included with SSI.
    These files are used to provide translated versions of the brand.
    brand.md files cause the creation of these html SSIs using metadata to be filled into the template.
@@ -32,11 +68,11 @@ announcetip=Apache OpenOffice 4.1.7 released
 ~~~~~~
 ```
 
-1. navigator.gsp
+1. `navigator.gsp`
    This template is used to generate navigator SSI. These come in three flavors:
-   * topnav.md
-   * leftnav.md
-   * rightnav.md
+   * `topnav.md`
+   * `leftnav.md`
+   * `rightnav.md`
 
 ```
 type=navigator
diff --git a/templates/html_page.html b/templates/html_page.html
deleted file mode 100644
index 40148eb..0000000
--- a/templates/html_page.html
+++ /dev/null
@@ -1,3 +0,0 @@
-{% extends "skeleton.html" %}
-  {% block content %}{% autoescape off %}{{ content }}{% endautoescape %}{% endblock %}
-{$ endextends $}
diff --git a/templates/page.gsp b/templates/page.gsp
index 88abb45..e6bbafe 100644
--- a/templates/page.gsp
+++ b/templates/page.gsp
@@ -23,6 +23,8 @@
     <% } %>
     <% } %>
     <link href="/css/ooo.css" rel="stylesheet" type="text/css">
+    <!--#include virtual="/scripts/google-analytics.js" --> 
+    <!--#include virtual="/scripts/entourage.js" -->
   </head>
   <body<% if (content.bodytag) { %>${content.bodytag}<% } %>>
     <!--#include virtual="${content.brand}" -->
diff --git a/templates/single_narrative.html b/templates/single_narrative.html
deleted file mode 100644
index 19d6b98..0000000
--- a/templates/single_narrative.html
+++ /dev/null
@@ -1 +0,0 @@
-{% extends "skeleton.html" %}
diff --git a/templates/skeleton.html b/templates/skeleton.html
deleted file mode 100644
index a1f7b06..0000000
--- a/templates/skeleton.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--#include virtual="{{ ssi.headers.doctype }}" -->
-<html>
-<head>
-<link href="/css/ooo.css" rel="stylesheet" type="text/css">
-{% if head %}{{ head|safe }}{% else %}
-<title>{% block title %}{{ headers.title }}{% endblock %}</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-{% if headers.css %}<link href="{{ headers.css }}" rel="stylesheet" type="text/css">{% endif %}
-{% endif %}
-<!--#include virtual="/scripts/google-analytics.js" --> 
-<!--#include virtual="/scripts/entourage.js" -->
-</head>
-<body{% if bodytag %} {{ bodytag|safe }}{% endif %}>
-<!--#include virtual="{{ ssi.headers.brand }}" -->
-  <div id="topbara">
-    {% if ssi.headers.topnav %}<!--#include virtual="{{ ssi.headers.topnav }}" -->{% endif %}
-    <div id="breadcrumbsa">{% block breaddcrumbs %}{{ breadcrumbs|safe }}{% endblock %}</div>
-  </div>
-  <div id="clear"></div>
-  {% if ssi.headers.leftnav %}<!--#include virtual="{{ ssi.headers.leftnav }}" -->{% endif %}
-  {% if ssi.headers.rightnav %}<!--#include virtual="{{ ssi.headers.rightnav }}" -->{% endif %}
-  <div id="content">
-    {% block legacy %}{% if ssi.headers.legacy %}<div class="legacy">{{ ssi.headers.legacy }}</div>{% endif %}{% endblock %}
-    {% block title %}{% if headers.title %}<h1 class="title">{{ headers.title }}</h1>{% endif %}{% endblock %}
-    {% block content %}{{ content|markdown }}{% endblock %}
-  </div>
-<!--#include virtual="{{ ssi.headers.footer }}" -->
-</body>
-</html>
diff --git a/templates/ssi.json b/templates/ssi.json
deleted file mode 100644
index 1e56c8b..0000000
--- a/templates/ssi.json
+++ /dev/null
@@ -1,322 +0,0 @@
-{
-    "/": {
-	"brand":"/brand.html",
-	"topnav":"/topnav.html",
-    }
-    "/sl/": {
-	"brand":"/sl/brand.html",
-	"topnav":"/sl/topnav.html"
-    }
-    "/sk/": {
-	"brand":"/sk/brand.html",
-	"topnav":"/sk/topnav.html"
-    }
-    "/kab/": {
-	"brand":"/kab/brand.html",
-	"topnav":"/kab/topnav.html"
-    }
-    "/pl/why/": {
-	"leftnav":"/pl/why/leftnav.html"
-    }
-    "/pl/product/": {
-	"leftnav":"/pl/product/leftnav.html"
-    }
-    "/pl/": {
-	"brand":"/pl/brand.html",
-	"topnav":"/pl/topnav.html"
-    }
-    "/l10n/": {
-	"topnav":"/l10n/topnav.html",
-	"leftnav":"/l10n/leftnav.html",
-	"rightnav":"/l10n/rightnav.html"
-    }
-    "/vi/": {
-	"brand":"/vi/brand.html",
-	"topnav":"/vi/topnav.html"
-    }
-    "/sv/product/": {
-	"leftnav":"/sv/product/leftnav.html"
-    }
-    "/sv/": {
-	"brand":"/sv/brand.html",
-	"topnav":"/sv/topnav.html"
-    }
-    "/he/why/": {
-	"leftnav":"/he/why/leftnav.html"
-    }
-    "/he/product/": {
-	"leftnav":"/he/product/leftnav.html"
-    }
-    "/he/": {
-	"topnav":"/he/topnav.html",
-	"brand":"/he/brand.html"
-    }
-    "/km/": {
-	"brand":"/km/brand.html",
-	"topnav":"/km/topnav.html"
-    }
-    "/hy/": {
-	"brand":"/hy/brand.html",
-	"topnav":"/hy/topnav.html"
-    }
-    "/why/": {
-	"leftnav":"/why/leftnav.html"
-    }
-    "/am/": {
-	"brand":"/am/brand.html",
-	"topnav":"/am/topnav.html"
-    }
-    "/da/why/": {
-	"leftnav":"/da/why/leftnav.html"
-    }
-    "/da/product/": {
-	"leftnav":"/da/product/leftnav.html"
-    }
-    "/da/": {
-	"brand":"/da/brand.html",
-	"topnav":"/da/topnav.html"
-    }
-    "/no/why/": {
-	"leftnav":"/no/why/leftnav.html"
-    }
-    "/no/product/": {
-	"leftnav":"/no/product/leftnav.html"
-    }
-    "/no/": {
-	"topnav":"/no/topnav.html",
-	"brand":"/no/brand.html"
-    }
-    "/ja/": {
-	"brand":"/ja/brand.html",
-	"topnav":"/ja/topnav.html"
-    }
-    "/el/": {
-	"brand":"/el/brand.html",
-	"topnav":"/el/topnav.html"
-    }
-    "/it/": {
-	"brand":"/it/brand.html",
-	"topnav":"/it/topnav.html"
-    }
-    "/om/": {
-	"brand":"/om/brand.html",
-	"topnav":"/om/topnav.html"
-    }
-    "/ca/": {
-	"brand":"/ca/brand.html",
-	"topnav":"/ca/topnav.html"
-    }
-    "/is/": {
-	"brand":"/is/brand.html",
-	"topnav":"/is/topnav.html"
-    }
-    "/cs/": {
-	"brand":"/cs/brand.html",
-	"topnav":"/cs/topnav.html"
-    }
-    "/ru/why/": {
-	"leftnav":"/ru/why/leftnav.html"
-    }
-    "/ru/": {
-	"brand":"/ru/brand.html"
-	"topnav":"/ru/topnav.html"
-    }
-    "/product/": {
-	"leftnav":"/product/leftnav.html"
-    }
-    "/zh-cn/": {
-	"brand":"/zh-cn/brand.html",
-	"topnav":"/zh-cn/topnav.html"
-    }
-    "/pt/why/": {
-	"leftnav":"/pt/why/leftnav.html"
-    }
-    "/pt/product/": {
-	"leftnav":"/pt/product/leftnav.html"
-    }
-    "/pt/": {
-	"topnav":"/pt/topnav.html",
-	"brand":"/pt/brand.html"
-    }
-    "/zh/": {
-	"brand":"/zh/brand.html",
-	"topnav":"/zh/topnav.html"
-    }
-    "/uk/": {
-	"brand":"/uk/brand.html",
-	"topnav":"/uk/topnav.html"
-    }
-    "/sr/": {
-	"brand":"/sr/brand.html",
-	"topnav":"/sr/topnav.html"
-    }
-    "/sr-latn/why/": {
-	"leftnav":"/sr-latn/why/leftnav.html"
-    }
-    "/sr-latn/product/": {
-	"leftnav":"/sr-latn/product/leftnav.html"
-    }
-    "/sr-latn/": {
-	"topnav":"/sr-latn/topnav.html",
-	"brand":"/sr-latn/brand.html"
-    }
-    "/zh-tw/": {
-	"brand":"/zh-tw/brand.html",
-	"topnav":"/zh-tw/topnav.html"
-    }
-    "/ar/": {
-	"brand":"/ar/brand.html",
-	"topnav":"/ar/topnav.html"
-    }
-    "/gl/": {
-	"brand":"/gl/brand.html",
-	"topnav":"/gl/topnav.html"
-    }
-    "/pt-br/": {
-	"brand":"/pt-br/brand.html",
-	"topnav":"/pt-br/topnav.html"
-    }
-    "/hu/why/": {
-	"leftnav":"/hu/why/leftnav.html"
-    }
-    "/hu/product/": {
-	"leftnav":"/hu/product/leftnav.html"
-    }
-    "/hu/": {
-	"brand":"/hu/brand.html",
-	"topnav":"/hu/topnav.html"
-    }
-    "/nl/why/": {
-	"leftnav":"/nl/why/leftnav.html"
-    }
-    "/nl/product/": {
-	"leftnav":"/nl/product/leftnav.html"
-    }
-    "/nl/": {
-	"brand":"/nl/brand.html",
-	"topnav":"/nl/topnav.html"
-    }
-    "/bg/": {
-	"brand":"/bg/brand.html",
-	"topnav":"/bg/topnav.html"
-    }
-    "/ast/": {
-	"brand":"/ast/brand.html",
-	"topnav":"/ast/topnav.html"
-    }
-    "/af/": {
-	"brand":"/af/brand.html",
-	"topnav":"/af/topnav.html"
-    }
-    "/hi/": {
-	"brand":"/hi/brand.html",
-	"topnav":"/hi/topnav.html"
-    }
-    "/api/": {
-	"leftnav":"/api/leftnav.html"
-    }
-    "/de/product/": {
-	"leftnav":"/de/product/leftnav.html"
-    }
-    "/de/": {
-	"brand":"/de/brand.html",
-	"topnav":"/de/topnav.html"
-    }
-    "/gd/": {
-	"brand":"/gd/brand.html",
-	"topnav":"/gd/topnav.html"
-    }
-    "/ko/product/": {
-	"leftnav":"/ko/product/leftnav.html"
-    }
-    "/ko/": {
-	"brand":"/ko/brand.html",
-	"topnav":"/ko/topnav.html"
-    }
-    "/fi/": {
-	"brand":"/fi/brand.html",
-	"topnav":"/fi/topnav.html"
-    }
-    "/fr/": {
-	"brand":"/fr/brand.html",
-	"topnav":"/fr/topnav.html"
-    }
-    "/es/producto/": {
-	"leftnav":"/es/producto/leftnav.html"
-    }
-    "/es/por-que/": {
-	"leftnav":"/es/por-que/leftnav.html"
-    }
-    "/es/participar/": {
-	"leftnav":"/es/participar/leftnav.html"
-    }
-    "/es/noticias/": {
-	"leftnav":"/es/noticias/leftnav.html"
-    }
-    "/es/": {
-	"brand":"/es/brand.html",
-	"topnav":"/es/topnav.html"
-    }
-    "/et/": {
-	"brand":"/et/brand.html",
-	"topnav":"/et/topnav.html"
-    }
-    "/lt/why/": {
-	"leftnav":"/lt/why/leftnav.html"
-    }
-    "/lt/product/": {
-	"leftnav":"/lt/product/leftnav.html"
-    }
-    "/lt/": {
-	"topnav":"/lt/topnav.html",
-	"brand":"/lt/brand.html"
-    }
-    "/eu/why/": {
-	"leftnav":"/eu/why/leftnav.html"
-    }
-    "/eu/product/": {
-	"leftnav":"/eu/product/leftnav.html"
-    }
-    "/eu/": {
-	"brand":"/eu/brand.html",
-	"topnav":"/eu/topnav.html"
-    }
-    "/sr-cyrl/why/": {
-	"leftnav":"/sr-cyrl/why/leftnav.html"
-    }
-    "/sr-cyrl/product/": {
-	"leftnav":"/sr-cyrl/product/leftnav.html"
-    }
-    "/sr-cyrl/": {
-	"topnav":"/sr-cyrl/topnav.html",
-	"brand":"/sr-cyrl/brand.html"
-    }
-    "/xx/why/": {
-	"leftnav":"/xx/why/leftnav.html"
-    }
-    "/xx/product/": {
-	"leftnav":"/xx/product/leftnav.html"
-    }
-    "/xx/": {
-	"topnav":"/xx/topnav.html",
-	"brand":"/xx/brand.html"
-    }
-    "/ta/": {
-	"brand":"/ta/brand.html",
-	"topnav":"/ta/topnav.html"
-    }
-    "/th/": {
-	"brand":"/th/brand.html",
-	"topnav":"/th/topnav.html"
-    }
-    "/tr/why/": {
-	"leftnav":"/tr/why/leftnav.html"
-    }
-    "/tr/product/": {
-	"leftnav":"/tr/product/leftnav.html"
-    }
-    "/tr/": {
-	"topnav":"/tr/topnav.ehtml",
-	"brand":"/tr/brand.html"
-    }
-}