docs: remove useless front matter (#7518)

This commit is contained in:
Joshua Chen 2022-05-28 19:07:45 +08:00 committed by GitHub
parent 432a8bd3e9
commit ab566ecce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 143 additions and 118 deletions

View file

@ -1,6 +1,5 @@
---
sidebar_position: 0
id: docusaurus.config.js
description: API reference for Docusaurus configuration file.
slug: /api/docusaurus-config
---

View file

@ -1,9 +1,10 @@
---
sidebar_position: 0
title: '📦 create-docusaurus'
slug: '/api/misc/create-docusaurus'
slug: /api/misc/create-docusaurus
---
# 📦 create-docusaurus
A scaffolding utility to help you instantly set up a functional Docusaurus app.
## Usage {#usage}

View file

@ -1,10 +1,10 @@
---
sidebar_position: 1
id: eslint-plugin
title: '📦 eslint-plugin'
slug: '/api/misc/@docusaurus/eslint-plugin'
slug: /api/misc/@docusaurus/eslint-plugin
---
# 📦 eslint-plugin
[ESLint](https://eslint.org/) is a tool that statically analyzes your code and reports problems or suggests best practices through editor hints and command line. Docusaurus provides an ESLint plugin to enforce best Docusaurus practices.
## Installation

View file

@ -1,9 +1,11 @@
---
slug: '/api/misc/@docusaurus/eslint-plugin/no-untranslated-text'
slug: /api/misc/@docusaurus/eslint-plugin/no-untranslated-text
---
# no-untranslated-text
import APITable from '@site/src/components/APITable';
Enforce text labels in JSX to be wrapped by translate calls.
When the [i18n feature](../../../i18n/i18n-introduction.md) is used, this rule ensures that all labels appearing on the website are translatable, so no string accidentally slips through untranslated.

View file

@ -1,5 +1,5 @@
---
slug: '/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages'
slug: /api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages
---
# string-literal-i18n-messages

View file

@ -1,9 +1,10 @@
---
sidebar_position: 2
title: '📦 logger'
slug: '/api/misc/@docusaurus/logger'
slug: /api/misc/@docusaurus/logger
---
# 📦 logger
An encapsulated logger for semantically formatting console messages.
Authors of packages in the Docusaurus ecosystem are encouraged to use this package to provide unified log formats.

View file

@ -1,11 +1,12 @@
---
sidebar_position: 0
id: plugins-overview
title: 'Docusaurus plugins'
sidebar_label: Plugins overview
slug: '/api/plugins'
slug: /api/plugins
---
# Docusaurus plugins
We provide official Docusaurus plugins.
## Content plugins {#content-plugins}

View file

@ -1,10 +1,10 @@
---
sidebar_position: 4
id: plugin-client-redirects
title: '📦 plugin-client-redirects'
slug: '/api/plugins/@docusaurus/plugin-client-redirects'
slug: /api/plugins/@docusaurus/plugin-client-redirects
---
# 📦 plugin-client-redirects
import APITable from '@site/src/components/APITable';
Docusaurus Plugin to generate **client-side redirects**.

View file

@ -1,10 +1,10 @@
---
sidebar_position: 2
id: plugin-content-blog
title: '📦 plugin-content-blog'
slug: '/api/plugins/@docusaurus/plugin-content-blog'
slug: /api/plugins/@docusaurus/plugin-content-blog
---
# 📦 plugin-content-blog
import APITable from '@site/src/components/APITable';
Provides the [Blog](blog.mdx) feature and is the default blog plugin for Docusaurus.

View file

@ -1,10 +1,10 @@
---
sidebar_position: 1
id: plugin-content-docs
title: '📦 plugin-content-docs'
slug: '/api/plugins/@docusaurus/plugin-content-docs'
slug: /api/plugins/@docusaurus/plugin-content-docs
---
# 📦 plugin-content-docs
import APITable from '@site/src/components/APITable';
Provides the [Docs](../../guides/docs/docs-introduction.md) functionality and is the default docs plugin for Docusaurus.

View file

@ -1,10 +1,10 @@
---
sidebar_position: 3
id: plugin-content-pages
title: '📦 plugin-content-pages'
slug: '/api/plugins/@docusaurus/plugin-content-pages'
slug: /api/plugins/@docusaurus/plugin-content-pages
---
# 📦 plugin-content-pages
import APITable from '@site/src/components/APITable';
The default pages plugin for Docusaurus. The classic template ships with this plugin with default configurations. This plugin provides [creating pages](guides/creating-pages.md) functionality.

View file

@ -1,10 +1,10 @@
---
sidebar_position: 5
id: plugin-debug
title: '📦 plugin-debug'
slug: '/api/plugins/@docusaurus/plugin-debug'
slug: /api/plugins/@docusaurus/plugin-debug
---
# 📦 plugin-debug
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View file

@ -1,10 +1,10 @@
---
sidebar_position: 6
id: plugin-google-analytics
title: '📦 plugin-google-analytics'
slug: '/api/plugins/@docusaurus/plugin-google-analytics'
slug: /api/plugins/@docusaurus/plugin-google-analytics
---
# 📦 plugin-google-analytics
import APITable from '@site/src/components/APITable';
The default [Google Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) plugin. It is a JavaScript library for measuring how users interact with your website **in the production build**. If you are using Google Analytics 4 you might need to consider using [plugin-google-gtag](./plugin-google-gtag.md) instead.

View file

@ -1,10 +1,10 @@
---
sidebar_position: 7
id: plugin-google-gtag
title: '📦 plugin-google-gtag'
slug: '/api/plugins/@docusaurus/plugin-google-gtag'
slug: /api/plugins/@docusaurus/plugin-google-gtag
---
# 📦 plugin-google-gtag
import APITable from '@site/src/components/APITable';
The default [Global Site Tag (gtag.js)](https://developers.google.com/analytics/devguides/collection/gtagjs/) plugin. It is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform. This section describes how to configure a Docusaurus site to enable global site tag for Google Analytics.

View file

@ -1,10 +1,10 @@
---
sidebar_position: 8
id: plugin-ideal-image
title: '📦 plugin-ideal-image'
slug: '/api/plugins/@docusaurus/plugin-ideal-image'
slug: /api/plugins/@docusaurus/plugin-ideal-image
---
# 📦 plugin-ideal-image
import APITable from '@site/src/components/APITable';
Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder).

View file

@ -1,10 +1,10 @@
---
sidebar_position: 9
id: plugin-pwa
title: '📦 plugin-pwa'
slug: '/api/plugins/@docusaurus/plugin-pwa'
slug: /api/plugins/@docusaurus/plugin-pwa
---
# 📦 plugin-pwa
Docusaurus Plugin to add PWA support using [Workbox](https://developers.google.com/web/tools/workbox). This plugin generates a [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers) in production build only, and allows you to create fully PWA-compliant documentation site with offline and installation support.
## Installation {#installation}

View file

@ -1,10 +1,10 @@
---
sidebar_position: 10
id: plugin-sitemap
title: '📦 plugin-sitemap'
slug: '/api/plugins/@docusaurus/plugin-sitemap'
slug: /api/plugins/@docusaurus/plugin-sitemap
---
# 📦 plugin-sitemap
import APITable from '@site/src/components/APITable';
This plugin creates sitemaps for your site so that search engine crawlers can crawl your site more accurately.

View file

@ -1,11 +1,12 @@
---
sidebar_position: 0
id: themes-overview
title: 'Docusaurus themes'
sidebar_label: Themes overview
slug: '/api/themes'
slug: /api/themes
---
# Docusaurus themes
We provide official Docusaurus themes.
## Main themes {#main-themes}

View file

@ -1,10 +1,10 @@
---
sidebar_position: 2
id: theme-classic
title: '📦 theme-classic'
slug: '/api/themes/@docusaurus/theme-classic'
slug: /api/themes/@docusaurus/theme-classic
---
# 📦 theme-classic
The classic theme for Docusaurus.
You can refer to the [theme configuration page](theme-configuration.md) for more details on the configuration.

View file

@ -1,12 +1,12 @@
---
sidebar_position: 1
id: theme-configuration
title: 'Theme configuration'
sidebar_label: 'Configuration'
slug: '/api/themes/configuration'
sidebar_label: Configuration
slug: /api/themes/configuration
toc_max_heading_level: 4
---
# Theme configuration
import APITable from '@site/src/components/APITable';
This configuration applies to all [main themes](./overview.md).

View file

@ -1,10 +1,10 @@
---
sidebar_position: 3
id: theme-live-codeblock
title: '📦 theme-live-codeblock'
slug: '/api/themes/@docusaurus/theme-live-codeblock'
slug: /api/themes/@docusaurus/theme-live-codeblock
---
# 📦 theme-live-codeblock
This theme provides a `@theme/CodeBlock` component that is powered by react-live. You can read more on [interactive code editor](../../guides/markdown-features/markdown-features-code-blocks.mdx#interactive-code-editor) documentation.
```bash npm2yarn

View file

@ -1,10 +1,10 @@
---
sidebar_position: 4
id: theme-search-algolia
title: '📦 theme-search-algolia'
slug: '/api/themes/@docusaurus/theme-search-algolia'
slug: /api/themes/@docusaurus/theme-search-algolia
---
# 📦 theme-search-algolia
This theme provides a `@theme/SearchBar` component that integrates with Algolia DocSearch easily. Combined with `@docusaurus/theme-classic`, it provides a very easy search integration. You can read more on [search](../../search.md) documentation.
```bash npm2yarn

View file

@ -1,12 +1,13 @@
---
id: blog
title: Blog
description: Deploy a full-featured blog in no time with Docusaurus.
---
# Blog
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
The blog feature enables you to deploy in no time a full-featured blog.
The blog feature enables you to deploy a full-featured blog in no time.
:::info

View file

@ -1,8 +1,9 @@
---
id: browser-support
title: Browser support
description: How to keep a reasonable bundle size while ensuring sufficient browser support.
---
# Browser support
Docusaurus allows sites to define the list of supported browsers through a [browserslist configuration](https://github.com/browserslist/browserslist).
## Purpose {#purpose}

View file

@ -1,5 +1,5 @@
---
id: cli
description: Docusaurus provides a set of scripts to help you generate, serve, and deploy your website.
---
# CLI

View file

@ -1,8 +1,9 @@
---
id: configuration
title: Configuration
description: Configuring your site's behavior through docusaurus.config.js and more.
---
# Configuration
import TOCInline from '@theme/TOCInline';
Docusaurus has a unique take on configurations. We encourage you to congregate information about your site into one place. We guard the fields of this file and facilitate making this data object accessible across your site.

View file

@ -1,8 +1,9 @@
---
id: deployment
title: Deployment
description: Deploy your Docusaurus app for production on a range of static site hosting services.
---
# Deployment
To build the static files of your website for production, run:
```bash npm2yarn

View file

@ -1,9 +1,9 @@
---
id: docusaurus-core
title: Docusaurus Client API
sidebar_label: Client API
---
# Docusaurus Client API
Docusaurus provides some APIs on the clients that can be helpful to you when building your site.
## Components {#components}

View file

@ -1,10 +1,10 @@
---
id: creating-pages
title: Creating Pages
slug: /creating-pages
sidebar_label: Pages
---
# Creating Pages
In this section, we will learn about creating pages in Docusaurus.
The `@docusaurus/plugin-content-pages` plugin empowers you to create **one-off standalone pages** like a showcase page, playground page, or support page. You can use React components, or Markdown.

View file

@ -1,10 +1,11 @@
---
id: create-doc
title: Create a doc
description: Create a Markdown Document
slug: /create-doc
---
# Create a doc
Create a Markdown file, `greeting.md`, and place it under the `docs` directory.
```bash

View file

@ -1,10 +1,11 @@
---
id: introduction
title: Docs Introduction
sidebar_label: Introduction
slug: /docs-introduction
---
# Docs Introduction
The docs feature provides users with a way to organize Markdown files in a hierarchical format.
:::info

View file

@ -1,10 +1,11 @@
---
id: multi-instance
title: Docs Multi-instance
description: Use multiple docs plugin instances on a single Docusaurus site.
slug: /docs-multi-instance
---
# Docs Multi-instance
The `@docusaurus/plugin-content-docs` plugin can support [multi-instance](../../using-plugins.md#multi-instance-plugins-and-plugin-ids).
:::note

View file

@ -1,16 +1,16 @@
---
id: versioning
title: Versioning
slug: /versioning
---
# Versioning
You can use the versioning CLI to create a new documentation version based on the latest content in the `docs` directory. That specific set of documentation will then be preserved and accessible even as the documentation in the `docs` directory continues to evolve.
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
You can use the version script to create a new documentation version based on the latest content in the `docs` directory. That specific set of documentation will then be preserved and accessible even as the documentation in the `docs` directory changes moving forward.
:::caution
Think about it before starting to version your documentation - it can become difficult for contributors to help improve it!

View file

@ -1,10 +1,11 @@
---
id: admonitions
title: Admonitions
description: Handling admonitions/callouts in Docusaurus Markdown
slug: /markdown-features/admonitions
---
# Admonitions
import BrowserWindow from '@site/src/components/BrowserWindow';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View file

@ -1,10 +1,11 @@
---
id: assets
title: Assets
description: Handling assets in Docusaurus Markdown
slug: /markdown-features/assets
---
# Assets
import BrowserWindow from '@site/src/components/BrowserWindow';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View file

@ -1,10 +1,11 @@
---
id: code-blocks
title: Code blocks
description: Handling code blocks in Docusaurus Markdown
slug: /markdown-features/code-blocks
---
# Code blocks
import BrowserWindow from '@site/src/components/BrowserWindow';
import CodeBlock from '@theme/CodeBlock';

View file

@ -1,6 +1,5 @@
---
id: head-metadata
title: Head Metadata
description: Declaring page-specific head metadata through MDX
slug: /markdown-features/head-metadata
---

View file

@ -1,11 +1,11 @@
---
id: introduction
title: Markdown Features
sidebar_label: Introduction
description: Docusaurus uses MDX. Find out more about Docusaurus-specific features when writing Markdown.
slug: /markdown-features
---
# Markdown Features
import BrowserWindow from '@site/src/components/BrowserWindow';
Documentation is one of your product's interfaces with your users. A well-written and well-organized set of docs helps your users understand your product quickly. Our aligned goal here is to help your users find and understand the information they need, as quickly as possible.

View file

@ -1,10 +1,11 @@
---
id: math-equations
title: Math Equations
description: Writing LaTeX Math Equations
slug: /markdown-features/math-equations
---
# Math Equations
import BrowserWindow from '@site/src/components/BrowserWindow';
Mathematical equations can be rendered using [KaTeX](https://katex.org).

View file

@ -1,10 +1,11 @@
---
id: plugins
title: MDX Plugins
description: Using MDX plugins to expand Docusaurus Markdown functionalities
slug: /markdown-features/plugins
---
# MDX Plugins
Sometimes, you may want to extend or tweak your Markdown syntax. For example:
- How do I embed youtube videos using the image syntax (`![](https://youtu.be/yKNxeF4KMsY)`)?

View file

@ -1,6 +1,5 @@
---
id: react
title: MDX and React
description: Using the power of React in Docusaurus Markdown documents, thanks to MDX
slug: /markdown-features/react
---

View file

@ -1,10 +1,11 @@
---
id: tabs
title: Tabs
description: Using tabs inside Docusaurus Markdown
slug: /markdown-features/tabs
---
# Tabs
```mdx-code-block
import BrowserWindow from '@site/src/components/BrowserWindow';
import Tabs from '@theme/Tabs';

View file

@ -1,10 +1,11 @@
---
id: crowdin
title: i18n - Using Crowdin
slug: /i18n/crowdin
toc_max_heading_level: 4
---
# i18n - Using Crowdin
The i18n system of Docusaurus is **decoupled from any translation software**.
You can integrate Docusaurus with the **tools and SaaS of your choice**, as long as you put the **translation files at the correct location**.

View file

@ -1,9 +1,10 @@
---
id: git
title: i18n - Using git
slug: /i18n/git
---
# i18n - Using git
A **possible translation strategy** is to **version control the translation files** with Git (or any other [VCS](https://en.wikipedia.org/wiki/Version_control)).
## Tradeoffs {#tradeoffs}

View file

@ -1,9 +1,10 @@
---
id: introduction
title: i18n - Introduction
slug: /i18n/introduction
---
# i18n - Introduction
It is **easy to translate a Docusaurus website** with its internationalization ([i18n](https://en.wikipedia.org/wiki/Internationalization_and_localization)) support.
## Goals {#goals}

View file

@ -1,9 +1,11 @@
---
id: tutorial
title: i18n - Tutorial
description: This tutorial will walk you through the basics of the Docusaurus i18n system.
slug: /i18n/tutorial
---
# i18n - Tutorial
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View file

@ -1,8 +1,9 @@
---
id: installation
title: Installation
description: How to install Docusaurus locally, and start a Docusaurus site in no time.
---
# Installation
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View file

@ -1,10 +1,10 @@
---
id: introduction
title: Introduction
description: Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly.
slug: /
---
# Introduction
⚡️ Docusaurus will help you ship a **beautiful documentation site in no time**.
💸 Building a custom tech stack is expensive. Instead, **focus on your content** and just write Markdown files.

View file

@ -1,9 +1,9 @@
---
id: migration-automated
title: Automated migration
slug: /migration/automated
---
# Automated migration
The migration CLI automatically migrates your v1 website to a v2 website.
:::info

View file

@ -1,10 +1,10 @@
---
id: migration-manual
title: Manual migration
slug: /migration/manual
toc_max_heading_level: 4
---
# Manual migration
This manual migration process should be run after the [automated migration process](./migration-automated.md), to complete the missing parts, or debug issues in the migration CLI output.
## Project setup {#project-setup}

View file

@ -1,9 +1,9 @@
---
id: migration-overview
title: Migration overview
slug: /migration
---
# Migration overview
This doc guides you through migrating an existing Docusaurus 1 site to Docusaurus 2.
We try to make this as easy as possible, and provide a migration cli.

View file

@ -1,9 +1,9 @@
---
id: migration-translated-sites
title: Translated sites
slug: /migration/translated-sites
---
# Translated sites
This page explains how migrate a translated Docusaurus v1 site to Docusaurus v2.
## i18n differences {#i18n-differences}

View file

@ -1,9 +1,9 @@
---
id: migration-versioned-sites
title: Versioned sites
slug: /migration/versioned-sites
---
# Versioned sites
Read up https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2#versioning first for problems in v1's approach.
:::note

View file

@ -1,11 +1,11 @@
---
id: search
title: Search
keywords:
- algolia
- search
---
# Search
There are a few options you can use to add search to your website:
- 🥇 [Algolia DocSearch](#using-algolia-docsearch) (**official**)

View file

@ -1,12 +1,13 @@
---
id: seo
title: Search engine optimization (SEO)
description: How to make your Docusaurus site maximally search-engine-friendly.
sidebar_label: SEO
keywords:
- seo
- positioning
---
# Search engine optimization (SEO)
import BrowserWindow from '@site/src/components/BrowserWindow';
Docusaurus supports search engine optimization in a variety of ways.

View file

@ -1,11 +1,12 @@
---
id: static-assets
title: Static Assets
description: Static assets are the non-code files that are directly copied to the build output. Learn about how they are handled and what the best practices of using static assets are.
---
Every website needs assets: images, stylesheets, favicons, etc. By default, you are suggested to put these assets in the `static` folder.
# Static Assets
Every file you put into **that directory will be copied** into the root of the generated `build` folder with the directory hierarchy preserved. E.g. if you add a file named `sun.jpg` to the static folder, it will be copied to `build/sun.jpg`.
Static assets are the non-code files that are directly copied to the build output. They include images, stylesheets, favicons, fonts, etc.
By default, you are suggested to put these assets in the `static` folder. Every file you put into **that directory will be copied** into the root of the generated `build` folder with the directory hierarchy preserved. E.g. if you add a file named `sun.jpg` to the static folder, it will be copied to `build/sun.jpg`.
This means that:

View file

@ -1,11 +1,11 @@
---
id: styling-layout
title: Styling and Layout
description: A Docusaurus site is a pre-rendered single-page React application. You can style it the way you style React apps.
---
import ColorGenerator from '@site/src/components/ColorGenerator';
# Styling and Layout
:::tip
This section is focused on styling through stylesheets. For more advanced customizations (DOM structure, React code...), refer to the [swizzling guide](./swizzling.md).

View file

@ -1,8 +1,9 @@
---
id: typescript-support
title: TypeScript Support
description: Docusaurus is written in TypeScript and provides first-class TypeScript support.
---
# TypeScript Support
Docusaurus is written in TypeScript and provides first-class TypeScript support.
## Initialization {#initialization}