mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 18:09:17 +02:00
See #170: fetching remote objects
This commit is contained in:
parent
65097f6297
commit
c2eeee5eb1
30 changed files with 1173 additions and 169 deletions
47
docs/conf.py
47
docs/conf.py
|
@ -95,18 +95,16 @@ html_theme = "sphinx_rtd_theme"
|
|||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#
|
||||
html_theme_options = {
|
||||
'gitlab_url': 'https://dev.funkwhale.audio/funkwhale/funkwhale'
|
||||
}
|
||||
html_theme_options = {"gitlab_url": "https://dev.funkwhale.audio/funkwhale/funkwhale"}
|
||||
html_context = {
|
||||
'display_gitlab': True,
|
||||
'gitlab_host': 'dev.funkwhale.audio',
|
||||
'gitlab_repo': 'funkwhale',
|
||||
'gitlab_user': 'funkwhale',
|
||||
'gitlab_version': 'master',
|
||||
'conf_py_path': '/docs/',
|
||||
"display_gitlab": True,
|
||||
"gitlab_host": "dev.funkwhale.audio",
|
||||
"gitlab_repo": "funkwhale",
|
||||
"gitlab_user": "funkwhale",
|
||||
"gitlab_version": "master",
|
||||
"conf_py_path": "/docs/",
|
||||
}
|
||||
html_logo = 'logo.svg'
|
||||
html_logo = "logo.svg"
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
|
@ -173,15 +171,13 @@ texinfo_documents = [
|
|||
# Define list of redirect files to be build in the Sphinx build process
|
||||
|
||||
redirect_files = [
|
||||
|
||||
('importing-music.html', 'admin/importing-music.html'),
|
||||
('architecture.html', 'developers/architecture.html'),
|
||||
('troubleshooting.html', 'admin/troubleshooting.html'),
|
||||
('configuration.html', 'admin/configuration.html'),
|
||||
('upgrading/index.html', '../admin/upgrading.html'),
|
||||
('upgrading/0.17.html', '../admin/0.17.html'),
|
||||
('users/django.html', '../admin/django.html'),
|
||||
|
||||
("importing-music.html", "admin/importing-music.html"),
|
||||
("architecture.html", "developers/architecture.html"),
|
||||
("troubleshooting.html", "admin/troubleshooting.html"),
|
||||
("configuration.html", "admin/configuration.html"),
|
||||
("upgrading/index.html", "../admin/upgrading.html"),
|
||||
("upgrading/0.17.html", "../admin/0.17.html"),
|
||||
("users/django.html", "../admin/django.html"),
|
||||
]
|
||||
|
||||
# Generate redirect template
|
||||
|
@ -199,16 +195,17 @@ redirect_template = """\
|
|||
|
||||
# Tell Sphinx to copy the files
|
||||
|
||||
|
||||
def copy_legacy_redirects(app, docname):
|
||||
if app.builder.name == 'html':
|
||||
if app.builder.name == "html":
|
||||
for html_src_path, new in redirect_files:
|
||||
page = redirect_template.format(new=new)
|
||||
target_path = app.outdir + '/' + html_src_path
|
||||
target_path = app.outdir + "/" + html_src_path
|
||||
if not os.path.exists(os.path.dirname(target_path)):
|
||||
os.makedirs(os.path.dirname(target_path))
|
||||
with open(target_path, 'w') as f:
|
||||
f.write(page)
|
||||
os.makedirs(os.path.dirname(target_path))
|
||||
with open(target_path, "w") as f:
|
||||
f.write(page)
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.connect('build-finished', copy_legacy_redirects)
|
||||
app.connect("build-finished", copy_legacy_redirects)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue