From 8a16a1857e7f0672484aedf4df8390dfb6dad190 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Fri, 22 Feb 2019 17:22:05 +0300 Subject: [PATCH] Added redirect from old pages to new --- source/api.html | 8 ++++++++ source/conf.py | 18 +++++++++++++++++- source/minecraft-auth.html | 8 ++++++++ source/oauth.html | 8 ++++++++ source/skin-system.html | 8 ++++++++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 source/api.html create mode 100644 source/minecraft-auth.html create mode 100644 source/oauth.html create mode 100644 source/skin-system.html diff --git a/source/api.html b/source/api.html new file mode 100644 index 0000000..a38349b --- /dev/null +++ b/source/api.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/source/conf.py b/source/conf.py index c74ea57..c275fbe 100644 --- a/source/conf.py +++ b/source/conf.py @@ -13,7 +13,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import sphinx_rtd_theme import datetime @@ -259,3 +258,20 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False + +redirect_files = ['api.html', 'minecraft-auth.html', 'oauth.html', 'skin-system.html'] + +from shutil import copyfile + +def copy_legacy_redirects(app, _): + if app.builder.name != 'html': + return + + for html_src_path in redirect_files: + target_path = os.path.join(app.outdir, html_src_path) + src_path = os.path.join(app.srcdir, html_src_path) + if os.path.isfile(src_path): + copyfile(src_path, target_path) + +def setup(app): + app.connect('build-finished', copy_legacy_redirects) diff --git a/source/minecraft-auth.html b/source/minecraft-auth.html new file mode 100644 index 0000000..637887e --- /dev/null +++ b/source/minecraft-auth.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/source/oauth.html b/source/oauth.html new file mode 100644 index 0000000..b4ec2a4 --- /dev/null +++ b/source/oauth.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/source/skin-system.html b/source/skin-system.html new file mode 100644 index 0000000..b1663e1 --- /dev/null +++ b/source/skin-system.html @@ -0,0 +1,8 @@ + + + + + +