You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2022/06/07 19:10:59 UTC

[allura] branch gc/8437 created (now c2fdf7da5)

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

gcruz pushed a change to branch gc/8437
in repository https://gitbox.apache.org/repos/asf/allura.git


      at c2fdf7da5 [#8437] set noindex, follow for empty blog and dicussion tools

This branch includes the following new commits:

     new c2fdf7da5 [#8437] set noindex, follow for empty blog and dicussion tools

The 1 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.



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

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

gcruz pushed a commit to branch gc/8437
in repository https://gitbox.apache.org/repos/asf/allura.git

commit c2fdf7da526c2631a80695ff5c8e8e1e1d8325a3
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 %}