Skip to content

Add useful resources to the index page #54

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 3 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add useful resources to the index page
  • Loading branch information
humitos committed May 4, 2020
commit 3b82ef2c02ac6fe43594b81d9c02d094fa17a5db
File renamed without changes.
11 changes: 11 additions & 0 deletions .overrides/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Overrides
=========

This directory is recursively copied into `cpython/Doc`.
It needs to have the same structure than `cpython/Doc`.

It allows us

- to have our own `CONTRIBUTING.rst` guide
- change the index sidebar with links that are interesting for translators
- etc
11 changes: 11 additions & 0 deletions .overrides/tools/templates/indexsidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<h3>¡Ayúdanos a traducir!</h3>
<ul>
<li><a href="CONTRIBUTING.html">Guía para contribuir</a></li>
</ul>

<h3>Recursos</h3>
<ul>
<li><a href="https://mail.python.org/mailman3/lists/docs-es.python.org/">Lista de correos</a></li>
<li><a href="https://t.me/python_docs_es">Canal de Télegram</a></li>
<li><a href="https://github.com/PyCampES/python-docs-es">Repositorio GitHub</a></li>
</ul>
11 changes: 10 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@

os.system('mkdir -p cpython/locales/es/')
os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES')
os.system('ln -nfs `pwd`/CONTRIBUTING.rst cpython/Doc/CONTRIBUTING.rst')


# Override all the files from ``.overrides`` directory
import glob
for root, dirs, files in os.walk('.overrides'):
for fname in files:
if fname == 'README.rst' and root == '.overrides':
continue
destroot = root.replace('.overrides/', '')
os.system(f'ln -nfs `pwd`/{root}/{fname} cpython/Doc/{destroot}/{fname}')

gettext_compact = False
locale_dirs = ['../locales', 'cpython/locales'] # relative to the sourcedir
Expand Down