chore: remove unused Bootstrap theme (#5634)

* remove package

* remove bootstrap from doc

* remove bootstrap init template + examples

* remove bootstrap preset

* remaining bootstrap refs

* update lockfile
This commit is contained in:
Sébastien Lorber 2021-10-01 16:44:34 +01:00 committed by GitHub
parent a96878048d
commit a0c2c52829
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 15 additions and 12166 deletions

View file

@ -12,7 +12,7 @@ We provide official Docusaurus themes.
The main themes implement the user interface for the [docs](../plugins/plugin-content-docs.md), [blog](../plugins/plugin-content-blog.md) and [pages](../plugins/plugin-content-pages.md) plugins.
- [@docusaurus/theme-classic](./theme-classic.md)
- [@docusaurus/theme-bootstrap](./theme-bootstrap.md) 🚧
- 🚧 other themes are planned
:::caution

View file

@ -1,25 +0,0 @@
---
id: theme-bootstrap
title: '📦 theme-bootstrap'
slug: '/api/themes/@docusaurus/theme-bootstrap'
---
:::danger
The bootstrap theme is a work in progress, and is not production ready.
:::
🚧 The bootstrap theme for Docusaurus.
You can refer to the [theme configuration page](theme-configuration.md) for more details on the configuration.
```bash npm2yarn
npm install --save @docusaurus/theme-bootstrap
```
:::tip
If you have installed `@docusaurus/preset-bootstrap`, you don't need to install it as a dependency.
:::

View file

@ -119,7 +119,7 @@ html[data-theme='dark'] .themedDocusaurus [fill='#FFFF50'] {
## Themed Images {#themed-images}
Docusaurus supports themed images: the `ThemedImage` component (included in the classic/bootstrap themes) allows you to switch the image source based on the current theme.
Docusaurus supports themed images: the `ThemedImage` component (included in the themes) allows you to switch the image source based on the current theme.
```jsx {5-8}
import ThemedImage from '@theme/ThemedImage';

View file

@ -40,12 +40,6 @@ If you do not specify `name` or `template`, it will prompt you for them. We reco
npx @docusaurus/init@latest init my-website facebook
```
**[Experimental]:** If you want setting up a new website using [bootstrap](https://getbootstrap.com/), use the `bootstrap` template, like the following:
```bash
npx @docusaurus/init@latest init my-website bootstrap
```
If you want to skip installing dependencies, use the `--skip-install` option, like the following:
```bash

View file

@ -35,16 +35,13 @@ module.exports = {
## Presets -> themes and plugins {#presets---themes-and-plugins}
Presets in some way are a shorthand function to add plugins and themes to your Docusaurus config. For example, you can specify a preset that includes the following themes and plugins,
Presets are a shorthand function to add plugins and themes to your Docusaurus config. For example, you can specify a preset that includes the following themes and plugins,
```js
module.exports = function preset(context, opts = {}) {
return {
themes: [
require.resolve('@docusaurus/themes-cool'),
require.resolve('@docusaurus/themes-bootstrap'),
],
plugins: [require.resolve('@docusaurus/plugin-blog')],
themes: ['@docusaurus/theme-cool', opts.cool],
plugins: ['@docusaurus/plugin-blog', opts.blog],
};
};
```
@ -53,8 +50,10 @@ then in your Docusaurus config, you may configure the preset instead:
```jsx {3} title="docusaurus.config.js"
module.exports = {
// ...
presets: ['@docusaurus/preset-my-own'],
presets: [
'@docusaurus/preset-my-own',
{cool: {hello: 'world'}, blog: {path: '/blog'}},
],
};
```
@ -62,8 +61,8 @@ This is equivalent of doing:
```jsx title="docusaurus.config.js"
module.exports = {
themes: ['@docusaurus/themes-cool', '@docusaurus/themes-bootstrap'],
plugins: ['@docusaurus/plugin-blog'],
themes: ['@docusaurus/themes-cool', {hello: 'world'}],
plugins: ['@docusaurus/plugin-blog', {path: '/blog'}],
};
```
@ -132,51 +131,3 @@ module.exports = {
],
};
```
### `@docusaurus/preset-bootstrap` {#docusauruspreset-bootstrap}
An alternative preset that uses Bootstrap styling.
| Themes | Plugins |
| ----------------------------- | ---------------------------------- |
| `@docusaurus/theme-bootstrap` | `@docusaurus/plugin-content-docs` |
| | `@docusaurus/plugin-content-blog` |
| | `@docusaurus/plugin-content-pages` |
| | `@docusaurus/plugin-debug` |
To specify plugin options individually, you can provide the necessary fields to certain plugins, i.e. `docs` for `@docusaurus/theme-bootstrap`, pass them in the preset field, like this:
```js title="docusaurus.config.js"
module.exports = {
presets: [
[
'@docusaurus/preset-bootstrap',
{
// Debug defaults to true in dev, false in prod
debug: undefined,
// Will be passed to @docusaurus/plugin-content-docs (false to disable)
docs: {},
// Will be passed to @docusaurus/plugin-content-blog (false to disable)
blog: {},
},
],
],
};
```
:::caution
This preset is work in progress
:::
<!--
Advanced guide on using and configuring presets
References
---
- [classic themes](/packages/docusaurus-preset-classic/src/index.js)
- [babel docs on presets](https://babeljs.io/docs/en/presets)
-->

View file

@ -51,7 +51,7 @@ website
`website/src/theme/Navbar.js` takes precedence whenever `@theme/Navbar` is imported. This behavior is called component swizzling. In iOS, method swizzling is the process of changing the implementation of an existing selector (method). In the context of a website, component swizzling means providing an alternative component that takes precedence over the component provided by the theme.
**Themes are for providing UI components to present the content.** Most content plugins need to be paired with a theme in order to be actually useful. The UI is a separate layer from the data schema, so it makes it easy to swap out the themes for other designs (i.e., Bootstrap).
**Themes are for providing UI components to present the content.** Most content plugins need to be paired with a theme in order to be actually useful. The UI is a separate layer from the data schema, so it makes it easy to swap out the themes for other designs.
For example, a Docusaurus blog consists of a blog plugin and a blog theme.