Skip to content

Commit 3b82ef2

Browse files
committed
Add useful resources to the index page
1 parent 060188a commit 3b82ef2

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed
File renamed without changes.

.overrides/README.rst

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Overrides
2+
=========
3+
4+
This directory is recursively copied into `cpython/Doc`.
5+
It needs to have the same structure than `cpython/Doc`.
6+
7+
It allows us
8+
9+
- to have our own `CONTRIBUTING.rst` guide
10+
- change the index sidebar with links that are interesting for translators
11+
- etc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<h3>¡Ayúdanos a traducir!</h3>
2+
<ul>
3+
<li><a href="CONTRIBUTING.html">Guía para contribuir</a></li>
4+
</ul>
5+
6+
<h3>Recursos</h3>
7+
<ul>
8+
<li><a href="https://mail.python.org/mailman3/lists/docs-es.python.org/">Lista de correos</a></li>
9+
<li><a href="https://t.me/python_docs_es">Canal de Télegram</a></li>
10+
<li><a href="https://github.com/PyCampES/python-docs-es">Repositorio GitHub</a></li>
11+
</ul>

conf.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@
3333

3434
os.system('mkdir -p cpython/locales/es/')
3535
os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES')
36-
os.system('ln -nfs `pwd`/CONTRIBUTING.rst cpython/Doc/CONTRIBUTING.rst')
36+
37+
38+
# Override all the files from ``.overrides`` directory
39+
import glob
40+
for root, dirs, files in os.walk('.overrides'):
41+
for fname in files:
42+
if fname == 'README.rst' and root == '.overrides':
43+
continue
44+
destroot = root.replace('.overrides/', '')
45+
os.system(f'ln -nfs `pwd`/{root}/{fname} cpython/Doc/{destroot}/{fname}')
3746

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

0 commit comments

Comments
 (0)