You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/10 21:25:36 UTC
[GitHub] eric-haibin-lin closed pull request #10286: [MXNET-250] CSS and
.htaccess fix
eric-haibin-lin closed pull request #10286: [MXNET-250] CSS and .htaccess fix
URL: https://github.com/apache/incubator-mxnet/pull/10286
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/.htaccess b/docs/.htaccess
new file mode 100644
index 00000000000..76d0893a528
--- /dev/null
+++ b/docs/.htaccess
@@ -0,0 +1,5 @@
+RewriteEngine on
+RewriteRule ^get_started/why_mxnet.html$ /faq/why_mxnet.html [R=301,L]
+RewriteRule ^get_started.*$ /install/ [R=301,L]
+RewriteRule ^how_to.*$ /faq/ [R=301,L]
+RewriteRule ^api/python/symbol.html$ /api/python/symbol/symbol.html [R=301,L]
diff --git a/docs/_static/mxnet.css b/docs/_static/mxnet.css
index 6e116dbb745..a62ceb59890 100644
--- a/docs/_static/mxnet.css
+++ b/docs/_static/mxnet.css
@@ -131,9 +131,7 @@ img {
.navbar .container {
position: relative;
- left: 20px;
width: 100%;
- align-content: center;
}
@media screen and (max-width: 510px) {
@@ -393,7 +391,7 @@ div .burgerIcon a {
}
#plusMenu .dropdown-submenu>.dropdown-menu {
- left: 138px;
+ left: 127px;
top: 0;
background: #fff;
}
diff --git a/docs/build_version_doc/AddVersion.py b/docs/build_version_doc/AddVersion.py
index c4d088a4b0f..27a39724ff8 100755
--- a/docs/build_version_doc/AddVersion.py
+++ b/docs/build_version_doc/AddVersion.py
@@ -36,7 +36,6 @@
with open('tag_list.txt', 'r') as tag_file:
for line in tag_file:
tag_list.append(line.lstrip().rstrip())
- tag_list.append('master')
version_str = '<span id="dropdown-menu-position-anchor-version" ' \
'style="position: relative">' \
diff --git a/docs/build_version_doc/build_all_version.sh b/docs/build_version_doc/build_all_version.sh
index be92e83b867..e7283728b96 100755
--- a/docs/build_version_doc/build_all_version.sh
+++ b/docs/build_version_doc/build_all_version.sh
@@ -68,6 +68,7 @@ for tag in $tag_list; do
git checkout master -- docs/mxdoc.py
fi
git submodule update || exit 1
+ git submodule update --init --recursive
make clean
cd docs
make clean
diff --git a/docs/build_version_doc/update_all_version.sh b/docs/build_version_doc/update_all_version.sh
index e79b97117c5..90d4fa68d7c 100755
--- a/docs/build_version_doc/update_all_version.sh
+++ b/docs/build_version_doc/update_all_version.sh
@@ -33,6 +33,11 @@
set -e
set -x
+MASTER_SOURCE_DIR="../../docs"
+STATIC_FILES_DIR="_static"
+MXNET_THEME_DIR="_static/mxnet-theme"
+BUILD_HTML_DIR="_build/html"
+
if [ -z "$1" ]
then
echo "Please provide a list of version tags you wish to run. Ex : \"1.1.0 1.0.0 master\""
@@ -68,31 +73,44 @@ fi
# Write all version numbers into $tag_file for AddVersion.py to use later
# Master is added by that script by default
for tag in $tag_list; do
- if [ $tag != 'master' ]
- then
- echo "$tag" >> "$tag_file"
- fi
+ echo "$tag" >> "$tag_file"
done
+function update_mxnet_css {
+ tag=$1
+ echo "Begin update fixes.."
+ # All fixes are done on the master branch of mxnet-incubator repository
+ # During a nightly build, these fixes will be patched to all the versions in the asf-site repository including the master folder under versions directory.
+ # copy <master folder location> <version folder location>
+
+ echo "Copying mxnet.css from master branch to all versions...."
+ cp "$MASTER_SOURCE_DIR/$STATIC_FILES_DIR/mxnet.css" "$built/versions/$tag/_static"
+
+ echo "Update fixes complete.."
+}
+
# Update the specified tags with the Versions dropdown
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
- if [ $tag != 'master' ]
- then
- python AddPackageLink.py --file_path "$built/versions/master/install/index.html" \
- --current_version "$tag" || 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
+ if [ $tag != '0.11.0' ]
+ then
+ update_mxnet_css $tag
fi
-
+
+ # Update all the files that are required to go into the root folder or live version
if [ $tag == $tag_default ]
then
cp -a "$built/versions/$tag/." "$built"
+
+ echo "Copying .htaccess from default branch to root folder...."
+ cp "$MASTER_SOURCE_DIR/.htaccess" "$built"
else
file_loc="$built/versions/$tag"
- #rm -rf "$file_loc"
- #mkdir "$file_loc"
- #cp -a $mxnet_folder/docs/_build/html/. "$file_loc"
fi
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services