mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [incubator-mxnet] branch master updated: [MXNET-315] Fix the version select in the navbar to be independent of order (#10534)
Date Tue, 17 Apr 2018 21:22:18 GMT
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 0f1bc29  [MXNET-315] Fix the version select in the navbar to be independent of order
(#10534)
0f1bc29 is described below

commit 0f1bc29a61e1c035d8e9a2e33142da0581b8f389
Author: kpmurali <37911926+kpmurali@users.noreply.github.com>
AuthorDate: Tue Apr 17 14:22:09 2018 -0700

    [MXNET-315] Fix the version select in the navbar to be independent of order (#10534)
    
    * Changing the AddVersion script to the set the root_url to be a parameter passed to it
as the default tag
    
    * Changing the variable name from default_tag to tag_default
---
 docs/build_version_doc/AddVersion.py         | 3 ++-
 docs/build_version_doc/update_all_version.sh | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/build_version_doc/AddVersion.py b/docs/build_version_doc/AddVersion.py
index 27a3972..b625a2e 100755
--- a/docs/build_version_doc/AddVersion.py
+++ b/docs/build_version_doc/AddVersion.py
@@ -27,6 +27,7 @@ parser.add_argument('--current_version', type=str, default='master',
                         help='Current version')
 parser.add_argument('--root_url', type=str, default='https://mxnet.incubator.apache.org/',
                         help='Root URL')
+parser.add_argument('--tag_default', type=str, default='master', help='Default Tag')
 
 if __name__ == '__main__':
     args = parser.parse_args()
@@ -46,7 +47,7 @@ if __name__ == '__main__':
                          'style="position: relative">' \
                          '<a href="#" tabindex="-1">Versions(%s)</a><ul class="dropdown-menu">'
% (args.current_version)
     for i, tag in enumerate(tag_list):
-        url = root_url if i == 0 else root_url + 'versions/%s/index.html' % (tag)
+        url = root_url if tag == args.tag_default else root_url + 'versions/%s/index.html'
% (tag)
         version_str += '<li><a class="main-nav-link" href=%s>%s</a></li>'
% (url, tag)
         version_str_mobile += '<li><a tabindex="-1" href=%s>%s</a></li>'
% (url, tag)
     version_str += '</ul></span>'
diff --git a/docs/build_version_doc/update_all_version.sh b/docs/build_version_doc/update_all_version.sh
index 90d4fa6..4d80ce4 100755
--- a/docs/build_version_doc/update_all_version.sh
+++ b/docs/build_version_doc/update_all_version.sh
@@ -93,7 +93,7 @@ function update_mxnet_css {
 for tag in $tag_list; do
     # This Python script is expecting the tag_list.txt and it will use that as the entries
to populate
 
-    python AddVersion.py --root_url "$root_url" --file_path "$built/versions/$tag" --current_version
"$tag" || exit 1
+    python AddVersion.py --root_url "$root_url" --file_path "$built/versions/$tag" --current_version
"$tag" --tag_default "$tag_default" || exit 1
 
     # Patch any fixes to all versions except 0.11.0.
     # Version 0.11.0 has old theme and does not make use of the current mxnet.css

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.

Mime
View raw message