mirror of
https://github.com/elyby/docs.git
synced 2025-04-10 04:59:15 +05:30
Include _config.yml
This commit is contained in:
parent
e088d9ede5
commit
5b80c9d439
source
5
source/_config.yml
Normal file
5
source/_config.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
include:
|
||||||
|
- _downloads
|
||||||
|
- _images
|
||||||
|
- _sources
|
||||||
|
- _static
|
@ -259,19 +259,19 @@ texinfo_documents = [
|
|||||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||||
#texinfo_no_detailmenu = False
|
#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
|
from shutil import copyfile
|
||||||
|
|
||||||
def copy_legacy_redirects(app, _):
|
def copy_static_files(app, _):
|
||||||
if app.builder.name != 'html':
|
if app.builder.name != 'html':
|
||||||
return
|
return
|
||||||
|
|
||||||
for html_src_path in redirect_files:
|
for src_name in static_files:
|
||||||
target_path = os.path.join(app.outdir, html_src_path)
|
target_path = os.path.join(app.outdir, src_name)
|
||||||
src_path = os.path.join(app.srcdir, html_src_path)
|
src_path = os.path.join(app.srcdir, src_name)
|
||||||
if os.path.isfile(src_path):
|
if os.path.isfile(src_path):
|
||||||
copyfile(src_path, target_path)
|
copyfile(src_path, target_path)
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.connect('build-finished', copy_legacy_redirects)
|
app.connect('build-finished', copy_static_files)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user