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

dmagda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 2ee4d07  added noindex for not-latest versions; also automatic update 
of dropdown file (#56)
2ee4d07 is described below

commit 2ee4d0739d22d96f67f6120ee3104d4bdeb02d1a
Author: Mauricio Stekl <[email protected]>
AuthorDate: Tue Dec 22 17:53:40 2020 -0300

    added noindex for not-latest versions; also automatic update of dropdown 
file (#56)
---
 _docs/_layouts/default.html |  1 +
 _docs/build.sh              | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/_docs/_layouts/default.html b/_docs/_layouts/default.html
index dbf16ca..a774598 100644
--- a/_docs/_layouts/default.html
+++ b/_docs/_layouts/default.html
@@ -25,6 +25,7 @@
     <link rel="canonical" href="{{page.id | replace_first: site.attrs.version, 
'latest' }}" />
     {% else %}
     <link rel="canonical" href="{{page.id}}" />
+    <META NAME="ROBOTS" CONTENT="NOINDEX" />
     {% endif %}
        {% capture timestamp %}{{"now"| date: '%s'}}{% endcapture %}
        <link rel="stylesheet" href="{{'assets/css/styles.css?'|append: 
timestamp |relative_url}}">
diff --git a/_docs/build.sh b/_docs/build.sh
index 6ba9373..a4290f9 100755
--- a/_docs/build.sh
+++ b/_docs/build.sh
@@ -63,6 +63,17 @@ if [ "$action" = "build" ]; then
     rm ../docs/latest
     ln -s ../docs/$version ../docs/latest
   fi
+
+  # add the version number to the .txt file used by the version selector 
dropdown on the UI
+  if ! grep -Fxq "$version" ../docs/available-versions.txt; then
+    # adds the version to the top of the list if 'latest', otherwise to the 
bottom
+    if [ "$latest" = "yes" ]; then
+      cat <(echo "$version") ../docs/available-versions.txt > 
../docs/available-versions.new
+      mv ../docs/available-versions.new ../docs/available-versions.txt
+    else
+     echo "$version" >> ../docs/available-versions.txt
+    fi
+  fi
 fi
 
 # clean up some stuff

Reply via email to