Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate marked options at the root of the options object #62

Closed
webketje opened this issue May 24, 2022 · 0 comments · May be fixed by https-quantumblockchainai-atlassian-net/taurus-wiki-metalsmith-netlify-starter#26

Comments

@webketje
Copy link
Member

webketje commented May 24, 2022

It is confusing that metalsmith & marked options must be specified at the same level of the options object.

markdown({
  gfm: true,  // -> marked opt
  keys: ['desc'] // -> metalsmith opt
})

This has the risk of name collision and passes irrelevant options to marked.
Better would be, as in metalsmith-in-place & layouts:

markdown({
  keys: ['desc'], // -> metalsmith opt,
  engineOptions: {
    gfm: true,  // -> marked opt
  }
})

For 1.x both will continue to be supported, but add a deprecation warning.
For 2.x root-level marked options will be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant