Commit graph

3108 commits

Author SHA1 Message Date
Sébastien Lorber
62c61c9d8e
fix(v2): fix markdown images always using webpack url-loader (#3180)
* fix markdown images always using file-loader + move assets to a dedicated subfolder

* update snapshot
2020-07-31 20:50:39 +02:00
Sébastien Lorber
7cceee7e38
feat(v2): markdown pages (#3158)
* markdown pages POC

* add remark admonition, mdx provider, yarn2npm...

* pluginContentPages md/mdx tests

* pluginContentPages md/mdx tests

* add relative file path test link to showcase link problem

* fix Markdown pages issues after merge

* fix broken links found in markdown pages

* fix tests

* factorize common validation in @docusaurus/utils-validation

* add some documentation

* add using plugins doc

* minor md pages fixes
2020-07-31 16:04:56 +02:00
Drew Alexander
53b28d2bb2
feat(v2): dark mode toggle customization (#3127)
* Add dark/light style fields to config

* Update yarn.lock

* Remove css content

* Add documentation

* Add icon fields to toggle component

* Add config validation fields

* Remove changes from docusaurus.config

* Add unicode documentation example

* Fix default values

* Add color mode config default

* Add lodash to theme-classic

* Change themeConfigSchema name to match other packages

* Add themeConfig color-mode tests

* Add default config merge function

* Remove unneeded object merging

* Add more documentation
2020-07-31 15:39:12 +02:00
François Chalifour
e442ac95ee
feat(v2): improve Algolia search accessibility (#3166)
* feat(v2): improve Algolia search accessbility

* fix(v2): make sure to import modal before opening
2020-07-31 15:37:10 +02:00
Faizan
d560a52ef2
fix(v2): tab label showing outline & background when clicked (#3171)
* fix: tab label showing outline & background when clicked

* show outline when tab pressed otherwise do not

* listen to all keyboard keys* for outline

* quick fix on typo

* edits on handleMouseEvent func
2020-07-31 15:34:46 +02:00
Sébastien Lorber
68f4bd00f4
fix(v2): fix link items refusing attributes like target, rel etc... (#3168) 2020-07-30 15:46:33 +02:00
Xuqian
4af25cd597
feat(v2): support custom description for blog-only mode (#2359)
* feat: support custom description on blog page

resolve conflicts

* feat(v2): allow additional props to pass to route components

resolve conflicts

* Update blogDescription feature

* Update doc for blogDescription

* Remove test blogDescription config

* Fix blogDescription schema validation

* Fix minor errors

Co-authored-by: Xuqian <zxuqian@163.com>
2020-07-30 15:41:15 +02:00
dependabot[bot]
1db3fbb564
chore(deps): bump elliptic from 6.5.2 to 6.5.3 (#3164)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-30 15:04:22 +02:00
Bucky Maler
e9a2b1d9c6
fix(v2): inability for users to pin their docusaurus version (#3162) 2020-07-30 14:44:39 +02:00
Méril
962ec2c57c
docs(v2): showcase user questdb (#3163) 2020-07-30 19:10:56 +08:00
Sébastien Lorber
fc5322d9e4
chore(v2): remove alpha 59 doc (#3157) 2020-07-29 18:27:37 +02:00
Sébastien Lorber
1083454dbd
chore(v2): prepare v2.0.0.alpha-60 release (#3154)
* alpha 60

* v2.0.0-alpha.60

* update publish guide
2020-07-29 17:45:54 +02:00
Teik Jun
e7ec93b0b9
test(v2): add tests for config validation (#3142)
* test(v2): add tests for correctly defined fields

* test(v2): add test for remarkPlugins and rehypePlugins validation

* test(v2): modify tests and comments
2020-07-29 16:23:11 +02:00
Sébastien Lorber
ee2d1b42f6
docs(v2): add myself to /team page + add TeamProfileCard component (#3145)
* add myself to /team page + add TeamProfileCard component

* apply col classes from parent to make TeamProfileCard more reusable
2020-07-28 20:18:15 +02:00
Sébastien Lorber
d28a29f2c9
fix(v2): BrowserOnly should not return undefined (#3149) 2020-07-28 20:17:47 +02:00
Sébastien Lorber
eeb5c93e15
docs(v2): prettier docs (#3146) 2020-07-28 20:12:38 +02:00
Sébastien Lorber
e1b2963f31
fix(v2): absolute Links should be automatically prefixed by baseurl (#3143)
* put back the automatic withBaseUrl call, but only for urls starting with / (because useBaseUrl behavior is buggy and forces relative links to absolute links)

* fix Link typo
2020-07-28 19:40:34 +02:00
slorber
4247fc4bb1 remove automatic withBaseUrl in Link 2020-07-28 17:16:29 +02:00
Sébastien Lorber
d25d4b08f6
fix(v2): remove buggy routesLoaded + deprecate routesLoaded lifecycle (#3141)
* remove bad deletion of docs / if conflicting with a page

* deprecate routesLoaded
2020-07-28 14:28:14 +02:00
Sébastien Lorber
ac757e9dff
feat(v2): add validation escape hatch (#3134)
* add isValidationDisabledEscapeHatch system

* add bug reporting hint for validation errors

* typo
2020-07-28 14:27:47 +02:00
Bartosz Kaszubowski
aa7430e168
feat(v1): add 'slugPreprocessor' config option to allow users customize the hash links (#3124)
* fix(v1): remove HTML content from hash links

* fix one more test

* rewrite changes as new feature to prevent breaking changes
2020-07-28 14:17:28 +02:00
Sébastien Lorber
d1a27efe8c
fix(v2): navbar, allow unknown attributes (#3140) 2020-07-28 12:52:01 +02:00
Hob Adams
33bb9087cf
feat(v2): add accessible label for Algolia search button (#3138)
The button doesn't contain text which fails lighthouse a11y tests + isn't nice for screen readers.
2020-07-28 18:08:40 +08:00
Sébastien Lorber
a1db6f7d75
feat(v2): add themeConfig validation to algolia theme (#3133)
* Algolia theme option validation

* validateThemeConfig

* remove useless runtime check
2020-07-27 18:12:56 +02:00
Teik Jun
2159c4fcfb
fix(v2): make config validation less strict (#3120)
* fix(v2): make navbar title validation less strict

* fix(v2): fix validation for rehype plugin

* fix(v2): allow empty string for routeBasePath

* fix(v2): fix validation for stylesheets and scripts field

* fix(v2): rerun CI

* fix(v2): relax check for stylesheet href
2020-07-27 13:58:24 +02:00
Sébastien Lorber
41d5ac63fd
chore(v2): remove old versions (#3130) 2020-07-27 18:38:53 +08:00
Sébastien Lorber
3b16fb15e9
docs(v2): publish changes after release (#3116) 2020-07-27 12:17:59 +02:00
Sébastien Lorber
0eb9c207cf
chore(v2): v2.0.0.alpha-59 release (#3114)
* alpha 59 release preparation

* v2.0.0-alpha.59
2020-07-24 16:22:51 +02:00
slorber
886dee7874 chore(v2): prettier doc 2020-07-24 15:27:25 +02:00
Teik Jun
a9109fba7b
docs(v2): add documentation for migration command (#3026)
* docs(v2): add docs for migration command

* docs(v2): fix admonitions

* docs(v2): make minor changes to instructions

* docs(v2): add information about option flags

* docs(v2): put migration docs in guide folder

* fix(v2): fix broken links

* fix(v2): fix more broken links

* docs(v2): fix a broken link again

* fix(v2): rerun github action

* Update website/docs/guides/migrating-from-v1-to-v2.md

* Update website/docs/guides/migrating-from-v1-to-v2.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-07-24 15:15:26 +02:00
Sébastien Lorber
a0ef8939a1
chore(v2): ability to test the migration cli easily (#3113)
* ability to test the migration cli easily

* add node scripts to help test migration cli (locally + CI)

* add test for frontmatter quotify

* more tests for shouldQuotifyFrontMatter

* typo

* updated yarn lock
2020-07-24 15:07:24 +02:00
Sébastien Lorber
6aec331963
broken links: we should ignore folders when looking for existing files in the build folder (#3107) 2020-07-24 13:49:29 +02:00
Anshul Goyal
a78f703366
feat(v2): v1-v2 migration cli automate migration from v1 to v2 (#3015)
* add poc for migration tool

* fix version

* fix path

* fix some type error

* fix type errors

* fix commad

* delete package.lock.json

* ignore lib folder in eslint

* ignore lib in prettier

* fix missing version

* fix sidebar in next

* use primaey color

* fix navbar link

* fix footer

* sanatize front-matter for gray-matter

* add e2e test

* fixworkflow

* add unit test

* chore(v2): fix eslint error

* refactor(v2): use descriptive variable names

* refactor(v2): refactor createProjectStructure

* refactor(v2): refactor migrateDocusaurusProject

* refactor(v2): fix eslint errors

* fix(v2): fix mistake

* use path.join

* remove console.log

* try automate migrating md file to mdx

* fix types not found

* fix types

* remove unused fixture

* use package.json for version

* add support for pages

* add support

* sanitize fortmatter only in case of special character

* chore(v2): add color to dependencies

* feat(v2): initialize config with range of color and add logs

* chore(v2): add glob dependency

* fix(v2): fix color generation

* fix(v2): fix type issue

* feat(v2): add all unknown fields to customFields

* fix(v2): fix css mistake

* fix lerna

* fix(v2): fix github actions

* feat(v2): add option flag for migrating pages

* fix special character

* remove depulicate build

* fix test

* remove unwanted file

* fix frontmatter

* remove unused file

* rerun the test

* fix links

* feat(v2): filter out more fields from customFields

* feat(v2): filter out deprecated fields from customFields

* fix items

* fix types

* merge master

* revert docs

* fix doc

* fix broken link

* fix test

* test

* fix ci

* fix ci

* fix ci

* fix ci

* fix frontmatter

* log custom fields

Co-authored-by: teikjun <teikjunhci@gmail.com>
2020-07-24 12:52:16 +02:00
Sébastien Lorber
0ecd71ec06
fix(v2): navbar items: href/to validation is too strict (not retrocompatible) (#3106) 2020-07-24 12:49:15 +02:00
Sébastien Lorber
f926178e63
fix(v2): baseUrl is wrongly appended to anchor links (#3112)
* fix baseurl being wrongly appended to anchor links

* fix baseurl being wrongly appended to anchor links
2020-07-24 18:40:24 +08:00
Daniel Hochman
08a726e154
docs(v2): add clutch to showcase (#3094) 2020-07-24 09:01:59 +08:00
Sébastien Lorber
9fab79c975
fix(vfix docs instance path (#3108) 2020-07-23 19:43:25 +02:00
Sébastien Lorber
2c5675cbc1
feat(v2): add docusaurus script for npm users (#3105) 2020-07-24 00:37:02 +08:00
Ayan Banerjee
0f8a64428c
docs(v2):Add azure-pipelines CI guide (#3101)
Closes https://github.com/facebook/docusaurus/issues/1208
2020-07-23 17:36:45 +02:00
François Chalifour
298522ff66
feat(v2): introduce DocSearch v3 search (#2815)
* feat(v2): introduce DocSearch v3 search

* chore(deps): update @docsearch/react

* refactor: use arrow functions in callbacks

* fix: display warning when `algolia` config is missing

* feat: add link to search page

* chore: delete unused style file

* feat(website): specify DocSearch primary color

* fix(search): add "all" word

* feat(search): add `generateSearchPageHref` hook

* chore(deps): update @docsearch/react

* fix(website): remove `hitsPerPage` search parameter

* fix(search): use `baseUrl`

* fix(search): rename `generateSearchPageLink`

* fix(search): fix scroll position on mobile

* fix(search): update query on URL change

* fix(search): close DocSearch modal on See More click

* refactor(search): use `useSearchQuery` to update query from URL

* feat(search): support `/` keyboard shortcut

* fix(search): forward Algolia config to DocSearch

* chore(search): update `@docsearch/react`

* fix(search): encode search value to search page

* fix(search): use `withBaseUrl` on links

* feat(search): attach Docusaurus version to user agents

* docs(docsearch): update DocSearch section

* chore(deps): update @docsearch/react

* feat(search): apply search styles to website

* docs(search): update DocSearch doc

* chore(deps): update @docsearch/react

* chore: update lock file

* chore(deps): update algoliasearch

* fix(website): remove special character in CSS

* docs(search): remove special character in CSS
2020-07-23 14:36:38 +02:00
Sébastien Lorber
336c3e54da
fix(v2): netlify.toml shouldn't affect v1 site deployment config (#3099)
* netlify.toml shouldn't affect v1 site deployment config

* try to fix netlify setup

* try to fix netlify setup

* try to fix netlify setup
2020-07-23 11:51:28 +02:00
Ayan Banerjee
cbe3c7775b
docs(v1): Add azure-pipelines CI guide (#3098)
Closes https://github.com/facebook/docusaurus/issues/1208
2020-07-23 11:42:14 +02:00
Sébastien Lorber
811c7ae4e9
fix(v2): fix recent baseurl issues (#3093)
* try to fix the baseUrl related issues

* fix some newly detected broken links

* fix baseurl and broken link issues

* try to configure netlify to use baseUrl deployment

* add proper netlify settings?

* add proper netlify settings?

* add proper netlify settings?

* test commit

* try to fix the redirects

* cleanup working conf

* minor redirect fix
2020-07-22 19:55:40 +02:00
Sébastien Lorber
27f384a67c
refactor(v2): improve navbar menu + generated config should be normalized (#3088)
* improve navbar menu

* fix errors due to forcePrependBaseUrl being normalized to true

* fix TS errors
2020-07-22 11:56:28 +02:00
dependabot[bot]
4bc50e4a52
chore(deps): bump lodash from 4.17.15 to 4.17.19 (#3068)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-21 19:14:26 +02:00
Sébastien Lorber
8ff28e3fe4
feat(v2): broken links detection (#3059)
* add broken links checker

* polish

* finalize broken links detection feature

* note broken links is only for prod build

* fix broken link on template

* fix test snapshot

* fix bad merge
2020-07-21 19:13:34 +02:00
Sébastien Lorber
f4434b2e42
feat(v2): absolute slugs and slug resolution system (#3084)
* rework slug to allow absolute slugs and slug resolution

* add slug metadata tests

* refactor docs metadata test + fix slug bugs

* fix tests

* fix docs tests failing due to randomness + update snapshot

* add test for addLeadingSlash
2020-07-21 18:26:30 +02:00
Sébastien Lorber
6730590c1e
refactor(v2): async md image transformer + pathname protocol as an escape hatch (#3087)
* async md image transformer + pathname protocol as an escape hatch

* make error messages computer agnostic by using relative paths

* fix error message relative path
2020-07-21 17:45:06 +02:00
Arsalan Khattak
3e22c1ae5c
doc(v2): replace heading position (#3086) 2020-07-21 17:40:36 +02:00
Anshul Goyal
3155dc30dc
feat(v2): support for adding relative images and handling broken image links (#3069)
* all relative path in image url

* throw error if file doesn't present

* better error

* add @docusaurus/core to deps

* fix test
2020-07-21 15:27:45 +02:00