Skip to content

New hosting #908

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 18 commits into from
Jul 17, 2018
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ How to contribute
This guide is under heavy development. If you would like to contribute, please
see:

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

How to test your changes
------------------------
Expand Down Expand Up @@ -34,4 +34,4 @@ Style Guide

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

http://docs.python-guide.org/en/latest/notes/styleguide/
https://docs.python-guide.org/notes/styleguide/
2 changes: 1 addition & 1 deletion Readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Topics include:

If you aren't fond of reading reStructuredText, there is an
almost up-to-date `HTML version at docs.python-guide.org
<http://docs.python-guide.org>`_.
<https://docs.python-guide.org>`_.
4 changes: 2 additions & 2 deletions docs/404.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ It looks like this was the result of either:
- a mistyped address
- an out-of-date link

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

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

.. raw:: html

Expand Down
6 changes: 6 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ dirhtml:
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

netlify: dirhtml
@cp $(BUILDDIR)/dirhtml/404/index.html $(BUILDDIR)/dirhtml/404.html
@sed -i -e 's/src="..\//src="\//g' $(BUILDDIR)/dirhtml/404.html
@sed -i -e 's/href="..\//href="\//g' $(BUILDDIR)/dirhtml/404.html
@cp _extra/* $(BUILDDIR)/dirhtml/

singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
Expand Down
16 changes: 16 additions & 0 deletions docs/_extra/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Redirect rules
# Docs: https://www.netlify.com/docs/redirects/

# Redirect http to https (avoid one extra hop with an explicit rule for /en/latest/)
http://docs.python-guide.org/en/latest/* https://docs.python-guide.org/:splat 301!
http://docs.python-guide.org/* https://docs.python-guide.org/:splat 301!

# Redirect RTD prefix to /
/en/latest/* /:splat 301!

# Redirect domain aliases to primary domain
http://python-guide.org/* http://docs.python-guide.org/:splat 301!
https://python-guide.org/* https://docs.python-guide.org/:splat 301!

# Redirect Netlify version to primary domain
https://python-guide.netlify.com/* https://docs.python-guide.org/:splat 301!
35 changes: 34 additions & 1 deletion docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
{% extends "!layout.html" %}

{%- block extrahead %}
{{ super() }}
{# No super() because we want to avoid loading an empty custom.css file #}

{# <meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=0.75" /> #}

<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
div.body {
min-width: initial;
max-width: initial;
}
</style>

{% if pagename == 'index' %}
<link rel="canonical" href="https://docs.python-guide.org/"/>
{% elif pagename == '404' %}
{# No canonical on our 404 template. #}
{% else %}
<link rel="canonical" href="https://docs.python-guide.org/{{ pagename }}/"/>
{% endif %}

<link rel="icon" type="image/png" href="https://media.readthedocs.org/images/favicon.png">

<meta name="google-site-verification" content="013PxE2_8KX9jdUSC5gr8QsfdxTXr1mFgmD9zplp5II" />

{# Alabaster theme native GA integration is outdated (ga.js). #}
{# Insert our own GA snippet instead. #}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-37242602-11', 'auto');
ga('send', 'pageview');
</script>
{% endblock %}
13 changes: 6 additions & 7 deletions docs/_templates/sidebarintro.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<h3>Stay Informed</h3>
<p>Receive updates on new releases and upcoming projects.</p>

<p><iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false"
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
<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>

<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>

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


<h3>Useful Links</h3>
<ul>
<li><a href="http://python-guide.org/">The Guide Website</a></li>
<li><a href="http://github.com/kennethreitz/python-guide">The Guide @ GitHub</a></li>
<li><a href="http://github.com/kennethreitz/python-guide/issues">Issue Tracker</a></li>
<li><a href="https://docs.python-guide.org/">The Guide Website</a></li>
<li><a href="http://github.com/realpython/python-guide">The Guide @ GitHub</a></li>
<li><a href="http://github.com/realpython/python-guide/issues">Issue Tracker</a></li>
<li><a href="https://media.readthedocs.org/pdf/python-guide/latest/python-guide.pdf">The Guide as a PDF</a></li>
</ul>

<h3>Translations</h3>
<ul>
<li><a href="http://docs.python-guide.org/en/latest/">English</a></li>
<li><a href="https://docs.python-guide.org/">English</a></li>
<li><a href="https://python-guide-fr.readthedocs.io/fr/latest/">French</a></li>
<li><a href="https://pythonguidecn.readthedocs.io/zh/latest/">Chinese</a></li>
<li><a href="http://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>
Expand Down
5 changes: 2 additions & 3 deletions docs/_templates/sidebarlogo.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<h3>Get Updates</h3>
<p>Receive updates on new releases and upcoming projects.</p>

<p><iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false"
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
<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>

<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>
<p><a href="https://saythanks.io/to/kennethreitz">Say Thanks!</a></p>
Expand Down Expand Up @@ -49,7 +48,7 @@ <h3>Other Projects</h3>

<h3>Translations</h3>
<ul>
<li><a href="http://docs.python-guide.org/en/latest/">English</a></li>
<li><a href="https://docs.python-guide.org/">English</a></li>
<li><a href="https://python-guide-fr.readthedocs.io/fr/latest/">French</a></li>
<li><a href="https://pythonguidecn.readthedocs.io/zh/latest/">Chinese</a></li>
<li><a href="http://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/virtualenvs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ using your OS package manager, you may have to `install pip <https://pip.pypa.io
.. _python.org: https://python.org
.. _pip: https://pypi.org/project/pip/
.. _Homebrew: https://brew.sh
.. _Installing Python: http://docs.python-guide.org/en/latest/starting/installation/
.. _Installing Python: https://docs.python-guide.org/starting/installation/


Installing Pipenv
Expand Down
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.6