mirror of
https://github.com/elyby/docs.git
synced 2024-11-23 05:33:05 +05:30
Include _config.yml
This commit is contained in:
parent
e088d9ede5
commit
5b80c9d439
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.
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user