Commit graph

2757 commits

Author SHA1 Message Date
matbub
56067e4add
docs(v2): fix typos in plugin-content-pages example (#2967) 2020-06-19 14:17:28 +08:00
Sébastien Lorber
9301d0c861
doc(v2): publish doc update after alpha.58 release (#2960)
* doc(v2): publish doc update after alpha.58 release

* typo

* publish doc update

* Update publish.md

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-06-19 12:59:08 +08:00
matbub
459b2c56fd
docs(v2): fix typo in plugin-content-pages example (#2966)
fixed grammar error in @docusaurus/plugin-content-pages example from 'blog' to 'page'
2020-06-19 12:57:35 +08:00
Yangshun Tay
73c835b518
docs(v2): rename 2.0.0-alpha.57 to 2.0.0-alpha.58 (#2958) 2020-06-18 16:10:52 +02:00
slorber
16ba6e54b6 v2.0.0-alpha.58 2020-06-18 14:02:26 +02:00
slorber
d280cd2e15 chore(v2): rename 2.0.0-alpha.57 to 2.0.0-alpha.58 2020-06-18 14:00:16 +02:00
slorber
e396c64f31 chore(v2): update yarn.lock 2020-06-18 14:00:16 +02:00
Marius Andra
162870d251
docs: mention posthog-docusaurus plugin (#2957) 2020-06-18 19:30:42 +08:00
Sébastien Lorber
72884a0c1a
chore(v2): fix eslint TS setup (#2949)
* update eslint parser

* fix yarn lint script

* lint-staged, lint ts files

* fix TS eslint configuration + fix some lint errors (https://github.com/facebook/docusaurus/pull/2949)

* eslint root + separate linting in 2 scripts

* test commit

* test commit

* test commit

* fix /// TS directive
2020-06-18 17:37:48 +08:00
Sébastien Lorber
38c8478e75
chore(v2): prepare v2.0.0.alpha-57 release (#2954)
* chore(v2): prepare v2.0.0.alpha-57 release

* update changelog

* fix changelog
2020-06-18 01:04:57 +08:00
Sébastien Lorber
f6b1c85b01
fix(v2): fix docs homepage permalink issues (#2905)
* better fixes for docs homepage

* fix tests

* create special route for docs homepage + cleanup existing code

* no need to create multiple docs parent paths

* useful comment

* add test for slug + doc home usage at the same time error

* remove confusing variable name

* fix tests by using same suffix as before for docs base metadata path

* metadata: use homePageId correctly for nested docs: the full docId (including /) should be used to compare against homePageId

* add folder/testNested test doc

* refactor a bit processMetadata, the home should be handled correctly for all versions

* Workaround to fix issue when parent layout route (DocPage) has same path as the child route (DocItem): see https://github.com/facebook/docusaurus/issues/2917

* revert homePageId

* remove test doc

* remove test doc

* add useful comment
2020-06-17 14:54:08 +02:00
Guillaume Jacquart
a3f54d747d
fix(v2): Add hooks to detect window resize, toggle off sidebar and navbar in desktop (#2932)
* Add hooks to detect window resize, toggle off sidebar and navbar on desktop

* Review fixes

* Latest fixes. Refactor window sizes into object

* Fix deps and checks on windowSize change

Co-authored-by: guillaume <guillaume.jacquart@abtasty.com>
2020-06-17 11:32:34 +02:00
Sam Zhou
c05b5de580
fix(v2): Add optional-chaining and nullish-coalescing babel plugin (#2951) 2020-06-17 10:09:32 +08:00
Sam Zhou
85ad312287
fix(v2): Declare @docusaurus-plugin-debug as dependency of preset classic (#2944)
Missed it in #2929.
2020-06-17 01:55:40 +08:00
Sébastien Lorber
025ac4e28c
refactor(v2): legacy export = syntax (#2948) 2020-06-17 01:55:14 +08:00
Teik Jun
955e656496
docs(v2): add require.resolve to plugin imports on all pages (#2946) 2020-06-17 01:06:16 +08:00
Tom Brien
e97d2eab5a
docs(v2): wrap all plugin imports in require.resolve() (#2941)
* Wrap all plugin imports in require.resolve()

As per breaking change in 2.0.0-alpha0.56

* Wrap plugins in next version

* Revert "Wrap plugins in next version"

This reverts commit 5afa06e243.
2020-06-16 22:47:07 +08:00
Alexey Pyltsyn
5b9f4dd0bb
fix(v2): adjust anchor offset when routes switched (#2909) 2020-06-16 20:41:30 +08:00
Sébastien Lorber
b5d7c3a111
misc(v2): better dx: yarn clear, yarn watch, yarn serve (#2922)
* add clear + serve scripts

* add ability to launch all TS projects in --watch mode

* attempt to create a watch plugin

* use rimraf for clear script

* update watch plugin poc

* add start:v2:watch

* remove the watch plugin
2020-06-16 20:40:46 +08:00
Sébastien Lorber
c1102a4eae
fix(v2): upgrade react-loadable-ssr-addon (#2921)
* docs(v2): fix typo in ExecutionEnvironment example

* upgrade react-loadable-ssr-addon for https://github.com/facebook/docusaurus/issues/2898

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-06-16 20:39:26 +08:00
Tom Brien
b77ae91247
docs(v2): fix changelog require.resolve mention
* Update change log

The 2.0.0-alpha56 Change log does not make mention to the breaking change with plugin imports. The [GitHub release](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.56) does. This has meant that dependabot has missed this change in it's pull requests (which seemed to use the changelog in some cases)

* Fix typo

Was in the source I copied from GH release
2020-06-16 11:15:41 +02:00
moonrailgun
930222ea87
refactor(v2): convert synchronous file write to asynchronous (#2936)
* perf(v2): convert synchronous filewrite to asynchronous in feed file generate

This looks like should return a Promise list , other than a sync io operation

* perf(v2): convert synchronous filewrite to asynchronous in sitemap generate

* perf(v2): convert  Promise style to async/await style

for consistency
2020-06-15 16:04:15 +02:00
Teik Jun
0c92f5aacd
feat(v2): add a banner that links to latest version of documentation (#2916)
* feat(v2): add metadata to indicate the document is old

* feat(v2): add badge that links old versions to latest version

* feat(v2): fix test related to metadata

* feat(v2): fix formatting

* feat(v2): fix formatting

* feat(v2): use Link component instead of anchor tag

* feat(v2): add pramlink to latest docs

* feat(v2): add more vibrant warning message

* feat(v2): position the banner above the article

* feat(v2): link latest version to intro page

* fix(v2): fix some test cases

* feat(v2): fix tests

* feat(v2): change banner to warning orange

* feat(v2): compute root route from sidebar

* style(v2): fix formatting

* feat(v2): use homeid if provided to compute base route

* feat(v2): rename functions and fix a corner case

* feat(v2): fix formating

* feat(v2): compute homepageurl

* style(v2): improve code quality

* style(v2): unbold fullstop for consistency

Co-authored-by: Anshul Goyal <anshulgoel151999@gmail.com>
2020-06-15 14:31:23 +02:00
Drew Alexander
d365b7424b
docs(v2): add useThemeContext note (#2934)
* docs: add note to useThemeContext api docs

* Update example usage
2020-06-15 12:39:17 +02:00
Drew Alexander
c341f457fb
docs(v2): add router implementation note (#2935) 2020-06-15 12:37:49 +02:00
Sam Zhou
1fdc8c5da1
chore(v2): Run E2E tests in CI (#2929) 2020-06-15 03:19:08 +08:00
Teik Jun
8eed245000
docs(v2): add documentation for multiple blogs (#2933)
* docs(v2): add documentation for multiple blogs

* docs(v2): fix typos of docusaurus

* docs(v2): make the same changes in the latest version of documentation

* docs(v2): remove an empty blockquote

* docs(v2): improve documentation for multiple blogs
2020-06-15 03:18:37 +08:00
Fanny
22178ebded
chore(v2): remove unused hooks from bootstrap theme (#2931)
* chore(v2): remove unused hooks

* chore(v2): Update aria label
2020-06-14 20:05:29 +08:00
Sam Zhou
6e37d3fb12
feat(v2): Implement proof-of-concept Docusaurus Debug Dashboard (#2928)
* feat(v2): Implement proof-of-concept Docusaurus Debug Dashboard

* Ensure we show the exact boolean
2020-06-14 15:30:04 +08:00
Sam Zhou
729b3cae9b
feat(v2): Allow configuring babel via babel.config.js (#2903)
* feat(v2): Allow configuring babel via docusaurus.config.js

* Use api.caller feature from babel to avoid expose isServer to users

* Remove unused optional config key

* Make babel loader resolve and require config file
2020-06-12 11:03:00 +08:00
Sébastien Lorber
68a1bb1ebf
Merge pull request #2793 from slorber/feature/client-side-redirects
feat(v2): docusaurus-plugin-client-redirects
2020-06-10 17:36:57 +02:00
slorber
6b507630e3 migrate useful helper functions to docusaurus-utils 2020-06-10 17:22:41 +02:00
slorber
c964a1e3b6 add introduction redirect 2020-06-10 17:22:08 +02:00
Yangshun Tay
3e43955df6 docs(v2): fix typo in ExecutionEnvironment example 2020-06-09 21:52:24 +08:00
Anshul Goyal
c97fd9f1d7
docs(v2): fix GitHub action workflow in documentation (#2910) 2020-06-09 16:29:55 +08:00
Sébastien Lorber
08359dd3ca
chore(v2): fix async tests (#2906) 2020-06-09 01:10:13 +08:00
Teik Jun
66716d1619
feat(v2): add nojekyll file to static folder for all templates (#2902) 2020-06-08 09:45:57 +08:00
Alexey Pyltsyn
dd1ef71aac
chore(v2): replace Clipboard with copy-text-to-clipboard (#2900)
* chore(v2): replace Clipboard with copy-text-to-clipboard

* Remove clipboard from yarn.lock
2020-06-07 13:48:28 +08:00
Alexey Pyltsyn
afe9ff91a4
chore(v2): replace classnames with clsx (#2895) 2020-06-07 13:40:06 +08:00
dependabot[bot]
600ef7ae28
chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#2899)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-06 14:58:25 +03:00
Alexey Pyltsyn
277f02b924
fix(v2): set correct canonical url for docs home page (#2896) 2020-06-06 16:51:00 +08:00
Alexey Pyltsyn
36cf2eca87
refactor(v2): synchronize yarn/npm command on site (#2897) 2020-06-06 16:49:49 +08:00
Sébastien Lorber
1003a15d1f
polish(v2): improve Docusaurus 1 to 2 migration developer experience (#2884)
* improve markdown parsing errors by adding file path to error

* typo commit

* Add default nav item position to right (as v1)

* improve error when sidebar references unexisting document

* parseMarkdownFile: improve errors by providing hint about using "" to avoid parsing errors, if using special characters

* improve subcategory migration error for Unknown sidebar item type

* improve unrecognizedFields error

* typo

* fix inline snapshots

* improve the migration docs

* improve the migration docs

* improve migration doc

* Update migrating-from-v1-to-v2.md

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-06-06 11:16:50 +08:00
Sam Zhou
8aa520c314
fix(v2): Do not automatically change tab when a non-existing option is selected (#2893) 2020-06-06 11:11:42 +08:00
Paul Glezen
4278cebf67
docs(v2): fix typo in command on installation page (#2886)
* Fix installation.md typo

Checking the docusaurus version should be done with

```
npx docusaurus --version
```

not 

```
npm docusaurus --version
```

otherwise it prints the version of `npm` instead of `docusaurus`.

* docs: Fixed installation.md for checking version.

Specifying `npm` for the version will yield the version of NPM
instead of docusaurus itself.  Use `npx` for the docusaurus version.
2020-06-06 04:14:53 +03:00
Alexey Pyltsyn
664ceb7771
fix(v2): restore styles for menu scrollbar (#2888) 2020-06-05 20:13:40 +08:00
Fanny
8a34872750
fix(v2): bootstrap doc sidebar (#2860)
* fix(v2): doc sidebar

* chore(v2): prettier

* fix(v2): docs navbar path

* fix(v2): fix error about activepath

* chore(v2): prettier

* feat(v2): change active color

* feat(v2): update to new docs cpmfog

* feat(v2): Add homepagepath
2020-06-05 15:36:36 +08:00
Alexey Pyltsyn
174cd8dc6f
refactor(v2): combine nested theme providers into one (#2870) 2020-06-05 15:09:13 +08:00
Yangshun Tay
2d8abe150f
docs(v2): make .nojekyll warning more obvious (#2887) 2020-06-05 10:22:06 +08:00
slorber
0ac5a66a1f rename fromRoutePath/toRoutePath to simply from/to 2020-06-04 14:31:26 +02:00