Include _config.yml

This commit is contained in:
ErickSkrauch 2019-02-22 21:55:42 +03:00
parent e088d9ede5
commit 5b80c9d439
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E
2 changed files with 11 additions and 6 deletions

5
source/_config.yml Normal file
View File

@ -0,0 +1,5 @@
include:
- _downloads
- _images
- _sources
- _static

View File

@ -259,19 +259,19 @@ 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']
static_files = ['_config.yml', 'api.html', 'minecraft-auth.html', 'oauth.html', 'skin-system.html']
from shutil import copyfile
def copy_legacy_redirects(app, _):
def copy_static_files(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)
for src_name in static_files:
target_path = os.path.join(app.outdir, src_name)
src_path = os.path.join(app.srcdir, src_name)
if os.path.isfile(src_path):
copyfile(src_path, target_path)
def setup(app):
app.connect('build-finished', copy_legacy_redirects)
app.connect('build-finished', copy_static_files)