Commit graph

1240 commits

Author SHA1 Message Date
Sean Campbell
2ba55b0f19
fix(v2): fix accessibility issue with IconArrow (#4011) 2021-01-10 14:09:54 +08:00
Joel Marcey
827de9a840
feat: add new policy links to Docusaurus site and FB template (#4019) 2021-01-10 14:07:59 +08:00
Sébastien Lorber
c4cbe8ec72
chore(v2): prettier fixes (#4005) 2021-01-06 17:07:34 +01:00
Sean Campbell
5dfa665281
feat(v2): themed logo in footer (#3993)
* feat: attempt 1 at themedlogo in footer

* Add srcDark to website for temp debug

* typo fix

* Got it now! except for centering

* style: centered new themed image logo

* style: change ThemedImage styleing to center footer logo

* style: Change ThemeImage Style to initial

This was my mistake.

Removed temp `srcDark` footer logo
2021-01-06 16:10:44 +01:00
Nathan Bosscher
8a9dfcf96c
fix(v2): Fix double trailingSlash in sitemap.xml (#4004)
When `trailingSlash` option is enabled, routes that already end in a `/` are shown with double slash at the end.
2021-01-06 15:44:22 +01:00
Kumar Aditya
f48d435ce4
feat(v2): Cache hashed assets to dedicated folders (#3998) 2021-01-05 16:31:27 +01:00
Sébastien Lorber
d2d2872646
chore(v2): fix date-sensitive test fixture (#3988)
Co-authored-by: 9oelM <hj923@hotmail.com>
2021-01-04 16:50:56 +01:00
Kumar Aditya
0bb5e547b1
feat(v2): skip dependency install on docusaurus init (#3986)
* fix: #3450

Signed-off-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>

* test: fix failing test

Signed-off-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2021-01-04 16:17:06 +01:00
Joel M
869e118e4f
feat(v2): better error message for invalid plugin config (#3979)
* test(v2): improve tests on validating plugins

* fix(v2): make schema for plugins stricter

* fix(v2): emit error if valid type of plugin is not found (#3934)
2020-12-31 15:33:24 +01:00
Sébastien Lorber
1e1860681b
fix(v2): fix multi-instance mdx loaders not sandboxed correctly (#3970)
* another attempt to fix the multi-instance conflicts

* try to fix windows build

* cleanup + improve comment
2020-12-30 11:18:51 +01:00
Sébastien Lorber
9fdac1a0dc
fix(v2): fix blog only contextual search (#3968) 2020-12-29 15:59:56 +01:00
Apurva Ojas
5944226eb4
fix(v2): fix svg loader for CSS files (#3965)
* bug(v2): fix svg loader for styles re #3964

* ensure we only use SVGR loader in source code that can use React (ie not in CSS files)

* fix test

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-12-29 14:47:57 +01:00
Sébastien Lorber
141d062c3b
chore(v2): fix windows Jest tests (#3959)
* test(v2): Fix docusaurus-utils tests for windows

* test(v2): Fix plugin-client-redirects test

- add the posixPath in writeRedirectsFiles.ts

* test(v2): Fix plugin-content-pages test

add posixPath in test and index

* test(v2): add window test configuration

 - add the window test configuration in nodejs-windows.yml

* test(v2): revert plugin-content-pages test fix

* test(v2): Fix mdx-loader/transformImage test

* test(v2): add cleanPath in transformImage test

* fix version path tests for windows

* make versionMetadata test work on Windows

* try to fix posix/win32 path issues

* attempt to fix windows test

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* specific jest config for windows

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* remove bad cleanPath fn

* try to fix windows tests

* try to fix windows tests

* blog: try to fix windows tests by using same logic as on docs plugin

* try to fix windows tests

* try to fix windows tests

* try to fix windows tests

* try to fix windows tests

* improve the Github CI setup for windows: make jobs run in parallel

* revert GH action change

Co-authored-by: Sachin Kumar Rajput <skr571999@gmail.com>
2020-12-28 19:50:12 +01:00
saydo17
88a6f56654
fix(v2): fix redirect toUrl (windows + trailing slash) (#3903)
* replace \ with / when creating client redirect on windows

* fix(vs): replace \ with / when creating client redirect on windows

* redirects plugin: add createToUrl fn + tests

* redirects plugin: add createToUrl fn + tests
do not  add trailing  slash + try to fix windows path issues

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-12-28 11:55:15 +01:00
Bartosz Kaszubowski
601c8fe688
docs(v2): update FB OSS logo (#3881)
* docs(v2): update FB OSS logo

* chore(v2): update FB OSS logo in init
2020-12-28 11:38:07 +01:00
Joel M
41ac4468de
fix(v2): allow async/await in live code editor (#3954)
* transforming async functions is not implemented by buble, so just bypassing it would relieve the pain for now
2020-12-28 10:47:55 +01:00
Reece Dunham
6ce1230c1e
refactor(v2): fix debug plugin name (#3953) 2020-12-28 10:36:17 +01:00
Sébastien Lorber
b5c46bd1d9
feat(v2): new docs edit options: editCurrentVersion + editLocalizedDocs (#3949)
* editCurrentVersion initial poc

* ensure edit url allows to edit localized docs

* Add editLocalizedDocs option

* keep editing current version in dev (more convenient)
2020-12-28 10:25:47 +01:00
Alexey Pyltsyn
853e29dbd8
fix(v2): minor a11y tweaks (#3946) 2020-12-22 16:28:37 +01:00
Alexey Pyltsyn
83a5240f57
fix(v2): disables all inlining in CleanCSS (#3943) 2020-12-21 14:58:20 +01:00
Alexey Pyltsyn
2fb766ba7c
fix(v2): ignore style imports in excerpt (#3944) 2020-12-21 14:47:19 +01:00
Sébastien Lorber
b133e2def6
fix(v2): fix i18n build logging. (#3941)
* better i18n build logging

* better i18n build logging

* better i18n build logging
2020-12-18 19:49:31 +01:00
Sébastien Lorber
ef49c2be72
fix(v2): i18n should not crash theme without footer (#3940)
* Fix theme translations when no footer

* fix TS issues
2020-12-18 18:02:23 +01:00
Sébastien Lorber
3fc29f4b14
chore(v2): prepare v2.0.0.alpha-70 release (#3933)
* add alpha 70 changes

* v2.0.0-alpha.70
2020-12-17 20:08:20 +01:00
Sébastien Lorber
df47c1770c
feat(v2): Add <Root> theme element (#3932)
* Add <Root> component

* add some <Root> doc
2020-12-17 19:38:20 +01:00
Sébastien Lorber
6703f8420e
fix(v2): fix navbar items issue on Windows? (#3922)
* attempt to fix navbar items issue on Windows?

* attempt to fix alias ordering issue on Windows
2020-12-14 20:52:20 +01:00
Sébastien Lorber
b79568fff9
fix(v2): remove useless console log (#3921) 2020-12-14 19:53:44 +01:00
Sébastien Lorber
1db0277d36
fix(v2): i18n translation extractor should handle JSX formatting edge cases better (#3920)
* translation extractor should work despite weirdly formatted JSX  or empty text nodes around the content to translate

* fix TS
2020-12-14 19:41:28 +01:00
Sébastien Lorber
aff656182c
feat(v2): Add localeDropdown navbar item type + i18n localeConfigs field (#3916)
* Add localeDropdown navbar item type

* fix type + add localeConfigs test
2020-12-14 18:28:39 +01:00
Bogdan Doroschenko
3570aa06c8
fix(v2): don't remove viewBox from svg 2020-12-14 16:17:03 +01:00
Sébastien Lorber
41ef333e47
feat(v2): inline table-of-contents + refactor TOC (#3904)
* Add TOCInline theme component

* Add TOCInline theme component doc + migration guide

* remove useless getPathsToWatch on classic theme

* rename rightToc to toc

* add temp theme-bootstrap TOCInline comp to fix build issue
2020-12-11 16:30:53 +01:00
Oliver Ullman
b11c24b752
feat(v2): add custom props for consumption by swizzled sidebar (#3888) 2020-12-10 19:49:21 +01:00
Cindy Gu
0b05806593
feat(v2): enable feeds by default in blog plugin (#3842)
* feat: enables feeds by default in blog

* feat(v2): enable feeds by default

committing a failed attempt for review

* feat(v2): enable feeds by default in blog plugin

- allow validation to work with arrays syntax
- using DEFAULT_OPTIONS.feedOptions.type instead

* feat(v2): enable feeds by default in blog plugin

- added documentation for feedOptions

* feat(v2): enable feeds by default in blog plugin

- modified implementation to allow feeds to be disable without error
- added unit test to ensure type: null leads to type: null after
  validation
- added documentation to explain how to disable feed generation
2020-12-10 18:35:19 +01:00
Méril
656c04e1d5
fix(v2): correct typo in metas generated for Twitter cards (#3900)
The Open Graph protocol format is the following:

```
<meta property="og:image" content="https://example.com/image.png />
```

Twitter metas, however, are structured in a different format:

```
<meta name="twitter:image" content="https://example.com/image.png />
```

They are similar but not identical, I think this led to confusion and
the typo we have in the codebase.
2020-12-10 17:09:20 +01:00
Alexey Pyltsyn
b14b9c88f3
fix(v2): do not treat at-rules during CSS minification (#3896) 2020-12-08 18:53:35 +03:00
Alexey Pyltsyn
3e12e951b9
fix(v2): use proper element for pagination nav label (#3895) 2020-12-08 18:34:39 +03:00
Bartosz Kaszubowski
e00e54a693
fix(v2): improve Footer structure, add class names, use Infima transition (#3882) 2020-12-07 16:35:00 +01:00
Sébastien Lorber
ec297cead0
polish(v2): improve docusaurus deploy logs (#3880)
* improve deploy logs

* improve deploy logs
2020-12-04 16:50:46 +01:00
Hadrien Milano
c4aeb1982c
fix(v2): dynamic dark mode detection without toggle widget (#3877)
* fix(v2): dynamic dark mode detection without toggle widget

* Update packages/docusaurus-theme-classic/src/theme/hooks/useTheme.ts

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-12-04 13:27:34 +01:00
hackerman
415a7973f1
fix(v2): load plugin commands async to fix broken plugin CLI commands docs:version (#3869)
* fix(v2): load plugin commands asynchronously

https://github.com/facebook/docusaurus/blame/master/packages/docusaurus/src/commands/external.ts#L12 changed the exported method to an async function, but the CLI loader was not updated to also run async, breaking things such as `npm run docusaurus docs:version <version>`.

* chore(v2): resolve lint issue
2020-12-03 18:23:26 +01:00
Bartosz Kaszubowski
f37987f32f
chore(v2): fix ignore paths and Prettier commands in themes (#3865)
* chore(v2): fix Prettier ignore paths and commands in themes

* chore(ci): do not ignore v1 lib, remove old .gitignore

* chore(ci): apply tweaks also to eslint ignore
2020-12-03 11:50:03 +01:00
Sébastien Lorber
e90749c6f8
fix(v2): to fix the canary release GH workflow (#3852)
* attempt to fix the canary release  GH workflow

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to make the canary workflow work again

* try to fix canary again

* try to fix canary again

* try to fix canary again
2020-12-02 20:15:12 +01:00
Bartosz Kaszubowski
397fde0b2f
fix(v2): refactor icons in theme-classic, fix swizzle issue (#3854)
* fix(v2): refactor icons in theme-classic, fix swizzle issue

* apply review suggestion

* fix IconMenu className
2020-12-01 17:56:11 +01:00
François Chalifour
915f949c25
fix(v2): fix DocSearch keyboard navigator (#3853)
* fix(v2): fix DocSearch keyboard navigator

* Update index.js

* Update index.js

* Update index.js

* Update index.js

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-12-01 17:49:14 +01:00
Kaartic Sivaraam
cf5644d67a
fix(v2): remove unnecessary backtick in output (#3839)
* fix(v2): remove unnecessary backtick in output

The escaped backtick seems to be present for no clear reason.
As a matter of fact, it seems to be cluttering the output.

So, remove the unnecessary backtick in the output.

* update snapshot

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-11-30 17:07:59 +01:00
Bartosz Kaszubowski
ad31facb32
chore(v2): fix several lint warnings, add missing types, cleanup (#3844)
* fix several lint warnings, add missing types, cleanup

* fix EnumChangefreq issue

* better utilization of EnumChangefreq type

* update test snapshot
2020-11-30 16:42:58 +01:00
Bartosz Kaszubowski
21572ccd37
feat(v2): extract site title formatter to theme-common util (#3838) 2020-11-30 15:41:09 +01:00
Bartosz Kaszubowski
f43781ff41
fix(v2): improve search page styling, fix appearance in dark mode (#3837)
* fix(v2): update SearchPage styling, fix appearance dark mode

* fix inputs outline

* prettier don't like spaces, lets use margin instead

* fix font family, update mobile layout

* attempt to address review concerns
2020-11-29 14:52:07 +03:00
Bartosz Kaszubowski
bb387e089f
feat(v2): add custom wrapper class to search page and fix title (#3834)
* feat(V2): add custom wrapper class to SearchPage

* review change

* fix(V2): fix SearchPage title and Head warning
2020-11-28 00:50:28 +03:00
Sébastien Lorber
22c06c2775
fix(v2): fix search (#3829)
* fix little search facet typo

* revert Alexey change, as we  are sure a site always has a locale
2020-11-27 10:24:43 +01:00