python / python/cpython

Within-section navigation missing for smaller screens, global contents difficult to navigate.

未关闭
#123,452 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

docs type-feature
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

Documentation

Problem

Within a documentation section (I'm using that term to refer to sub-documents like, say, the tutorial, not sure if there is an official term), there is currently no way to go "up" a level to see the contents of that section when not using a full width screen:

Screenshot 2024-08-28 at 7 20 21 PM

Full width screens have breadcrumbs at the top

Screenshot 2024-08-28 at 7 21 07 PM

The "table of contents" link takes you back to the global contents, which are not usable, as they contain every header from every document in the docs - take a scroll if you haven't in awhile: https://docs.python.org/3/contents.html

It's also not obvious which document you are in, as "table of contents" is ambiguous - the only place that "tutorial" is present is in the URL.

This makes it quite challenging to navigate the docs on mobile, or when splitting a screen and reading in a narrow window.

Desired solution

I would like...

  • the sidebar "Table of Contents" to be replaced with the title of current document section when one is within a document section (eg. /{version}/tutorial/interpreter.html), and with a link to the global ToC when one is in a section ToC (eg. /{version}/tutorial/).
  • The maxdepth of the global ToC to be reduced to 2 to make it usable

I will follow on with a PR momentarily...

Linked PRs
  • gh-123453

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查文档侧边栏导航、全局目录以及 /{version}/tutorial/interpreter.html 和 /{version}/tutorial/ 等章节 URL。完成的标准是:窄屏能够识别当前章节,提供返回该章节内容的导航,将章节 ToCs 链接到全局 ToC,并将全局 ToC 的 maxdepth 限制为 2。issue 中已经引用了一个已链接的 pull request。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。