mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
docs: fix links from TOC to Headings and improve appearance of docs (a little) (#4866)
* docs: fix links from TOC to Headings * docs: Styling Just a little modernisation of the appearance of the documentation * Update src/bin/doc/package.json Co-authored-by: Richard Hansen <rhansen@rhansen.org> Co-authored-by: Richard Hansen <rhansen@rhansen.org>
This commit is contained in:
parent
41ec7fe3fc
commit
4a65acf417
4 changed files with 28 additions and 62 deletions
|
@ -137,6 +137,12 @@ const getSection = (lexed) => {
|
|||
const buildToc = (lexed, filename, cb) => {
|
||||
let toc = [];
|
||||
let depth = 0;
|
||||
|
||||
marked.setOptions({
|
||||
headerIds: true,
|
||||
headerPrefix: `${filename}_`,
|
||||
});
|
||||
|
||||
lexed.forEach((tok) => {
|
||||
if (tok.type !== 'heading') return;
|
||||
if (tok.depth - depth > 1) {
|
||||
|
|
13
src/bin/doc/package-lock.json
generated
13
src/bin/doc/package-lock.json
generated
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"name": "node-doc-generator",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"marked": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-1.1.1.tgz",
|
||||
"integrity": "sha512-mJzT8D2yPxoPh7h0UXkB+dBj4FykPJ2OIfxAWeIHrvoHDkFxukV/29QxoFQoPM6RLEwhIFdJpmKBlqVM3s2ZIw=="
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
"node": ">=10.17.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"marked": "1.1.1"
|
||||
"marked": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"optionalDependencies": {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue