Open sharky98 opened 1 year ago
Adding a fourth issue.
remark
plugins and not the Docusaurus plugins.
Configuration should looks like this if using @docusaurus/preset-classic
.// highlight-start
const importFile = require("@rise4fun/docusaurus-remark-plugin-import-file");
// highlight-end
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
remarkPlugins: [
...,
// highlight-start
importFile
// highlight-end
],
},
},
],
],
};
If using only the docs plugin without the preset, it should looks like this.
// highlight-start
const importFile = require("@rise4fun/docusaurus-remark-plugin-import-file");
// highlight-end
module.exports = {
plugins: [
[
'@docusaurus/plugin-content-docs',
/** @type {import("@docusaurus/plugin-content-docs").Options} */
({
...,
remarkPlugins: [
...,
// highlight-start
importFile
// highlight-end
],
}),
],
],
};
On a better note, once configured correctly, this plugin do works with my use case!!! 🎉🚀
Hello, I wanted to try the plugin
remark-plugin-import-file
if it fit my use case. However, there seems to have a lot of discrepancies in this repository regarding this package. Probably due to the recent changes in namespace?What is working
pnpm
add command:pnpm add @rise4fun/docusaurus-remark-plugin-import-file
npm install
andyarn add
.What is not aligned what is working
README.md
file
is ending with as
, but the package isn't. https://github.com/microsoft/docusaurus-plugins/blob/328986884c0f4a61295897bd8e4a588696c7219f/packages/docusaurus-remark-plugin-import-file/package.json#L2Documentation
plugin-content-docs
=@docusaurus/
plugin-content-docs
). Meaning, when reading the docs I assumed the package name wasremark-plugin-import-file
, plus whatever scope. But it is not!Documentation
npm
package name shown in the command does not match either doc title or package itself.Regards!