diff --git a/docs/static_site/src/.htaccess b/docs/static_site/src/.htaccess new file mode 100644 index 000000000000..16420306f1e1 --- /dev/null +++ b/docs/static_site/src/.htaccess @@ -0,0 +1,24 @@ +Options -Indexes +DirectorySlash off +RewriteEngine on +RewriteOptions AllowNoSlash + +# Show file instead of folder for example /api/docs/tutorials.html +# instead of /api/docs/tutorials/ +RewriteCond %{REQUEST_FILENAME} -d +RewriteCond %{REQUEST_FILENAME}\.html -f +RewriteRule ^(.*) $1.html [NC,L] + +# Prettify some files like tutorials/io to tutorials/io.html +RewriteCond %{REQUEST_FILENAME}\.html -f +RewriteRule ^(.*) $1.html [NC,L] + +#API docs needs specific root +RewriteCond %{REQUEST_URI} \/docs\/api$|\/docs\/tutorials$ +RewriteRule ^(.*) %{REQUEST_URI}/ [R,NC,L] + +# Prettify folders like /get_started +RewriteCond %{REQUEST_URI} !\/$ +RewriteCond %{REQUEST_FILENAME} -d +RewriteCond %{REQUEST_FILENAME}/index.html -f +RewriteRule ^(.*) $1/index.html [NC,L] diff --git a/docs/static_site/src/Makefile b/docs/static_site/src/Makefile deleted file mode 100644 index 81a9a79e1a80..000000000000 --- a/docs/static_site/src/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: html - -html: - mkdir -p build - cd src && bundle install && JEKYLL_ENV=production bundle exec jekyll build --config _config_prod.yml -d ../build/html && cd .. - - -clean: - rm -rf build diff --git a/docs/static_site/src/pages/api/api.html b/docs/static_site/src/pages/api/api.html index 1b4897057058..5ae4ebe4c270 100644 --- a/docs/static_site/src/pages/api/api.html +++ b/docs/static_site/src/pages/api/api.html @@ -58,7 +58,7 @@ tag: julia - title: R guide_link: /api/r - api_link: /api/r/docs/api + api_link: https://s3.amazonaws.com/mxnet-prod/docs/R/mxnet-r-reference-manual.pdf tutorial_link: /api/r/docs/tutorials description: icon: /assets/img/R_logo.svg