8000 DOC Fix broken link to docs by thomasjpfan · Pull Request #15364 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Fix broken link to docs #15364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@

# Additional templates that should be rendered to pages, maps page names to
# template names.
html_additional_pages = {'index': 'index.html'}
html_additional_pages = {
'index': 'index.html',
'documentation': 'documentation.html'} # redirects to index

# If false, no module index is generated.
html_domain_indices = False
Expand Down
14 changes: 14 additions & 0 deletions doc/templates/documentation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Refresh" content="0; url={{ pathto('index') }}" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably also use a <link rel=canonical to tell search engines this is permanent

<meta name="Description" content="scikit-learn: machine learning in Python">
<link rel="canonical" href="{{ pathto('index') }}" />
<title>scikit-learn: machine learning in Python</title>
</head>
<body>
<p>You will be automatically redirected to the <a href="{{ pathto('index') }}">main page</a>.</p>
</body>
</html>
0