Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX: improve redirect page#57

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Changes fromall 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
43 changes: 31 additions & 12 deletions_websiteutils/make_redirects_links.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,14 +41,13 @@

toignore = tocheck + [pathlib.Path(p) for p in [
"mpl-probscale",
"mpl_examples",
"mpl_toolkits",
"_webpageutils",
"xkcd",
"_sitemap",
"robots.txt",
"CNAME",
".git",
"index.html", # this is being hard coded now!
]]

logging.basicConfig(level=logging.DEBUG)
Expand All@@ -67,18 +66,38 @@ def findlast(fname, tocheck):
return None


html_redirect = """<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0;url={newurl}" />
<link rel="canonical" href="https://matplotlib.org/{canonical}" />
</head>
<body>
html_redirect = """
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Comment on lines +70 to +71
Copy link
Member

Choose a reason for hiding this comment

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

Use html5 doctype, no need for xhtml at this point.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

thats just from the top of matplotlib.org?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Copy link
Member

Choose a reason for hiding this comment

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


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Matplotlib: Python plotting &#8212; Page Moved</title>
<link rel="stylesheet" href="_static/mpl.css" type="text/css" />
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9,
maximum-scale=0.9" />
<meta http-equiv="refresh" content="0;url={newurl}" />
<link rel="canonical" href="https://matplotlib.org/{canonical}" />
</head>
<body>
<div style="background-color: white; text-align: left;
padding: 10px 10px 15px 15px; position: relative;">
<a href="#">
<img src="_static/logo2_compressed.svg" height="125px" border="0"
alt="matplotlib"/>
</a>
<div class="body" role="main">
<div class="section">
<h1>
The page been moved <a href="{newurl}">here</a>!
This page been moved <a href="{newurl}">here</a>!
</h1>
</body>
</div>
</div>
</body>
</html>
"""

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp