Skip to content
152 changes: 97 additions & 55 deletions Doc/tools/templates/indexcontent.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,70 +14,112 @@
<meta property="og:image:width" content="200">
<meta property="og:image:height" content="200">
<meta name="theme-color" content="#3776ab">
<style>
.contentstable {
display: grid;
gap: 0 2em;
grid-template-columns: 1fr 1fr;
margin: 0 auto;
max-width: 90%;
}
.contentstable ul {
list-style: none;
margin: 0;
padding: 0;
}
.contentstable a {
text-decoration: none;
}
.contentstable a:hover {
text-decoration: underline;
}
.contentstable li.biglink {
line-height: 150%;
margin-bottom: 1em;
}
@media (max-width: 600px) {
.contentstable {
grid-template-columns: 1fr;
}
}
</style>
{%- endblock -%}
{% block body %}
<h1>{{ docstitle|e }}</h1>
<p>
{% trans %}Welcome! This is the official documentation for Python {{ release }}.{% endtrans %}
</p>
<p><strong>{% trans %}Documentation sections:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">{% trans %}What's new in Python {{ version }}?{% endtrans %}</a><br>
<span class="linkdescr"> {% trans whatsnew_index=pathto("whatsnew/index") %}Or <a href="{{ whatsnew_index }}">all "What's new" documents since Python 2.0</a>{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">{% trans %}Tutorial{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Start here: a tour of Python's syntax and features{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">{% trans %}Library reference{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Standard library and builtins{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">{% trans %}Language reference{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Syntax and language elements{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">{% trans %}Python setup and usage{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}How to install, configure, and use Python{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">{% trans %}Python HOWTOs{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}In-depth topic manuals{% endtrans %}</span></p>
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">{% trans %}Installing Python modules{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Third-party modules and PyPI.org{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("distributing/index") }}">{% trans %}Distributing Python modules{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Publishing modules for use by other people{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">{% trans %}Extending and embedding{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}For C/C++ programmers{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">{% trans %}Python's C API{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}C API reference{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">{% trans %}FAQs{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Frequently asked questions (with answers!){% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("deprecations/index") }}">{% trans %}Deprecations{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Deprecated functionality{% endtrans %}</span></p>
</td></tr>
</table>
<div class="contentstable">
<ul>
<li class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">{% trans %}What's new in Python {{ version }}?{% endtrans %}</a><br>
<span class="linkdescr"> {% trans whatsnew_index=pathto("whatsnew/index") %}Or <a href="{{ whatsnew_index }}">all "What's new" documents since Python 2.0</a>{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">{% trans %}Tutorial{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Start here: a tour of Python's syntax and features{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">{% trans %}Library reference{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Standard library and builtins{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">{% trans %}Language reference{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Syntax and language elements{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">{% trans %}Python setup and usage{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}How to install, configure, and use Python{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">{% trans %}Python HOWTOs{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}In-depth topic manuals{% endtrans %}</span></li>
</ul>
<ul>
<li class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">{% trans %}Installing Python modules{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Third-party modules and PyPI.org{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">{% trans %}Extending and embedding{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}For C/C++ programmers{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">{% trans %}Python's C API{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}C API reference{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">{% trans %}FAQs{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Frequently asked questions (with answers!){% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("deprecations/index") }}">{% trans %}Deprecations{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Deprecated functionality{% endtrans %}</span></li>
</ul>
</div>

<p><strong>{% trans %}Other resources:{% endtrans %}</strong></p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

With this we'll have two "Other resources" sections, one in the sidebar and one here, why not add these to the existing one?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The "Other resources" section also has two links to the deprecated Python wiki, maybe we should drop those and link to packaging.python.org and typing.python.org instead.

Copy link
Copy Markdown
Member

@hugovk hugovk May 19, 2026

Choose a reason for hiding this comment

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

Do we need both "Other resources" sections?

If yes, should they both contain the same things?

If not, which shall we remlve?


Perhaps the wiki books link could be replaced with
https://www.pythondiscord.com/resources/?type=book or https://pythonbooks.org/ ?

See also #148998 for more general wiki cleanup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm in favor of removing the other section if it links to outdated content

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the placement of this new section should be fairly prominent, considering it contains a link that was (indirectly) already featured front and center. I think it's helpful to have a "signpost" of sorts so users who do a web search for "Python documentation" can easily find related resources without having to look at the small text in the sidebar. I'm of the opinion that sidebars are for navigation of complex hierarchies, not holding content

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree that the sidebar is serving two purposes now which could be confusing. If straightening that out expands the scope too much, we can continue the discussion in a subsequent PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nedbat It should be fairly easy (famous last words) to get this sorted. I think we would just remove the sidebar and put the 3 non-wiki links in this section. That being said, it does expand the scope of this PR. Thoughts on merging this as-is (now that @hugovk's table -> list conversion is merged) and combining the sections in a subsequent PR?

<div class="contentstable">
<ul>
<li class="biglink"><a class="biglink" href="https://packaging.python.org">{% trans %}Python Packaging User Guide{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Resources relating to Python packaging{% endtrans %}</span></li>
</ul>
<ul>
<li class="biglink"><a class="biglink" href="https://typing.python.org">{% trans %}Static Typing with Python{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Information and guides about Python type safety{% endtrans %}</span></li>
</ul>
</div>

<p><strong>{% trans %}Indices, glossary, and search:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">{% trans %}Global module index{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}All modules and libraries{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{% trans %}General index{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}All functions, classes, and terms{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">{% trans %}Glossary{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Terms explained{% endtrans %}</span></p>
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("search") }}">{% trans %}Search page{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Search this documentation{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{% trans %}Complete table of contents{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Lists all sections and subsections{% endtrans %}</span></p>
</td></tr>
</table>
<div class="contentstable">
<ul>
<li class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">{% trans %}Global module index{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}All modules and libraries{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{% trans %}General index{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}All functions, classes, and terms{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">{% trans %}Glossary{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Terms explained{% endtrans %}</span></li>
</ul>
<ul>
<li class="biglink"><a class="biglink" href="{{ pathto("search") }}">{% trans %}Search page{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}Search this documentation{% endtrans %}</span></li>
<li class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{% trans %}Complete table of contents{% endtrans %}</a><br>
<span class="linkdescr">{% trans %}All sections and subsections{% endtrans %}</span></li>
</ul>
</div>

<p><strong>{% trans %}Project information:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("bugs") }}">{% trans %}Reporting issues{% endtrans %}</a></p>
<p class="biglink"><a class="biglink" href="https://devguide.python.org/documentation/help-documenting/">{% trans %}Contributing to docs{% endtrans %}</a></p>
<p class="biglink"><a class="biglink" href="{{ pathto("download") }}">{% trans %}Download the documentation{% endtrans %}</a></p>
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("license") }}">{% trans %}History and license of Python{% endtrans %}</a></p>
<p class="biglink"><a class="biglink" href="{{ pathto("copyright") }}">{% trans %}Copyright{% endtrans %}</a></p>
<p class="biglink"><a class="biglink" href="{{ pathto("about") }}">{% trans %}About the documentation{% endtrans %}</a></p>
</td></tr>
</table>
<div class="contentstable">
<ul>
<li class="biglink"><a class="biglink" href="{{ pathto("bugs") }}">{% trans %}Reporting issues{% endtrans %}</a></li>
<li class="biglink"><a class="biglink" href="https://devguide.python.org/documentation/help-documenting/">{% trans %}Contributing to docs{% endtrans %}</a></li>
<li class="biglink"><a class="biglink" href="{{ pathto("download") }}">{% trans %}Download the documentation{% endtrans %}</a></li>
</ul>
<ul>
<li class="biglink"><a class="biglink" href="{{ pathto("license") }}">{% trans %}History and license of Python{% endtrans %}</a></li>
<li class="biglink"><a class="biglink" href="{{ pathto("copyright") }}">{% trans %}Copyright{% endtrans %}</a></li>
<li class="biglink"><a class="biglink" href="{{ pathto("about") }}">{% trans %}About the documentation{% endtrans %}</a></li>
</ul>
</div>
{% endblock %}
Loading