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.

[v2] unable to use theme-classic without remark-admonitions

See original GitHub issue

šŸ› Bug Report

Due to https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-classic/src/index.js#L56, you are unable to to use the @docusaurus/theme-classic theme without installing the remark-admonitions module. This shouldn’t be a hard requirement.

Have you read the Contributing Guidelines on issues?

Yep

To Reproduce

  1. Create a V2 project with the following config
'use strict';

module.exports = {
  title: 'gulp.js',
  favicon: 'img/favicon.png',
  url: 'https://gulpjs.com/',
  baseUrl: '/',
  tagline: 'The streaming build system',
  // Used by the deployment
  organizationName: 'gulpjs',
  projectName: 'gulpjs.github.io',
  // The theme
  themeConfig: {},
  themes: ['@docusaurus/theme-classic'],
  plugins: [
    ['@docusaurus/plugin-content-docs', {
      path: '../converted-docs'
    }]
  ]
};
  1. Try to run the project
  2. See this error message Screen Shot 2020-04-03 at 6 50 27 PM

Expected behavior

The theme should be usable without external dependencies unless I opt-in.

Actual Behavior

Doesn’t compile and is unusable without installing the remark-admonitions module.

Your Environment

  • Docusaurus version used: ^2.0.0-alpha.50
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): 10.15.1
  • Operating system and version (desktop or mobile): desktop

Reproducible Demo

None currently because I’m trying to upgrade the gulp website…

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
phatedcommented, Apr 5, 2020

@lex111 is there a reason that remark-admonitions isn’t just providing that lifecycle hook for itself?

0reactions
lex111commented, Apr 20, 2020

@phated we really love the feedback from our users, thank you for that. We welcome any feedback, because we are still in the alpha stage.

I tend to include admonitions in every plugin (both for docs and blogs), instead of doing this in a preset. I think it was a predictable behavior.

BTW consider adding your project to our showcase at https://v2.docusaurus.io/showcase šŸ˜‡

Read more comments on GitHub >

github_iconTop Results From Across the Web

@lebalz/remark-admonitions - npm
A remark plugin for admonitions designed with Docusaurus v2 in mind. remark-admonitions is now included out-of-the-box with @docusaurus/preset-Ā ...
Read more >
chrisvxd-docusaurus-preset-classic - npm package - Snyk
Unable to verify the project's public source code repository. Advisor Ā· JavaScript packages Ā· chrisvxd-docusaurus-preset-classicĀ ...
Read more >
2.0.0-beta.19 - Docusaurus
#7304 fix(theme-classic): remove breadcrumb items without href from microdata (@Josh-Cena) Ā· #7179 fix(theme-classic): do not add microdata itemĀ ...
Read more >
Docusaurus/CHANGELOG and Docusaurus Releases (Page 6)
... docusaurus-plugin-content-docs , docusaurus-preset-classic , docusaurus-theme-classic. #2642 fix(v2): use remark-admonitions separately in each pluginĀ ...
Read more >
Docusaurus 2 Changelog - Breword ę–‡ę”£é›†åˆ
#2477 chore(v2): upgrade remark-admonitions for a11y fixes (@lex111) ... fix(v2): do not force terminate building if client bundle failed inĀ ...
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