diff --git a/docs/en/next/api-pages.html b/docs/en/next/api-pages.html index 1f5c572849..0be318ae37 100644 --- a/docs/en/next/api-pages.html +++ b/docs/en/next/api-pages.html @@ -135,7 +135,6 @@ MyPage.description = 'My Custom Description';

Docusaurus provides a few useful React components for users to write their own pages, found in the CompLibrary module. This module is provided as part of Docusaurus in node_modules/docusaurus, so to access it, pages in the pages directory are temporarily copied into node_modules/docusaurus when rendering to static HTML. As seen in the example files, this means that a user page at pages/en/index.js uses a require path to '../../core/CompLibrary.js' to import the provided components.

What this means to the user is that if you wish to use the CompLibrary module, make sure the require path is set correctly. For example, a page at page/mypage.js would use a path '../core/CompLibrary.js'.

If you wish to use your own components inside the website directory, use process.cwd() which will refer to the website directory to construct require paths. For example, if you add a component to website/core/mycomponent.js, you can use the require path, 'process.cwd() + /core/mycomponent.js'.

-

There is a special import for custom items @theme-original. The theme-original alias (just like using theme alias) will not get the theme component from the plugin's code. While the init-theme alias refers to the proper (theme) component (from the theme itself, where it is first defined). Therefore the theme-original is for the user and theme-initial is for the plugins.

Provided Components

Docusaurus provides the following components in CompLibrary:

CompLibrary.MarkdownBlock

@@ -248,7 +247,7 @@ MyPage.description = 'My Custom Description';

There are several ways to access the default styles provided for your site. If you have started developing your website and executed the docusaurus-init or yarn install command, your default styles can be found at website/node_modules/docusaurus/lib/static/css/main.css. Alternatively, the main.css file may be inspected directly at the Docusarus GitHub repository.

You can provide your own custom styles by adding them anywhere in the website/static directory. Any .css files you provide in the static directory will get concatenated to the end of Docusaurus' provided styles, allowing you to add to or override Docusaurus default styles as you wish.

One way to figure out what classes you wish to override or add to is to start your server locally and use your browser's inspect element tool.

-
Last updated on 8/11/2020 by Jonathan
Markdown FeaturessiteConfig.js