pdoc3 / pdoc3/pdoc

Show short submodule names in TOC

Open
#265 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.2k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Sorry for asking a very basic question but I've done some research & no result.

Here's my folder structure:
main-long-name-folder
|--modules
|----|--helper.py
|--test.py

I'm using some functions in helper.py like helper.action1(). I use pdoc to generate HTML. Problem is, after generating successfully, the sub-modules in left sidebar has long package prefix name, for example: main-long-name-folder.modules.

I figure that I can change the name by changing the folder name main-long-name-folder to main then run the pdoc again, but it is not a good way to do because the repo name is fixed, I don't want to change folder name.

Do we have anyway to re-define the package name or changing refname of package to make it a lot shorter?

Thanks a lot.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported package structure and generate its HTML with pdoc, then trace how the left-sidebar table of contents derives displayed submodule names. The work is done when the sidebar can show short names without renaming the repository folder, with coverage for the nested-module example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.