[Feature] TOC for GitHub wiki pages
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Read the README section on “Remote files” and trace how remote URLs are routed between remotehtml and remotemd. Then inspect the existing HTML extraction path and its tests, if present, to identify how wiki page URLs can produce a TOC and how multi-input links are prefixed. Done means the supplied GitHub wiki URL yields the requested headings and links.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
The Bash version builds a TOC for a GitHub wiki page by its URL (see "Remote files" in its
README). Here such a URL fails:
$ gh-md-toc https://github.com/ekalinin/nodeenv/wiki/Who-Uses-Nodeenv
process "https://github.com/ekalinin/nodeenv/wiki/Who-Uses-Nodeenv": get remote HTML "https://github.com/ekalinin/nodeenv/wiki/Who-Uses-Nodeenv": unexpected content type "text/html; charset=utf-8"
Every URL outside githubusercontent.com goes to remotehtml, which asks for JSON and
reads the TOC from the payload that GitHub embeds in blob pages. A wiki page is served as
HTML only.
Describe the solution you'd like
A wiki page URL (https://github.com/<owner>/<repo>/wiki/<page>) gives a TOC, as in the
Bash version:
* [Who Uses Nodeenv?](#who-uses-nodeenv)
* [edx](#edx)
* [OpenStack](#openstack)
...
With several inputs, the links are prefixed with the page URL, as for other remote pages.
Describe alternatives you've considered
The raw Markdown of a wiki page already works, through the remotemd path:
gh-md-toc https://raw.githubusercontent.com/wiki/ekalinin/nodeenv/Who-Uses-Nodeenv.md
Additional context
Possible ways to support it: rewrite a wiki URL to its raw.githubusercontent.com/wiki/...
form, or extract the headings from a text/html answer with RegexpExtractor, as the
Bash version does with the page HTML.
- Dominant language
- Go
- Stars
- 525
- Forks
- 89
- Avg merge
- 6m
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ekalinin/github-markdown-toc.go
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
All issues in ekalinin/github-markdown-toc.go
Similar issues
-
book-layout.spec fails when the similar-books rail holds other projects' booksPossibly taken @praetorianer777 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
praetorianer777/GoTome#373 ·
Maintainers usually reply within 1 day
-
/shutdown/ready can fail to return an HTTP response when readiness takes longer than the server write timeoutPossibly taken @floriankoch claimed this today. Opentriage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
envoyproxy/gateway#10562 ·
Maintainers usually reply within 1 day
-
Adding an LDAP group reports every search failure as "LDAP Group DN is not found"Possibly taken @Daksha1611 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100