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

feat: rehype plugins #65

Merged
merged 16 commits into from
Jun 10, 2020
Merged

feat: rehype plugins #65

merged 16 commits into from
Jun 10, 2020

Conversation

benjamincanac
Copy link
Member

@benjamincanac benjamincanac commented May 29, 2020

  • Import local plugins: ~/plugins/remark-plugin.js
  • Configure as Nuxt modules: ['~/plugins/rehype-plugin.js', { option: 2 }]
  • Add tests on options merging

BREAKING CHANGE: plugins disappear in favor of remarkPlugins and rehypePlugins. basePlugins also disappear in favor of deep merging and functions override
@benjamincanac benjamincanac requested a review from atinux May 29, 2020 17:35
@codecov-commenter
Copy link

codecov-commenter commented May 29, 2020

Codecov Report

Merging #65 into master will increase coverage by 0.73%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   93.61%   94.34%   +0.73%     
==========================================
  Files          13       14       +1     
  Lines         423      460      +37     
  Branches       81       91      +10     
==========================================
+ Hits          396      434      +38     
+ Misses         24       23       -1     
  Partials        3        3              
Impacted Files Coverage Δ
lib/index.js 100.00% <100.00%> (ø)
lib/parsers/markdown/index.js 87.80% <100.00%> (+0.57%) ⬆️
lib/utils.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cdeed1...dfc4623. Read the comment docs.

@juliomrqz
Copy link
Contributor

@benjamincanac, is it possible to use local plugins in a similar way that Nuxt.js modules? For example:

/// nuxt.config.js
export default {
  content: {
    markdown: {
      remarkPlugins: [
        "~/plugins/remark-plugin.js",
      ],
      rehypePlugins: [
        ["~/plugins/rehype-plugin.js", { option: 2 }],
      ],
    },
  },
};

This was linked to issues Jun 1, 2020
@benjamincanac
Copy link
Member Author

@juliomrqz Indeed it will be! You can already try this PR.

docs/components/bases/CodeGroup.vue Outdated Show resolved Hide resolved
docs/components/bases/CodeGroup.vue Outdated Show resolved Hide resolved
docs/content/en/writing.md Outdated Show resolved Hide resolved
lib/database.js Outdated Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
lib/parsers/markdown/index.js Outdated Show resolved Hide resolved
@juliomrqz
Copy link
Contributor

@benjamincanac Perfect, I’ll check it out. Thanks 😎

@benjamincanac benjamincanac requested a review from atinux June 3, 2020 15:33
@benjamincanac benjamincanac removed a link to an issue Jun 3, 2020
@benjamincanac benjamincanac changed the title Rehype plugins feat: rehype plugins Jun 8, 2020
@benjamincanac benjamincanac marked this pull request as ready for review June 8, 2020 17:40
@benjamincanac benjamincanac merged commit f6bb586 into master Jun 10, 2020
@benjamincanac benjamincanac deleted the feat/rehype-plugins branch June 26, 2020 14:15
pi0 pushed a commit that referenced this pull request Feb 8, 2022
pi0 pushed a commit that referenced this pull request May 5, 2022
* fix(query): support multi arguments slug

* chore: disable eslint `no-redeclare`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for rehype plugins
4 participants