Add Table of Contents to pages for viewing via github
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- markdown
- Ambito
- documentation
Direzione di ricerca
Inizia facendo un inventario delle pagine di documentazione Markdown del repository e rivedendo la discussione esistente della issue su GitPages. Valuta i comandi doctoc proposti e la posizione suggerita dopo l’intestazione di livello 1. Il lavoro è completato quando le pagine pertinenti visualizzate su GitHub hanno sommari navigabili senza includere il titolo della pagina.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary: There's a really easy way to do this, and keep it uptodate - this ticket is to explore whether you would accept a pull-request to implement it...
Motivation
Having seen the Table of Contents links on some docs on github, I've found them to be really useful in getting any overview of the topics covered, and then also for really easy navigation.
Examples are:
- https://github.com/catchorg/Catch2/blob/master/docs/assertions.md#top
- https://github.com/approvals/ApprovalTests.cpp/blob/master/doc/Contributing.md#top
I keep coming back to https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md to look for different types of information, and it would save a lot of time and scrolling if users could jump to the section of interest.
Alternatives considered
Searching through the existing issues, I saw #9 which said the solution was to use gitpages,
I downloaded the gitpages PDF, and it doesn't have tables of contents for sections.
And its "Read" feature gives "This site can't be reached" - ERR_CONNECTION_TIMED_OUT - https://lefticus.gitbooks.io/cpp-best-practices/content/
Given how quickly github.com loads Markdown pages, coupled with the convenience of being able to see page histories there and even possibly suggest improvements to the docs, I feel that it's preferable to add Table of Contents to each of the live pages on github.
Possible implementation
For ApprovalTests.cpp, we are using https://github.com/thlorenz/doctoc
It's easy to install:
npm install -g doctoc
Then we run it with this on Windows:
doctoc --title **Contents** .
or this on Unix:
doctoc --title '**Contents**' .
A minor enhancement is to move the generated ToC to after the level-1 heading, so that only level-2 and above headings are included in the ToC.
Consequences
The nice this is that this doesn't require all cppbestpractices contributors to have this tool.
Many edits won't change the ToC, and for those that do, doctoc could be run later by someone who has the tool. (I'd be happy to do that, but it would be better done by someone who has commit-permission on the repo)
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 8.9k
- Fork
- 903
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cpp-best-practices/cppbestpractices
-
Broken Link Chapter 2: Use_the_Tools_AvailableForse di nuovo libera @vishesharma20 l’ha presa 172 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 64/100
cpp-best-practices/cppbestpractices#169 · 1 commento ·
-
Broken Link - 11 Further ReadingForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
cpp-best-practices/cppbestpractices#168 · 1 commento ·
-
C++ PracticeAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
cpp-best-practices/cppbestpractices#160 · 1 commento ·
Tutte le issue di cpp-best-practices/cppbestpractices
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
[Sync EN] Document the timezone of DateTime(Immutable)::createFromTimestamp() (#6074)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertasync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
website
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
damodharg6/payledger#7 ·
-
area/mobile good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100