Commit graph

2283 commits

Author SHA1 Message Date
Joshua Chen
785fed723f
refactor(theme-classic): move all sidebar-related config under themeConfig.docs.sidebar (#7277) 2022-05-04 12:08:19 +02:00
Joshua Chen
881430078e
refactor(create): update screenshots in quick start tutorial (#7286) 2022-05-04 12:00:12 +02:00
Joshua Chen
7a3894e664
docs: update docs for logger, add API docs to website (#7305)
* docs: update docs for logger, add API docs to website

* fix broken image
2022-05-04 17:59:47 +08:00
Joshua Chen
1a9bdd1a4e
refactor: use export = syntax for utility packages (#7295) 2022-05-03 20:22:22 +08:00
Joshua Chen
a2c993bf9a
fix(*): make TypeScript realize that each plugin package has a default export (#7294) 2022-05-03 18:23:34 +08:00
Joshua Chen
b49ae67521
refactor(types): move non-core, non-public types out of the types package (#7293) 2022-05-03 17:15:48 +08:00
Joshua Chen
c7a5af7c4d
refactor(core): collocate CLI commands and their option types (#7292)
* refactor(core): collocate CLI commands and their option types

* fixes
2022-05-03 15:32:12 +08:00
Joshua Chen
5bed55aeda
refactor(types): JSDoc for docusaurus config fields (#7291) 2022-05-03 13:57:19 +08:00
Joshua Chen
e1b7171bb1
fix(core): allow empty static directories (#7285)
* fix(core): allow empty static directories

* improve comment

* add empty directory
2022-05-02 16:34:30 +08:00
Joshua Chen
53564f33ab
refactor(core): prefetch/preload refactor (#7282) 2022-05-02 12:56:58 +08:00
Joshua Chen
afc72480ab
refactor(eslint-plugin): migrate to TS-ESLint infrastructure (#7276)
* refactor(eslint-plugin): migrate to TS-ESLint infrastructure

* fix lock
2022-04-30 17:57:57 +08:00
Joshua Chen
f063e9add5
chore: upgrade dependencies (#7274)
* chore: upgrade dependencies

* remove nodemon
2022-04-30 14:32:37 +08:00
Joshua Chen
710f898703
refactor(theme-classic): multiple re-arrangements (#7273)
* refactor(theme-classic): enforce collocated JSX and module CSS

* refactor
2022-04-30 12:29:54 +08:00
Sébastien Lorber
2a0f105434
refactor(theme-classic): DocPage theme refactors polish (#7268) 2022-04-29 19:34:40 +02:00
Joshua Chen
41f53718c1
fix(theme-common): allow details to not provide a summary (#7267) 2022-04-29 19:33:28 +02:00
Sébastien Lorber
e053f39cf0
refactor(theme-classic): refactor TOC-related theme components (#7270)
* extract TOCItemTree component

* refactor TOCCollapsible
2022-04-29 19:32:35 +02:00
Sébastien Lorber
3bef88232f
refactor: extract useSkipToContent() (#7269) 2022-04-29 19:16:02 +02:00
Elias Papavasileiou
3b1170eb44
feat: Docusaurus ESLint plugin to enforce best Docusaurus practices (#7206)
* feat: add eslint plugin

* refactor

* add tests

* fixups!

* fix(no-dynamic-i18n-messages): make translate() recognize template literals

* refactor: rename rule no-dynamic-i18n-messages --> string-literal-i18n-messages

* feat: add ignoreStrings option and refactor

* docs: migrate docs to /docs/api/plugins

* docs: fix anchor links in README.md

* fix: add some ignored strings

* docs: update eslint-plugin docs

* fix: update README link

* docs: various updates

- Reorder sidebar entries
- Fix title size
- Use Markdown file paths
- Simplify relative links

* address reviews

* wording polish

* add npmignore

* fix all internal warnings

* doc improvements

* fix test

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-30 00:04:25 +08:00
Joshua Chen
ae788c536f
feat(core): rework client modules lifecycles, officially make API public (#6732) 2022-04-29 15:11:20 +02:00
Joshua Chen
2429bfbd59
refactor(cli): normalize the application of default option values (#7220)
* refactor(cli): normalize default value application

* improve help text
2022-04-29 12:09:03 +02:00
Sébastien Lorber
6265f6dabb
feat: custom navbarItem types (workaround) (#7231)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-29 11:23:46 +02:00
JMW
7073cc3462
fix: pass pollOptions to webpack (#7180)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-29 10:48:18 +02: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
Joshua Chen
a30daa1530
chore: remove baseUrl from tsconfig (#7258)
* chore: remove baseUrl from tsconfig

* ?
2022-04-28 22:03:25 +08:00
Joshua Chen
9a1b7217ba
chore: upgrade Jest to 28; add GitHub-actions reporter (#7243) 2022-04-27 23:47:59 +08:00
Joshua Chen
10a5ebecec
fix(content-docs): make category index text translatable (#7233) 2022-04-27 23:40:15 +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
242f2e780e
chore: upgrade dependencies (#7232) 2022-04-23 11:55:01 +08:00
Joshua Chen
c4e92c89e8
fix(core): prevent 404 when accessing /page.html (#7184) 2022-04-22 17:44:11 +02:00
Alexey Pyltsyn
4e4aa6add7
feat(theme-classic): toggle code wrap button (#7036)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-04-22 14:50:27 +02:00
Sébastien Lorber
c3add31ebf
fix: allow swizzling a component's parent folder (#7225) 2022-04-22 14:23:33 +02:00
Sébastien Lorber
5c29809163
refactor: use generated-index in init templates (#7223) 2022-04-22 11:27:14 +02:00
Joshua Chen
1412441987
fix(theme-common): do not persist color mode for OS-triggered changes (#7200)
* fix(theme-common): do not persist color mode if switch is disabled

* New setColorMode(null) API

* reset to default without RPCS
2022-04-21 23:29:08 +08:00
AkiraVoid
71ba449a28
fix(content-blog): make footnote reference DOM ID unique on post listing page (#7212)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-21 16:51:24 +02:00
Joshua Chen
3b32a41f22
fix(core): handle case where package.json is not available at CWD (#7187) 2022-04-21 16:07:02 +02:00
rev
e12947e818
chore(theme-translations): complete Polish translations (#7214)
* Update theme-common.json

* Update plugin-ideal-image.json

* Update theme-search-algolia.json

* Update theme-common.json

* Update packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-common.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/plugin-ideal-image.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/plugin-ideal-image.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/plugin-ideal-image.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
2022-04-21 19:29:32 +08:00
Joshua Chen
b8fc34dd95
fix(theme-translations): fix invalid pluralization in cs (#7222) 2022-04-21 18:43:59 +08:00
Alexey Pyltsyn
9af35c5b47
refactor: customize code block line highlight color via CSS var (#7176) 2022-04-21 11:19:33 +02:00
Joshua Chen
97f7b45f1a
fix(cli): always show error stack to unhandled rejection (#7218) 2022-04-21 12:54:27 +08:00
Alexey Pyltsyn
1ba5bf66b2
refactor: improve IconHome icon (#7215)
* refactor: optimize IconHome icon

* Increase icon size

* Fix lint
2022-04-20 21:34:13 +08:00
Dr-Electron
44ebe73e50
refactor: use SVG icon for home breadcrumb (#7183)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-20 14:42:57 +02:00
Joshua Chen
7f06857e46
fix: fix a lot of declaration semantic errors (#7194) 2022-04-17 23:44:20 +08:00
Joshua Chen
b154318c28
chore: upgrade dependencies (#7193) 2022-04-17 17:32:41 +08:00
Joshua Chen
fa1ce230ea
refactor: capitalize comments (#7188)
* refactor: capitalize comments

* revert...
2022-04-17 16:39:11 +08:00
Joshua Chen
200009008b
refactor: prefer fs.readJSON over readFile.then(JSON.parse) (#7186)
* refactor: prefer fs.readJSON over readFile.then(JSON.parse)

* refactor: use promises
2022-04-17 12:50:09 +08:00
Joshua Chen
f219a2ac90
test: improve test coverage (#7181) 2022-04-16 16:35:40 +08:00
Joshua Chen
44966e19e9
fix(theme-classic): do not add microdata item prop to trailing breadcrumb (#7179) 2022-04-15 22:09:00 +08: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
Sébastien Lorber
5273a534d3
refactor(theme-classic): split CodeBlock (#7175)
* extract CodeBlockLine

* stable refactor

* stable refactor

* stable refactor

* add CodeBlockContainer

* refactor

* refactor

* do the actual split

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-15 17:58:12 +08:00
chelproc
f6a14db8de
fix(theme-classic): admonition title: disable text-transform on inline code blocks (#7173) 2022-04-14 18:20:13 +02:00