Commit graph

833 commits

Author SHA1 Message Date
Joshua Chen
ae788c536f
feat(core): rework client modules lifecycles, officially make API public (#6732) 2022-04-29 15:11:20 +02:00
Joshua Chen
0102c2e2ae
docs: wrap code block demos in mdx-code-block (#7262) 2022-04-29 17:09:54 +08:00
Joshua Chen
d2562a4434
refactor: normalize Markdown linkification behavior, elaborate in documentation (#7248)
* refactor: normalize Markdown linkification behavior, elaborate in documentation

* fix broken links

* allow links to be relative to site root

* fix test

* minor doc update

* Update website/docs/guides/markdown-features/markdown-features-links.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-04-29 11:36:39 +08:00
John Reilly
b747143982
docs: update gtag docs to reflect what a GA4 tag looks like (#7252) 2022-04-28 09:05:25 +08:00
Joshua Chen
67faa686e8
refactor: semantic markup improvement, fix validation warnings (#7244)
* refactor: semantic markup improvement, fix validation warnings

* change section/article a bit
2022-04-26 20:15:45 +08:00
Joshua Chen
743738d8c6
docs: add documentation about pluralization (#7236) 2022-04-24 11:23:28 +08:00
Alexey Pyltsyn
9af35c5b47
refactor: customize code block line highlight color via CSS var (#7176) 2022-04-21 11:19:33 +02:00
Alexey Pyltsyn
84d04ed6ed
feat(theme-classic): new 'html' type navbar item (#7058)
* feat(theme-classic): allow using html in dropdown items

* Fix tests

* Introduce HTML type for navbar item

* Update packages/docusaurus-theme-classic/src/theme/NavbarItem/HtmlNavbarItem.tsx

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-15 18:58:15 +08:00
Jody Heavener
5fb0a2e274
feat(content-docs): draft docs excluded from build & sidebars (#6457)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-13 18:02:05 +02:00
Alexey Pyltsyn
ee4c984bc7
feat(theme-classic): code block showLineNumbers (#7007) 2022-04-13 14:42:35 +02:00
Andrew Lyons
ec109737e9
docs: explain more clearly the purpose of a ref sidebar type (#7159) 2022-04-12 15:59:41 +08:00
Alexey Pyltsyn
d5cfa5b7cf
refactor(theme-classic): fix a few margin inconsistencies (#7129)
* refactor(theme-classic): minor fixes and improvements

* Fixes after review

* Reset spacing for all children inside browser window
2022-04-09 08:27:22 +08:00
Joshua Chen
7941a46be3
feat: allow setting calendar for i18n date formatting (#6430)
* feat: allow setting calendar for i18n date formatting

* fix TS

* add test
2022-04-08 22:34:34 +08:00
Joshua Chen
171927342f
feat(core): fail-safe global data fetching (#7083) 2022-04-08 11:08:22 +02:00
Alexey Pyltsyn
bfbc78e52a
feat: allow using pure HTML as label in navbar links (#7079)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-04-07 12:33:52 +02:00
Joshua Chen
3cdd038d28
docs: multiple documentation improvements (#7126) 2022-04-07 16:27:28 +08:00
Alexey Pyltsyn
c669c103f9
refactor(website): minor fixes and improvements (#7119)
* refactor(website): minor fixes and improvements

* Some fixes

* Round all the corners in browser window

* Add rounded bottom corners to browser window
2022-04-07 08:33:52 +08:00
mehdim
49424f5057
docs: correct plugin example filename (#7026)
* Correect Wrong file name

The file name inside the my-plugin folder is index.js .

* Update plugins.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-07 08:17:06 +08:00
ApsarasX
103ea04661
feat(sitemap): add ignorePatterns option (#6979)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-06 15:44:07 +02:00
Joshua Chen
4194925da9
docs: add a note about additional languages needing to be Prism component names (#7110) 2022-04-04 10:02:16 +08:00
Joshua Chen
ff96606865
docs: fix some casing inconsistencies (#7081) 2022-03-31 20:23:44 +08:00
Joshua Chen
24c205a835
refactor: replace non-prop interface with type; allow plugin lifecycles to have sync type (#7080)
* refactor: replace non-prop interface with type; allow plugin lifecycles to have sync type

* fix
2022-03-31 19:16:07 +08:00
Joshua Chen
77662260f8
refactor(core): refactor routes generation logic (#7054)
* refactor(core): refactor routes generation logic

* fixes
2022-03-29 16:37:29 +08:00
Kayce Basques
e31e91ef47
docs: add import React statement in JSX file example (#7050) 2022-03-29 09:30:35 +08:00
Joshua Chen
5fb09a2946
refactor(core): reorganize files (#7042)
* refactor(core): reorganize files

* fix types
2022-03-28 21:49:37 +08:00
Joshua Chen
2bcac29cd4
refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027)
* refactor(content-docs): deduplicate types, JSDoc for some APIs

* little refactor
2022-03-27 12:57:15 +08:00
Leedom
b842197ac6
docs: consistently use sidebars.js filename (#7016)
* modify sidebar.js to sidebars.js in installation.md

* modify sidebar.js to sidebars.js

Co-authored-by: leedom <leedom@jinlanzuan.com>
2022-03-27 09:55:12 +08:00
Indermohan Singh
2dea99b5c8
docs: remove unnecessary semicolon (#7000)
* docs: remove unnecessary semicolon

The semicolon after the TOCInline component is unnecessary and actually gets rendered on screen.

* ignore prettier

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-25 23:59:13 +08:00
Joshua Chen
b5ceead3b2
feat(content-docs): autogenerate category with linked doc metadata as fallback (#6859) 2022-03-25 15:23:11 +01:00
Joshua Chen
87592bca03
refactor: ensure all types are using index signature instead of Record (#6995)
* refactor: ensure all types are using index signature instead of Record

* kick CI
2022-03-25 18:06:30 +08:00
Kayce Basques
395136a731
docs: fix example admonition syntax (#6988)
* Fix example admonition syntax

There was a space between `::: info` should be `:::info` or else Docusaurus does not render it as an admonition.

* kick CI

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-25 08:54:27 +08:00
Jadon N
19d2a18817
docs: npm run tsc -> npx tsc (#6978)
* Correct npm run tsc to npm run typecheck

According to this page, you should run `npm run tsc` to run `tsc` and do a type check. However, in the package.json file for Docusaurus version 2.0.0-beta.17 the command is actually `npm run typecheck`, which runs `tsc`.

This update only replaces `tsc` with `typecheck` so the npm script will run correctly.

* Recommend npx tsc for type-checking

Based on feedback for the original change to replace `npm run tsc` with `npm run typecheck`, a better solution that was suggested was to use npx to run tsc instead of an npm script. `npx tsc` should work regardless of the template/presets you installed when you installed Docusaurus.
2022-03-24 11:14:09 +08:00
Sébastien Lorber
74f653dd82
refactor(theme-{classic,common}): change how site/page/search metadata is handled (#6925) 2022-03-18 18:53:00 +01:00
Alexey Pyltsyn
ecbe0b26c5
refactor(theme-{classic,common}): refactor ColorModeToggle + useColorMode() hook (#6930)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-03-18 15:28:35 +01:00
Kayce Basques
284649c7c8
docs: clarify the usage of slug (#6926)
* Clarify the usage of slug

As a new user it was unclear whether setting `slug` would change the URL relative to the root directory or relative to the docs directory. The example I added should make that clear without needing to test out the functionality in a Docusaurus instance (which is what I had to do).

* editorial changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-17 07:54:18 +08:00
Joshua Chen
68aaf9201f
feat(core): allow plugin lifecycles to return relative paths (#6921)
* feat(core): resolve plugin lifecycles returning relative paths

* fix typo

* fix tests

* revert

* rename path -> entryPath
2022-03-16 20:47:15 +08:00
Joshua Chen
8d1c1954c1
refactor(content-blog): clean up type definitions; in-code documentation (#6922)
* refactor(content-blog): clean up type definitions; in-code documentation

* add doc
2022-03-16 19:36:57 +08:00
Joshua Chen
ff1b7168ba
chore: upgrade dependencies (#6916) 2022-03-15 13:16:21 +08:00
Joshua Chen
2648ec090e
docs: editorial fixes (#6889) 2022-03-10 13:43:22 +08:00
Begula
63caeb6073
docs(cli): add info about development on github codespaces (#6883)
* docs: add info about development on github codespaces

* docs: move from installation to cli

* docs: fix grammar

* Update cli.md

* add word

* Update cli.md

* Update cli.md

* format

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-10 11:22:21 +08:00
Joshua Chen
2a7120cc02
docs: mention configureWebpack devServer return value (#6881) 2022-03-09 20:23:38 +08:00
tae
2e163a9ec4
feat(content-docs): allow custom props through _category_.json (#6780)
* feat(content-docs): allow custom props through _category_.json

* refactor

* documentation

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-05 18:52:36 +08:00
nate contino
5f1edd5ac8
docs: simplify imported code blocks syntax (#6830)
* refactor: simplify imported code blocks

- Use `language=<lang>` prop instead of "className="language-<lang>" for imported code blocks

I've been using this in my personal projects ([example](https://raw.githubusercontent.com/nathan-contino-mongo/docusaurus-realm/9a2ebb6a43bbbd7b38899fcc86c903dcc1f61283/docs/sdk/kotlin/migrate-from-java-sdk.mdx)) since it is less verbose.
If this interface is somehow less stable than the `className` prop, feel free to close this. But if both will work going forward
we should probably recommend the simpler of the two.

* Update markdown-features-react.mdx
2022-03-04 07:09:16 +08:00
Nayan Patel
1c91d2f20e
docs: fix broken links (#6817)
* Fix a broken showcase GitHub URL

* Seems like this site is no longer Open Source?

* Seems like this site is no longer open source?

* Fix as previous link leaded to a 404

* Replaces the 404 error of previous page.

Not sure if this is the correct link to be placed there.

* Fixes 404 error ;)
2022-03-03 07:02:57 +08:00
Joshua Chen
6cbc58943e
feat: allow blog authors email (#6783) 2022-03-02 16:28:17 +01:00
Joshua Chen
7ec44bb32c
refactor(theme-classic): replace color mode toggle with button; remove switchConfig (#6771)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-03-02 15:57:17 +01:00
David Stotijn
2e3eec2d08
fix: consistently use max-width: 996px in media queries (#6815)
* fix: consistently use `max-width: 996px` in media queries

Follow `docusaurus-theme-classic` and use `996px` as the cutoff
between desktop and mobile screen width.

* revert example changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-02 19:43:44 +08:00
Joshua Chen
a4dc03edee
chore: upgrade dependencies (#6789)
* chore: upgrade dependencies

* upgrade setup-node
2022-03-01 10:40:34 +08:00
Ariful Alam
95ab08285b
docs: make GitHub actions explanation aligned with the code (#6776)
* fix(website): update github actions files

* revert some changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-27 16:27:23 +08:00
Joshua Chen
908ad52025
docs: add basic documentation about client modules (#6772) 2022-02-26 18:25:19 +08:00