question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to enable HeaderIds in marked

See original GitHub issue

Is your feature request related to a problem? It would be helpful if you could jump directly to a give location the project page/README.md. Today tools like oclif create README.md files that contain e.g. a TOC that relies on HTML anchors. Websites like github or gitlab also support these anchors.

Describe the solution you’d like The marked package used by verdaccio can generate these anchors( as id=…) by setting marked.use({renderer,headerIds: true}) If there are usecases where headerIds are not welcome, i’d like to have a config option where i can enable them manually for my verdaccio installation.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mknjcommented, Sep 26, 2020

just tried with docker run -p 4873:4873 verdaccio/verdaccio:5.x-next.

curl http://localhost:4873/-/verdaccio/package/readme/minipackage shows the header id

curl http://localhost:4873/-/verdaccio/package/readme/minipackage
<p>hallo</p>
<h1 id="some-header">some header</h1>
<p>demo</p>

but the webapp http://localhost:4873/-/web/detail/minipackage still has

<h1>some header</h1>

it seems that the webapp does some sanitize() too.

Is there some way to customize the webapp rendering?

0reactions
juanpicadocommented, Sep 27, 2020

@mknj master uses still yarn v1. The master only allows deps updates or urgent bug fixes. New development happens only on 5.x otherwise is crazy keep both on sync.

The 5.x-next on Docker hub yeah, it is old, I should remove that tag. I’m deploying here https://github.com/verdaccio/verdaccio/packages/13531 in every merge to 5.x

Read more comments on GitHub >

github_iconTop Results From Across the Web

setOptions - Marked Documentation
If true, use approved GitHub Flavored Markdown (GFM) specification. headerIds, boolean, true, v0.4.0, If true, include an id attribute when emitting headings ( ......
Read more >
headerIds is not valid. · Issue #1208 · markedjs/marked - GitHub
I don't believe the headerIds option was added to a release yet ... we have not actually released the ability to disable header...
Read more >
HTML Specific Settings - Marked 2
Disable Automatic Header IDs¶. Marked includes an option to disable automatic header ID generation. You can find this option in the Marked 2...
Read more >
hexo-renderer-marked: Documentation | Openbase
First solution is to enable option dompurify: true , which will sanitize the rendered HTML. The side effect of this solution is that...
Read more >
options.marked - Assemble.io
Enable GitHub flavored markdown. highlight. Type: Function. A function to highlight code blocks. The function takes three arguments: code , lang ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found