From e1e35e87779e0a887d1d1594eef460cf6d02c216 Mon Sep 17 00:00:00 2001 From: kadair Date: Fri, 1 Nov 2019 12:24:49 -0400 Subject: [PATCH 1/3] docs(v2): theme, plugin, and preset config --- website/docs/configuration.md | 78 +++++++++++++++++++++++++++++------ 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/website/docs/configuration.md b/website/docs/configuration.md index d58bfc3226ca..e517f2df3531 100644 --- a/website/docs/configuration.md +++ b/website/docs/configuration.md @@ -17,7 +17,7 @@ The high-level overview of Docusaurus configuration can be categorized into: - [Site Metadata](#site-metadata) - [Deployment Configurations](#deployment-configurations) -- [Themes, Plugins, and Presets configurations](#themes-plugins-and-presets-configurations) +- [Theme, Plugin, and Preset Configurations](#theme-plugin-and-preset-configurations) - [Custom Configurations](#custom-configurations) For exact reference to each of the configurable fields, you may refer to [**docusaurus.config.js API reference**](docusaurus.config.js.md). @@ -34,22 +34,76 @@ Deployment configurations such as `projectName` and `organizationName` are used It is recommended to check the [deployment docs](deployment.md) for more information. -### Themes, Plugins, and Presets configurations +### Theme, plugin, and preset configurations -_This section is a work in progress. [Welcoming PRs](https://github.com/facebook/docusaurus/issues/1640)._ +List the installed [themes](using-themes.md), [plugins](using-plugins.md), and [presets](presets.md) for your site in the `themes`, `plugins`, and `presets` fields, respectively. These are typically npm packages: - +For further help configuring themes, plugins, and presets, see [Using Themes](using-themes.md), [Using Plugins](using-plugins.md), and [Using Presets](presets.md). ### Custom configurations From 79f04b6e8a73c84153975de371aeb3eea9ac7728 Mon Sep 17 00:00:00 2001 From: kadair Date: Fri, 1 Nov 2019 15:40:00 -0400 Subject: [PATCH 2/3] change tabs to spaces --- website/docs/configuration.md | 37 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/website/docs/configuration.md b/website/docs/configuration.md index e517f2df3531..e401e5047326 100644 --- a/website/docs/configuration.md +++ b/website/docs/configuration.md @@ -41,9 +41,9 @@ List the installed [themes](using-themes.md), [plugins](using-plugins.md), and [ ```js // docusaurus.config.js module.exports = { - // ... - plugins: ['@docusaurus/plugin-content-blog', '@docusaurus/plugin-content-pages'], - themes: ['@docusaurus/themes-bootstrap'], + // ... + plugins: ['@docusaurus/plugin-content-blog', '@docusaurus/plugin-content-pages'], + themes: ['@docusaurus/themes-bootstrap'], }; ``` @@ -54,10 +54,9 @@ They can also be loaded from local directories: const path = require('path'); module.exports = { - // ... - themes: [path.resolve(__dirname, '/path/to/docusaurus-local-theme')], + // ... + themes: [path.resolve(__dirname, '/path/to/docusaurus-local-theme')], }; - ``` To specify options for a plugin or theme, replace the name of the plugin or theme in the config file with an array containing the name and an options object: @@ -65,19 +64,19 @@ To specify options for a plugin or theme, replace the name of the plugin or them ```js // docusaurus.config.js module.exports = { - // ... - plugins: [ - [ - '@docusaurus/plugin-content-blog', - { - path: 'blog', - routeBasePath: 'blog', - include: ['*.md', '*.mdx'], - // ... - }, - ], - '@docusaurus/plugin-content-pages', - ], + // ... + plugins: [ + [ + '@docusaurus/plugin-content-blog', + { + path: 'blog', + routeBasePath: 'blog', + include: ['*.md', '*.mdx'], + // ... + }, + ], + '@docusaurus/plugin-content-pages', + ], }; ``` From f61af685195c84ba8260922e3c0c2055f3b9599e Mon Sep 17 00:00:00 2001 From: kadair Date: Sat, 2 Nov 2019 14:12:51 -0400 Subject: [PATCH 3/3] change theme example --- website/docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/configuration.md b/website/docs/configuration.md index e401e5047326..d995412538e6 100644 --- a/website/docs/configuration.md +++ b/website/docs/configuration.md @@ -43,7 +43,7 @@ List the installed [themes](using-themes.md), [plugins](using-plugins.md), and [ module.exports = { // ... plugins: ['@docusaurus/plugin-content-blog', '@docusaurus/plugin-content-pages'], - themes: ['@docusaurus/themes-bootstrap'], + themes: ['@docusaurus/theme-classic'], }; ```