Commit graph

1987 commits

Author SHA1 Message Date
seyoon20087
a615ab3999
feat(core): use react-helmet-async (#6306)
* Use React Strict Mode

Even though Strict Mode is not required a WARNING icon now displays
on all components that do not use React.StrictMode on React DevTools extension.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* Utilize react-helmet-async instead of react-helmet

react-helmet is NOT thread safe, as explained in https://open.nytimes.com/the-future-of-meta-tag-management-for-modern-react-development-ec26a7dc9183#fdc2

Therefore, it's better if react-helmet-async is utilized instead of react-helmet.

Even though react-helmet-async is being utilized, most users will not require any code changes to @docusaurus/Head since it uses the same API as react-helmet.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* Include HelmetProvider inside client entry

I forgot to do this before.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* format

* fix TS

* address reviews

* Remove forked react-loadable package in favor of @react-loadable/revised

Both unforked react-loadable and @docusaurus/react-loadable uses legacy React APIs.

However, @react-loadable/revised (https://github.com/react-loadable/revised) is actively maintained and widely used in production, thus replaced with this package.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* remove unused comma

* Address reviews from https://github.com/facebook/docusaurus/pull/6306#pullrequestreview-864745191

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-02 14:52:44 +08:00
Joshua Chen
661bc32402
chore(deps): bump all dependencies; regenerate lockfile (#6580) 2022-02-02 13:00:31 +08:00
Alexey Pyltsyn
72bad11e97
fix(theme-classic): highlight active collapsible doc category properly (#6531) 2022-02-01 21:18:21 +08:00
Joshua Chen
1cefb643dd
refactor: enforce named capture groups; clean up regexes (#6524)
* refactor: enforce named capture groups; clean up regexes

* fixes

* fix
2022-02-01 17:43:15 +08:00
Joshua Chen
c56e6194b4
refactor: mark all functions that import external modules as async (#6521) 2022-01-31 13:04:45 +08:00
Joshua Chen
aa446b7a9c
chore: clean up ESLint config, enable a few rules (#6514)
* chore: clean up ESLint config, enable a few rules

* enable max-len for comments

* fix build
2022-01-31 10:31:24 +08:00
Kishan Gajera
b8ccb869f1
fix(theme-classic): add key prop for SimpleLinks map (#6515) 2022-01-31 10:07:16 +08:00
Joshua Chen
8f69f633e6
refactor(core): convert theme-fallback to TS (#6511)
* refactor(core): convert theme-fallback to TS

* add missing type

* fix snapshot
2022-01-30 18:41:13 +08:00
Kishan Gajera
dda92eb2b6
fix(theme-classic): apply width/height for footer logos without href (#6508) 2022-01-29 23:16:40 +08:00
Joshua Chen
2553f1fb5a
refactor: improve internal typing (#6507)
* refactor: improve internal typing

* fix

* fix test
2022-01-29 22:58:40 +08:00
Joshua Chen
58e07a6796
test: add test for readOutputHTMLFile (#6506) 2022-01-29 18:10:46 +08:00
Joshua Chen
4f2b09fe32
refactor: fix all eslint warnings (#6502) 2022-01-29 13:21:40 +08:00
Joshua Chen
c1e3801ee7
fix(cli): allow passing a list of file names to write-heading-ids (#6500) 2022-01-29 12:21:15 +08:00
Matthew Ailes
d45f96fc83
fix: updating peerDependency fields for yarn berry (#6498) 2022-01-29 10:29:03 +08:00
Sébastien Lorber
f5f598a921
fix(core): configValidation should allow inline theme functions (#6496) 2022-01-28 17:49:25 +01:00
Joshua Chen
c99026c524
fix(theme-classic): do not switch color modes when printing (#6490)
* fix(theme-classic): coerce to light theme when printing

* revert this...

* fix
2022-01-28 20:19:23 +08:00
Nick Schonning
bcb15336bf
chore: fix Stylelint globs for editor support (#6476)
* chore: expand Stylelint globs

* uninstall plugins

* revert stylelint bump

* fix lock

* better ignore

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-28 12:02:16 +08:00
Joshua Chen
556f59b193
fix(utils): do not resolve Markdown paths with @site prefix (#6489) 2022-01-28 10:10:39 +08:00
Joshua Chen
3c58d7f027
feat(content-docs): allow explicitly disabling index page for generated category (#6452)
* feat(content-docs): allow explicitly disabling index page for generated category

* docs

* add test
2022-01-27 23:14:07 +08:00
Joshua Chen
0e13356e1b
feat: mark some text labels as translatable (#6482)
* feat: mark some text labels as translatable

* tweak
2022-01-27 19:36:37 +08:00
Joshua Chen
4c22316438
refactor(init): promote good practices; use site alias (#6481) 2022-01-27 12:08:52 +01:00
Nick Schonning
37be796aa8
test: rename 'fixtures' to '__fixtures__' (#6474)
* test: rename 'fixutes' to '__fixtures__'

* test: rename '__test' to '__tests__'

* test: update snapshot
2022-01-27 09:30:09 +08:00
Joshua Chen
02186a2b20
fix(utils): Markdown linkification match local paths beginning with http (#6478) 2022-01-27 09:26:31 +08:00
Sébastien Lorber
d6cff8c754
chore(v2): prepare v2.0.0-beta.15 release (#6473) 2022-01-26 19:28:16 +01:00
Joshua Chen
24a895fbc5
feat(content-docs): expose isCategoryIndex matcher to customize conventions (#6451)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-01-26 17:58:52 +01:00
Joshua Chen
76a8d5f38a
fix(content-blog): generate feed by reading build output (#6454) 2022-01-26 16:54:15 +01:00
Joshua Chen
ebd5340205
chore: various improvements to repo setup (#6471)
* chore: various improvements to repo setup

* fix again

* fix
2022-01-26 14:24:15 +08:00
Joshua Chen
83fb3a825f
refactor: clean up dependencies (#6470) 2022-01-26 13:12:03 +08:00
Joshua Chen
f0b08f493d
fix(module-type-aliases): fix type def for translate params (#6469) 2022-01-26 11:49:29 +08:00
Mikey O'Toole
d0fc31c8ae
feat(theme-classic): add stable class for DocSidebarContainer (#6466) 2022-01-26 10:47:54 +08:00
Gabriel Csapo
d73b4f8674
fix(init): cd to correct path when installing (#6468)
* [bug] ensure we use the correct cd path

* Update index.ts

* refactor

* add ignore

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-26 10:01:11 +08:00
Sébastien Lorber
dd539dd23f
feat(search): enable contextual search by default (#6407) 2022-01-25 11:45:41 +08:00
Nick Schonning
521eb119a7
chore: add cSpell for spell checking (#6456)
* chore: Add cSpell for spell checking

* chore: exclude map files and remove dups

* chore: exclude more binary files

* chore: remove MD headings

* Update .cspell.json

* fix a few spellings

* fix more

* fix

Signed-off-by: Joshua Chen <sidachen2003@gmail.com>

* fix a few

* oops

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-25 09:40:02 +08:00
Anthony McCaigue
ab1dada1aa
fix: allow links to JSON in .md files to be transformed as asset links (#4827)
* fix: fix links to JSON from .md files
closes #3561
It seems to be a common problem that many people are having see:
https://stackoverflow.com/questions/65307533/link-to-static-json-file

Co-authored-by: Anthony McCaigue <anthony@nquiringminds.com>
Co-authored-by: Alois Klink <alois@nquiringminds.com>

* Add dogfooding examples

* actually fix

* oops

Co-authored-by: Alois Klink <alois@nquiringminds.com>
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2022-01-23 11:46:27 +08:00
Joshua Chen
3d7ba337c2
refactor(mdx-loader): use vfile.path to access Markdown file path (#6443) 2022-01-22 22:28:50 +08:00
Joshua Chen
e40cafccd5
chore: enable stylelint standard config (#6442)
* chore: enable stylelint standard config

* remove empty line

* fix
2022-01-22 21:26:35 +08:00
Joshua Chen
456ffbd330
chore: remove some unused dependencies from package.json (#6440) 2022-01-22 19:47:35 +08:00
Joshua Chen
c2e2938d1b
refactor(theme-classic): render BlogPostItem as one JSX element (#6436) 2022-01-22 14:56:43 +08:00
Joshua Chen
64909e7f14
fix(content-docs): make getActivePlugin match plugin paths more exactly (#6435)
* fix(content-docs): make getActivePlugin match plugin IDs more exactly

* refactor...
2022-01-22 13:36:56 +08:00
Joshua Chen
807b4c2ced
feat(theme-classic): add aria-current to sidebar category link (#6427) 2022-01-21 11:40:27 +08:00
Sébastien Lorber
8a092f508d
fix(core): fix css url("image.png"), use css-loader v6 with esModules: false (#6424) 2022-01-20 18:30:54 +01:00
Joseph
8ce3cee400
feat(theme-classic): auto-collapse sibling categories in doc sidebar (#3811)
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2022-01-20 16:38:16 +01:00
Joshua Chen
4e69c052d6
feat(content-blog): allow authors list to contain images only (#6416)
* feat(content-blog): allow authors list to contain images only

* adjust styles

* fix

* fix

* mention in docs

* fix wording
2022-01-20 22:08:18 +08:00
Joshua Chen
d506bca12d
feat(content-blog): allow disabling generating archive (#6415) 2022-01-20 14:52:19 +01:00
Joshua Chen
65c2fc200a
feat(core): warn users about hand-modifying generated files (#6419)
* feat(core): warn users about hand-modifying generated files

* Better folder name
2022-01-20 21:41:59 +08:00
Joshua Chen
d133910cb2
feat(content-blog): parse date from middle of file path (#6245) 2022-01-20 16:43:00 +08:00
Joshua Chen
abdcad7316
feat: update website & init template palette to pass WCAG test; include contrast check in ColorGenerator (#5822)
* docs: update website palette to pass WCAG test

* Darker palette in light mode

* Fix CodeBlock

* Fix front page

* Fix announcement color

* Unify primary color

* Add contrast check in website

* Fix color input not updating

* Use website for preview; allow changing background

* Persist in localStorage

* Fixes

* Fix SSR

* Edit dark mode separately

* Fix light mode palette

* Fix storage reset

* Fix CSS

* Fix

* fix toggling when not on styling-layout

* require 100% lighthouse accessibility score

* use sessionStorage

* refactor

* tweak light color

* update comments

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-01-20 14:51:18 +08:00
Joshua Chen
19fb337618
fix(content-pages): declare hide_table_of_contents as boolean (#6413) 2022-01-20 10:58:36 +08:00
Joshua Chen
71b6ae2fbf
feat(core): check imported API name when extracting translations (#6405) 2022-01-19 17:04:33 +01:00
Joshua Chen
45f1b819b5
feat(content-docs): displayed_sidebar front matter (#5782) 2022-01-19 16:00:42 +01:00