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

Reuse component for Collector documentation #896

Closed
wants to merge 3 commits into from
Closed

Conversation

kickoke
Copy link
Contributor

@kickoke kickoke commented Feb 11, 2022

The file _config.mdx is a component for the "Configuration" section in the collectors documentation.

The goal is to pass the file name of the configuration file into a variable, so the component can render the same information but with a changing filename.

Currently, the reuse doesn't work because of the following error in _config.mdx.

Module parse failed: Unexpected token (3:3)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export const pluginFile = "Default Value";
|

To edit the <>{props.pluginFile}</> configuration file:
|
| 1. Navigate to the Netdata config directory.

@netlify
Copy link

netlify bot commented Feb 11, 2022

❌ Deploy Preview for netdata-docusaurus failed.

🔨 Explore the source changes: d967fbb

🔍 Inspect the deploy log: https://app.netlify.com/sites/netdata-docusaurus/deploys/6209ee2aab75090008175e02

@kickoke kickoke requested a review from tkatsoulas February 11, 2022 18:01
@kickoke kickoke self-assigned this Feb 11, 2022
Signed-off-by: Tasos Katsoulas <[email protected]>
@tkatsoulas
Copy link
Contributor

tkatsoulas commented Feb 14, 2022

Hi there, I look into this over the weekend.

In the latest commit you can see how this method could work (don't pay attention on the paths, just the implementation), unfortunately this functionality included in
docusaurus v2.0.0-beta.4 (https://github.com/facebook/docusaurus/releases/tag/v2.0.0-beta.4) but in this version (and the later on) there is this facebook/docusaurus#6072 issue that we must examine.

So we pause this effort for now.

Next steps:

  • update docusaurus in a newer version (we need this for other reasons also)
  • check if this implementation works

@kickoke
Copy link
Contributor Author

kickoke commented Mar 10, 2022

@tkatsoulas Just to document the current state:

You've tested the _collector_config.mdx file on 2.0.0beta15, right?
The outcome was that the reuse in the code block and the list item didn't work.

Let's test the _config.mdx file because this has the component markup (<>{props.pluginFile}</>) in all instances and maybe it works then.

@tkatsoulas
Copy link
Contributor

tkatsoulas commented Mar 10, 2022

You've tested the _collector_config.mdx file on 2.0.0beta15, right?

yes

Let's test the _config.mdx file because this has the component markup (<>{props.pluginFile}</>) in all instances and maybe it works then.

You can check the check_reuse_mdx_in_beta_15 branch, the issue still remains

@kickoke kickoke mentioned this pull request Mar 11, 2022
1 task
@kickoke
Copy link
Contributor Author

kickoke commented Mar 11, 2022

Handled by #930

@kickoke kickoke closed this Mar 11, 2022
@Ancairon Ancairon deleted the config-reuse branch February 10, 2023 12:53
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.

2 participants