Skip to content

Commit

Permalink
Consistent website theme and custom 404 (apache#12426)
Browse files Browse the repository at this point in the history
* consistent theme plus error handling for missing apis and pages

* add error pages

* update messaging

* force url update to 404 page on redirect

* static redirect to force url update

* version dropdown fix; reverts apache#12482; lesser of evils

* adding note to nudge past flakey test
  • Loading branch information
aaronmarkham authored and anirudh2290 committed Sep 19, 2018
1 parent 4c634e0 commit 6447693
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/build_version_doc/AddVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('&lt;', '<').replace('&gt;', '>')
# The following causes rendering errors in code blocks; refer to #12168 and #12524
outstr = str(content).replace('&lt;', '<').replace('&gt;', '>')
# Fix link
if args.current_version == tag_list[0]:
print("Fixing " + os.path.join(path, name))
Expand Down Expand Up @@ -114,4 +114,3 @@

with open(os.path.join(path, name), "w") as outf:
outf.write(outstr)

7 changes: 7 additions & 0 deletions docs/build_version_doc/artifacts/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions docs/build_version_doc/build_all_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions docs/error/404.md
Original file line number Diff line number Diff line change
@@ -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).
3 changes: 3 additions & 0 deletions docs/error/api.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 6447693

Please sign in to comment.