misc: add command to run prettier on docs (#2102)

* misc: add command to run prettier on docs

* Fix GH issue template

* Fix tests

* Add prettier-docs command to precommit
This commit is contained in:
Yangshun Tay 2019-12-07 21:56:30 -08:00 committed by GitHub
parent cfc313d7c7
commit 55e676cb25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
141 changed files with 1181 additions and 968 deletions

View file

@ -25,6 +25,7 @@ id: doc1
title: My Document
sidebar_label: Document
---
```
Versioned documents have their ids altered to include the version number when they get copied. The new `id` is `version-${version}-${id}` where `${version}` is the version number of that document and `${id}` is the original `id`. Additionally, versioned documents get an added `original_id` field with the original document id.
@ -38,6 +39,7 @@ title: My Document
sidebar_label: Document
original_id: doc1
---
```
`custom_edit_url`: The URL for editing this document. If this field is not present, the document's edit URL will fall back to `editUrl` from optional fields of `siteConfig.js`. See [siteConfig.js](api-site-config.md) docs for more information.
@ -50,6 +52,7 @@ id: doc-markdown
title: Markdown Features
custom_edit_url: https://github.com/facebook/docusaurus/edit/master/docs/api-doc-markdown.md
---
```
### Blog Posts
@ -73,6 +76,7 @@ author: Frank Li
authorURL: http://twitter.com/franchementli
authorFBID: 100002976521003
---
```
## Extra Features
@ -130,7 +134,6 @@ will lead to a table of contents of the functions:
and each function will link to their corresponding sections in the page.
### Language-specific Code Tabs
Display code in multiple programming languages using code tabs. First, mark the start and end of a code tabs group, by using `<!-- DOCUSAURUS_CODE_TABS -->` and `<!-- END_DOCUSAURUS_CODE_TABS -->` respectively in your markdown. Then start each tab with `<!--[TAB_TITLE]-->`.
@ -144,26 +147,30 @@ produces this:
<!--DOCUSAURUS_CODE_TABS-->
<!--JavaScript-->
```js
console.log('Hello, world!');
```
<!--Python-->
```py
print('Hello, world!')
```
<!--C-->
```C
#include <stdio.h>
int main() {
printf("Hello World!");
return 0;
printf("Hello World!");
return 0;
}
```
<!--Pascal-->
```Pascal
program HelloWorld;
begin