Skip to content

Commit abb7eef

Browse files
authored
Merge pull request #908 from realpython/new-hosting
New hosting
2 parents 75b235f + fdbeab6 commit abb7eef

File tree

10 files changed

+71
-17
lines changed

10 files changed

+71
-17
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ How to contribute
44
This guide is under heavy development. If you would like to contribute, please
55
see:
66

7-
http://docs.python-guide.org/en/latest/notes/contribute/
7+
https://docs.python-guide.org/notes/contribute/
88

99
How to test your changes
1010
------------------------
@@ -34,4 +34,4 @@ Style Guide
3434

3535
For all contributions, please follow the `Guide Style Guide`:
3636

37-
http://docs.python-guide.org/en/latest/notes/styleguide/
37+
https://docs.python-guide.org/notes/styleguide/

Readme.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ Topics include:
3333

3434
If you aren't fond of reading reStructuredText, there is an
3535
almost up-to-date `HTML version at docs.python-guide.org
36-
<http://docs.python-guide.org>`_.
36+
<https://docs.python-guide.org>`_.

docs/404.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ It looks like this was the result of either:
88
- a mistyped address
99
- an out-of-date link
1010

11-
`Click here to go back to the homepage. <http://docs.python-guide.org/>`_
11+
`Click here to go back to the homepage. <https://docs.python-guide.org/>`_
1212

13-
Or, try `searching <http://docs.python-guide.org/en/latest/search/>`_.
13+
Or, try `searching <https://docs.python-guide.org/search/>`_.
1414

1515
.. raw:: html
1616

docs/Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ dirhtml:
5959
@echo
6060
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
6161

