Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
c9c2ee2f
Commit
c9c2ee2f
authored
Jul 07, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor code cleanup.
parent
85431da6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
docs/conf.py
docs/conf.py
+13
-10
No files found.
docs/conf.py
View file @
c9c2ee2f
...
...
@@ -479,22 +479,25 @@ html_template = """
</html>
"""
list_redirects
=
[(
'reference/language_basics'
,
'userguide/language_basics'
)]
list_redirects
=
[
(
'reference/language_basics'
,
'userguide/language_basics'
),
]
def
add_legacy_redirects
(
app
,
docname
):
if
app
.
builder
.
name
==
'html'
:
for
old_link
,
new_link
in
list_redirects
:
old_link
=
"src/"
+
old_link
+
".html"
new_link
=
"src/"
+
new_link
+
".html"
if
app
.
builder
.
name
!=
'html'
:
return
for
old_link
,
new_link
in
list_redirects
:
old_link
=
"src/"
+
old_link
+
".html"
new_link
=
"src/"
+
new_link
+
".html"
rel_path
=
os
.
path
.
relpath
(
new_link
,
os
.
path
.
dirname
(
old_link
))
rel_path
=
os
.
path
.
relpath
(
new_link
,
os
.
path
.
dirname
(
old_link
))
html_to_write
=
html_template
.
format
(
rel_path
)
target_path
=
app
.
outdir
+
'/'
+
old_link
html_to_write
=
html_template
.
format
(
rel_path
)
target_path
=
app
.
outdir
+
'/'
+
old_link
with
open
(
target_path
,
"w+"
)
as
f
:
f
.
write
(
html_to_write
)
with
open
(
target_path
,
"w+"
)
as
f
:
f
.
write
(
html_to_write
)
def
setup
(
app
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment