You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/06/13 13:55:29 UTC

[allura] branch master updated (e690bd976 -> 3cf7c6ec7)

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

brondsem pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


    from e690bd976 [#8438] dynamically use current avatar urls in activity stream; fix Anonymous linking
     new 03398c9b0 [#8437] set noindex, follow for empty blog and dicussion tools
     new eb0d1eb26 [#8437] noindex, follow header for empty svn and git repositories
     new 3cf7c6ec7 [#8437] nofollow on empty main/single topic discussion pages

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ForgeBlog/forgeblog/templates/blog/index.html                      | 6 ++++++
 ForgeDiscussion/forgediscussion/controllers/root.py                | 4 +++-
 .../forgediscussion/templates/discussionforums/index.html          | 7 +++++++
 ForgeDiscussion/forgediscussion/templates/index.html               | 6 ++++++
 ForgeGit/forgegit/templates/git/index.html                         | 4 ++++
 ForgeSVN/forgesvn/templates/svn/index.html                         | 4 +++-
 6 files changed, 29 insertions(+), 2 deletions(-)


[allura] 03/03: [#8437] nofollow on empty main/single topic discussion pages

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 3cf7c6ec731b0fc15553a7c9447c9e8dd3851bb7
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Thu Jun 9 12:35:09 2022 -0600

    [#8437] nofollow on empty main/single topic discussion pages
---
 ForgeDiscussion/forgediscussion/controllers/root.py                 | 4 +++-
 .../forgediscussion/templates/discussionforums/index.html           | 2 +-
 ForgeDiscussion/forgediscussion/templates/index.html                | 6 ++++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ForgeDiscussion/forgediscussion/controllers/root.py b/ForgeDiscussion/forgediscussion/controllers/root.py
index 5d620f072..d1a9ac9cb 100644
--- a/ForgeDiscussion/forgediscussion/controllers/root.py
+++ b/ForgeDiscussion/forgediscussion/controllers/root.py
@@ -87,9 +87,11 @@ class RootController(BaseController, DispatchIndex, FeedController):
             app_config_id=c.app.config._id,
             parent_id=None, deleted=False)).all()
         forums = [f for f in forums if h.has_access(f, 'read')()]
+        noindex = all([f.num_topics == 0 for f in forums])
         return dict(forums=forums,
                     announcements=announcements,
-                    hide_forum=(not new_forum))
+                    hide_forum=(not new_forum),
+                    noindex=noindex)
 
     @expose('jinja:forgediscussion:templates/discussionforums/index.html')
     def new_forum(self, **kw):
diff --git a/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html b/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
index d5ee47eb8..1db6d49f4 100644
--- a/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
+++ b/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
@@ -22,7 +22,7 @@
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}{% endblock %}
 
 {%  block head %}
-    {%  if not forums|length %}
+    {%  if noindex %}
         <meta name="robots" content="noindex, follow">
     {% endif %}
 {%  endblock %}
diff --git a/ForgeDiscussion/forgediscussion/templates/index.html b/ForgeDiscussion/forgediscussion/templates/index.html
index b43fedccd..57af42022 100644
--- a/ForgeDiscussion/forgediscussion/templates/index.html
+++ b/ForgeDiscussion/forgediscussion/templates/index.html
@@ -18,6 +18,12 @@
 -#}
 {% extends 'allura:templates/discussion/index.html' %}
 
+{% block head %}
+    {{ super() }}
+    {% if not threads|length %}
+        <meta name="robots" content="noindex, follow">
+    {% endif %}
+{%  endblock %}
 
 {% block actions %}
   {{ super() }}


[allura] 01/03: [#8437] set noindex, follow for empty blog and dicussion tools

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 03398c9b0d3e50e494428d8958c514b5b26c179a
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Tue Jun 7 13:10:46 2022 -0600

    [#8437] set noindex, follow for empty blog and dicussion tools
---
 ForgeBlog/forgeblog/templates/blog/index.html                      | 6 ++++++
 .../forgediscussion/templates/discussionforums/index.html          | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/ForgeBlog/forgeblog/templates/blog/index.html b/ForgeBlog/forgeblog/templates/blog/index.html
index 97fd05e80..b9e82d71c 100644
--- a/ForgeBlog/forgeblog/templates/blog/index.html
+++ b/ForgeBlog/forgeblog/templates/blog/index.html
@@ -20,6 +20,12 @@
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}{% endblock %}
 
+{% block head %}
+    {% if count == 0 %}
+    <meta name="robots" content="noindex, follow"/>
+    {% endif %}
+{% endblock %}
+
 {% block header %}{{c.project.name}} / {{c.app.config.options.mount_label}}: Recent posts{% endblock %}
 
 {% block extra_css %}
diff --git a/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html b/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
index 941a62d37..d5ee47eb8 100644
--- a/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
+++ b/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
@@ -21,6 +21,13 @@
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}{% endblock %}
 
+{%  block head %}
+    {%  if not forums|length %}
+        <meta name="robots" content="noindex, follow">
+    {% endif %}
+{%  endblock %}
+
+
 {% block header %}{{c.app.config.options.mount_label}}{% endblock %}
 
 {% block actions %}


[allura] 02/03: [#8437] noindex, follow header for empty svn and git repositories

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit eb0d1eb26dda3a20050272bcad178ae918e07813
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Wed Jun 8 15:01:27 2022 -0600

    [#8437] noindex, follow header for empty svn and git repositories
---
 ForgeGit/forgegit/templates/git/index.html | 4 ++++
 ForgeSVN/forgesvn/templates/svn/index.html | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ForgeGit/forgegit/templates/git/index.html b/ForgeGit/forgegit/templates/git/index.html
index 73a5291d7..6d2c691cf 100644
--- a/ForgeGit/forgegit/templates/git/index.html
+++ b/ForgeGit/forgegit/templates/git/index.html
@@ -20,6 +20,10 @@
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}{% endblock %}
 
+{%  block head %}
+    <meta name="robots" content="noindex, follow">
+{% endblock %}
+
 {% block header %}{{c.app.config.options.mount_label}}{% endblock %}
 
 {% block content %}
diff --git a/ForgeSVN/forgesvn/templates/svn/index.html b/ForgeSVN/forgesvn/templates/svn/index.html
index 4bf92676e..9e0d44890 100644
--- a/ForgeSVN/forgesvn/templates/svn/index.html
+++ b/ForgeSVN/forgesvn/templates/svn/index.html
@@ -19,7 +19,9 @@
 {% extends 'allura:templates/repo/repo_master.html' %}
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}{% endblock %}
-
+{%  block head %}
+    <meta name="robots" content="noindex, follow">
+{% endblock %}
 {% block header %}{{c.app.config.options.mount_label}}{% endblock %}
 
 {% block content %}