62+
netlify: dirhtml
63+
@cp $(BUILDDIR)/dirhtml/404/index.html $(BUILDDIR)/dirhtml/404.html
64+
@sed -i -e 's/src="..\//src="\//g' $(BUILDDIR)/dirhtml/404.html
65+
@sed -i -e 's/href="..\//href="\//g' $(BUILDDIR)/dirhtml/404.html
66+
@cp _extra/* $(BUILDDIR)/dirhtml/
67+
6268
singlehtml:
6369
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
6470
@echo

docs/_extra/_redirects

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Redirect rules
2+
# Docs: https://www.netlify.com/docs/redirects/
3+
4+
# Redirect http to https (avoid one extra hop with an explicit rule for /en/latest/)
5+
http://docs.python-guide.org/en/latest/* https://docs.python-guide.org/:splat 301!
6+
http://docs.python-guide.org/* https://docs.python-guide.org/:splat 301!
7+
8+
# Redirect RTD prefix to /
9+
/en/latest/* /:splat 301!
10+
11+
# Redirect domain aliases to primary domain
12+
http://python-guide.org/* http://docs.python-guide.org/:splat 301!
13+
https://python-guide.org/* https://docs.python-guide.org/:splat 301!
14+
15+
# Redirect Netlify version to primary domain
16+
https://python-guide.netlify.com/* https://docs.python-guide.org/:splat 301!

docs/_templates/layout.html

+34-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
{% extends "!layout.html" %}
22

33
{%- block extrahead %}
4-
{{ super() }}
4+
{# No super() because we want to avoid loading an empty custom.css file #}
5+
6+
{# <meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=0.75" /> #}
7+
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<style>
10+
div.body {
11+
min-width: initial;
12+
max-width: initial;
13+
}
14+
</style>
15+
16+
{% if pagename == 'index' %}
17+
<link rel="canonical" href="https://docs.python-guide.org/"/>
18+
{% elif pagename == '404' %}
19+
{# No canonical on our 404 template. #}
20+
{% else %}
21+
<link rel="canonical" href="https://docs.python-guide.org/{{ pagename }}/"/>
22+
{% endif %}
23+
24+
<link rel="icon" type="image/png" href="https://media.readthedocs.org/images/favicon.png">
25+
526
<meta name="google-site-verification" content="013PxE2_8KX9jdUSC5gr8QsfdxTXr1mFgmD9zplp5II" />
27+
28+
{# Alabaster theme native GA integration is outdated (ga.js). #}
29+
{# Insert our own GA snippet instead. #}
30+
<script>
31+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
32+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
33+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
34+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
35+
36+
ga('create', 'UA-37242602-11', 'auto');
37+
ga('send', 'pageview');
38+
</script>
639
{% endblock %}

docs/_templates/sidebarintro.html

+6-7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
<h3>Stay Informed</h3>
1414
<p>Receive updates on new releases and upcoming projects.</p>
1515

16-
<p><iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false"
17-
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
16+
<p><iframe src="https://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false" allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
1817

1918
<p><a href="https://twitter.com/kennethreitz" class="twitter-follow-button" data-show-count="false">Follow @kennethreitz</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
2019

@@ -51,21 +50,21 @@ <h3>Contributors</h3>
5150
This guide is the result of the collaboration of
5251
<a href="https://github.com/kennethreitz/python-guide/graphs/contributors">hundreds of people</a>
5352
around the world, and your contributions
54-
<a href="http://docs.python-guide.org/en/latest/notes/contribute/">are welcome</a>!
53+
<a href="https://docs.python-guide.org/notes/contribute/">are welcome</a>!
5554
</p>
5655

5756

5857
<h3>Useful Links</h3>
5958
<ul>
60-
<li><a href="http://python-guide.org/">The Guide Website</a></li>
61-
<li><a href="http://github.com/kennethreitz/python-guide">The Guide @ GitHub</a></li>
62-
<li><a href="http://github.com/kennethreitz/python-guide/issues">Issue Tracker</a></li>
59+
<li><a href="https://docs.python-guide.org/">The Guide Website</a></li>
60+
<li><a href="http://github.com/realpython/python-guide">The Guide @ GitHub</a></li>
61+
<li><a href="http://github.com/realpython/python-guide/issues">Issue Tracker</a></li>
6362
<li><a href="https://media.readthedocs.org/pdf/python-guide/latest/python-guide.pdf">The Guide as a PDF</a></li>
6463
</ul>
6564

6665
<h3>Translations</h3>
6766
<ul>
68-
<li><a href="http://docs.python-guide.org/en/latest/">English</a></li>
67+
<li><a href="https://docs.python-guide.org/">English</a></li>
6968
<li><a href="https://python-guide-fr.readthedocs.io/fr/latest/">French</a></li>
7069
<li><a href="https://pythonguidecn.readthedocs.io/zh/latest/">Chinese</a></li>
7170
<li><a href="http://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>

docs/_templates/sidebarlogo.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
<h3>Get Updates</h3>
1414
<p>Receive updates on new releases and upcoming projects.</p>
1515

16-
<p><iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false"
17-
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
16+
<p><iframe src="https://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false" allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
1817

1918
<p><a href="https://twitter.com/kennethreitz" class="twitter-follow-button" data-show-count="false">Follow @kennethreitz</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
2019
<p><a href="https://saythanks.io/to/kennethreitz">Say Thanks!</a></p>
@@ -49,7 +48,7 @@ <h3>Other Projects</h3>
4948

5049
<h3>Translations</h3>
5150
<ul>
52-
<li><a href="http://docs.python-guide.org/en/latest/">English</a></li>
51+
<li><a href="https://docs.python-guide.org/">English</a></li>
5352
<li><a href="https://python-guide-fr.readthedocs.io/fr/latest/">French</a></li>
5453
<li><a href="https://pythonguidecn.readthedocs.io/zh/latest/">Chinese</a></li>
5554
<li><a href="http://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>

docs/dev/virtualenvs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ using your OS package manager, you may have to `install pip <https://pip.pypa.io
6262
.. _python.org: https://python.org
6363
.. _pip: https://pypi.org/project/pip/
6464
.. _Homebrew: https://brew.sh
65-
.. _Installing Python: http://docs.python-guide.org/en/latest/starting/installation/
65+
.. _Installing Python: https://docs.python-guide.org/starting/installation/
6666

6767

6868
Installing Pipenv

runtime.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.6

0 commit comments

Comments
 (0)