NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
453 stars 102 forks source link

Allow GitHub repo source links to use branch names #218

Closed mcarans closed 2 years ago

mcarans commented 2 years ago

It would be great to have the option for the source links to use a branch name rather than SHA (even though this requires the user to remember to update the documentation for the line numbers to be correct).

eg. instead of: https://github.com/NiklasRosenstein/pydoc-markdown/blob/33d05aff1a44ff1b630190166ee655b27f04bebd/src/pydoc_markdown/contrib/loaders/python.py#L73 have this: https://github.com/NiklasRosenstein/pydoc-markdown/blob/develop/src/pydoc_markdown/contrib/loaders/python.py#L73

NiklasRosenstein commented 2 years ago

Hey @mcarans , in the next version you can set use_branch: true on the source linker config.

renderer:
  markdown:
    source_linker:
      type: github
      repo: NiklasRosenstein/pydoc-markdown
      use_branch: true