sphinx-doc/sphinx

DRY: refactor common functionality in generating index nodes

Open

#2,914 创建于 2016年8月26日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)Python (1,985 fork)batch import
good first issuehelp wantedtype:enhancement

仓库指标

Star
 (5,625 star)
PR 合并指标
 (平均合并 10天 11小时) (30 天内合并 11 个 PR)

描述

I am trying to write a simple extension to automatically add some index nodes. Unfortunately there doesn't seem to be any base function to do that. I found three places where the same essential stuff is being used to add index nodes to the toctree:

So it looks like I have to copy the appropriate implementation pieces of this (add a target node, add an index node, configure each of them).

It would be really useful to refactor the common functionality into a single, simple function that extensions could use.

贡献者指南