diff --git a/docs/build_version_doc/AddVersion.py b/docs/build_version_doc/AddVersion.py index 9c5ca9d70406..f5e28dfff958 100755 --- a/docs/build_version_doc/AddVersion.py +++ b/docs/build_version_doc/AddVersion.py @@ -74,8 +74,8 @@ version_tag_mobile.extract() navbar.append(version_str) navbar_mobile.append(version_str_mobile) - # The following causes rendering errors in code blocks; refer to #12168 - #outstr = str(content).replace('<', '<').replace('>', '>') + # The following causes rendering errors in code blocks; refer to #12168 and #12524 + outstr = str(content).replace('<', '<').replace('>', '>') # Fix link if args.current_version == tag_list[0]: print("Fixing " + os.path.join(path, name)) @@ -114,4 +114,3 @@ with open(os.path.join(path, name), "w") as outf: outf.write(outstr) - diff --git a/docs/build_version_doc/artifacts/.htaccess b/docs/build_version_doc/artifacts/.htaccess index 5467448f521a..caedabad359a 100644 --- a/docs/build_version_doc/artifacts/.htaccess +++ b/docs/build_version_doc/artifacts/.htaccess @@ -4,3 +4,10 @@ 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] RewriteRule ^community/index.html$ /community/contribute.html [R=301,L] +RewriteRule ^versions/0.11.0/api/clojure/.*$ /error/api.html [R=301,L] +RewriteRule ^versions/0.12.1/api/clojure/.*$ /error/api.html [R=301,L] +RewriteRule ^versions/1.0.0/api/clojure/.*$ /error/api.html [R=301,L] +RewriteRule ^versions/1.1.0/api/clojure/.*$ /error/api.html [R=301,L] +RewriteRule ^versions/1.2.1/api/clojure/.*$ /error/api.html [R=301,L] + +ErrorDocument 404 https://mxnet.incubator.apache.org/error/404.html diff --git a/docs/build_version_doc/build_all_version.sh b/docs/build_version_doc/build_all_version.sh index 350c75b084b7..5f857996f19d 100755 --- a/docs/build_version_doc/build_all_version.sh +++ b/docs/build_version_doc/build_all_version.sh @@ -156,6 +156,7 @@ for key in ${!build_arr[@]}; do cp ../../settings.ini $tag/docs/ cp ../../conf.py $tag/docs/ cp ../../Doxyfile $tag/docs/ + cp -a ../../_static $tag/docs/ echo "Building $tag..." cd $tag/docs diff --git a/docs/error/404.md b/docs/error/404.md new file mode 100644 index 000000000000..63ebdeb4cbef --- /dev/null +++ b/docs/error/404.md @@ -0,0 +1,3 @@ +# Page Does Not Exist + +If you're here that means you requested a page that doesn't exist. Sorry about that! Maybe try the search box to find what you're looking for, or navigate to the [Home Page](../index.html). Also, make sure you're looking in the correct version, as some features may only be available in [newer versions](https://github.com/apache/incubator-mxnet/releases) or the [master branch](../versions/master). diff --git a/docs/error/api.md b/docs/error/api.md new file mode 100644 index 000000000000..37de50291abd --- /dev/null +++ b/docs/error/api.md @@ -0,0 +1,3 @@ +# API Not Available + +You selected an API that is not available for this version of MXNet. Try a more recent version of MXNet, or go to the [master](../versions/master/) version.