Commit graph

483 commits

Author SHA1 Message Date
Rhys Arkins
6930e91508
fix: add repository metadata to all packages (#3613)
* fix: add repository metadata to all packages

* empty commit for cla bot

* move validate-package-json.test.ts + add glob devDependency

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-10-21 15:05:01 +02:00
Sébastien Lorber
14447707c2
chore(v2): prepare v2.0.0.alpha-66 release (#3608)
* release alpha 66

* v2.0.0-alpha.66
2020-10-19 19:44:26 +02:00
Sébastien Lorber
e4c1626106
feat(v2): blog sidebar (#3593)
* blog sidebar POC

* polish blog post sidebar

* add doc for blogSidebarCount

* Update packages/docusaurus-theme-classic/src/theme/BlogSidebar/styles.module.css

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-10-16 19:12:05 +02:00
DeadEnglish
d1510770f4
feat(v2): add option for blog meta title #3571
* feat(blog-meta-title): add support for additional meta title

* retrocompatible blog title

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-10-12 13:23:54 +02:00
Alexey Pyltsyn
f5f2064656
chore(v2): prepare v2.0.0.alpha-65 release (#3525)
* chore(v2): prepare v2.0.0.alpha-65 release

* v2.0.0-alpha.65
2020-10-02 17:09:16 +03:00
Rémi Doreau
d3a01458a3
feat(v2): add beforeDefaultRemarkPlugins/beforeDefaultRehypePlugins options to all md content plugins (#3467)
* fix(plugin-content-docs): add beforeDefaultRemarkPlugins + beforeDefaultRehypePlugins options

* fix(plugin-content-blog): add beforeDefaultRemarkPlugins + beforeDefaultRehypePlugins options

* fix(plugin-content-pages): add beforeDefaultRemarkPlugins + beforeDefaultRehypePlugins options

* feat(website-docs): overriding remark-rehype plugins

* fix(plugin-content): update beforeDefaultRehypePlugins/beforeDefaultRemarkPlugins types

* fix(plugin-content-docs): fix tests
2020-09-29 14:48:34 +02:00
Sébastien Lorber
9bf4dfb275
chore(v2): prepare v2.0.0.alpha-64 release (#3440)
* add 2.0.0 alpha 64 files

* v2.0.0-alpha.64
2020-09-11 20:35:05 +02:00
Sébastien Lorber
306122e3b1
chore(v2): upgrade webpack/workbox related deps to get rid of serialize-javascript 3.x security issues (#3439) 2020-09-11 18:36:13 +02:00
Sébastien Lorber
8af3ad4250
chore(v2): prepare v2.0.0.alpha-63 release (#3400)
* add alpha 63 + remove +3month old versions

* update publish guide

* v2.0.0-alpha.63
2020-09-03 18:52:03 +02:00
Sébastien Lorber
ab3ebdad39
chore(v2): pin exact dependency versions (#3386)
* Attempt to pin all dependency versions exactly for https://github.com/facebook/docusaurus/issues/3371

* warn if @docusaurus package versions mismatch

* fix yarn lock
2020-09-02 11:42:17 +02:00
Sébastien Lorber
1eb6e13fb7
fix(v2): reject routeBasePath: '' (#3377)
* routeBasePath: '' should be forbidden

* routeBasePath: '' should be forbidden

* commit

* try to trigger cla bot
2020-08-31 19:59:27 +02:00
Sébastien Lorber
4f448bd54b
chore(v2): prepare v2.0.0.alpha-62 release (#3359)
* Add alpha 62

* v2.0.0-alpha.62
2020-08-28 19:17:56 +02:00
Sam Zhou
16ae3bf462
fix(v2): Add missing dependencies to packages (#3355) 2020-08-28 15:04:44 +02:00
Sam Zhou
bd9b6618c1
feat(v2): Provide typing to most of the theme-classic components (#3348)
* feat(v2): Provide typing to most of the theme-classic components

* Expose type to the end users and dogfood it in v2 website
2020-08-28 12:06:37 +02:00
Bogdan Doroschenko
3ccca399f1
test(v2): make blog posts unit test ordering determinate (#3339) 2020-08-27 10:09:43 +02:00
Sam Zhou
b38f562322
chore(v2): Define type for markdown right table of contents (#3306) 2020-08-20 17:57:19 +02:00
Jean-Marc Saad
3ea2f8cfde
feat(v2): blog slug frontmatter (#3284) 2020-08-20 14:59:54 +02:00
Sam Zhou
5fdf96c552
feat(v2): Provide blog plugin theme typing (#3267)
* feat(v2): Provide blog plugin theme typing

* Update packages/docusaurus-plugin-content-blog/index.d.ts

* Update packages/docusaurus-plugin-content-blog/index.d.ts

* Update packages/docusaurus-plugin-content-blog/index.d.ts

* Update packages/docusaurus-plugin-content-blog/index.d.ts

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-17 18:25:02 +02:00
Teik Jun
fda1590b0d
fix(v2): modify validation schema and tests for rehype/remark + remove duplicate dependency (#3247)
* chore(v2): remove duplicate dependency

* fix(v2): make changes to validation for rehype and remark plugins

* style(v2): run prettier
2020-08-11 15:17:23 +02:00
Anshul Goyal
181a6174c7
fix(v2): relax URI validation (#3227)
* relax URI validation

* add regex

* add test

* fix linting error

* fix formatting

* use URL rather than regex
2020-08-07 22:11:19 +02:00
Sébastien Lorber
fe281a8ebe
feat(v2): debug pages + debug layout + ability to debug content (#3229)
* improve debug plugin:
- add multiple debug pages + debug layout
- ability to debug plugin contentLoaded data

* add missing dependency

* fix broken test

* improve content rendering a bit

* create basic DebugJsonView

* fix ReactJson SSR issues
2020-08-07 11:47:43 +02:00
Sébastien Lorber
59f705ee66
feat(v2): blog + docs multi-instance plugins (#3204)
* stable createData namespacing + second-blog dogfooding

* Docs: support multi-instance + make community docs a separate instance

* tests: add 2nd docs instance to versioned site

* fix docs version cli tests

* fix docs versioning cli

* typo

* team: add link to my site

* better extendCli integration

* fix metadata tests

* tests for versioned site with second docs instance

* move some validation code to utils-validation

* fix missing dependency

* fix bad compiled output due to importing constants in ./client folder

* make docs tests easier to maintain

* refactors

* prevent lodash imports in client bundle

* redirect old community docs to new urls
2020-08-05 18:27:55 +02:00
Sébastien Lorber
48b996773c
chore(v2): prepare v2.0.0.alpha-61 release (#3182)
* alpha 61 release

* doc prettier

* v2.0.0-alpha.61
2020-08-01 15:24:46 +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
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
Bucky Maler
e9a2b1d9c6
fix(v2): inability for users to pin their docusaurus version (#3162) 2020-07-30 14:44:39 +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
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
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
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
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
Sébastien Lorber
15e73daae7
feat(v2): global data + useGlobalData + docs versions dropdown (#2971)
* doc components initial simplification

* doc components initial simplification

* add docContext test

* Add poc of global data system + use it in the theme

* Revert "doc components initial simplification"

This reverts commit f657b4c4

* revert useless changes

* avoid loosing context on docs switch

* fix docs tests

* fix @generated/globalData ts declaration / es import

* typo

* revert bad commit

* refactor navbar in multiple parts + add navbar item types validation + try to fix remaining merge bugs

* add missing watch mode for plugin debug

* fix docs global data integration, move related hooks to docs plugin + convert to TS

* change versions link label

* fix activeClassName react warning

* improve docs global data system + contextual navbar dropdown

* fix bug preventing the deployment

* refactor the global data system to namespace automatically by plugin name + plugin id

* proper NavbarItem comp

* fix tests

* fix snapshot

* extract theme config schema in separate file + rename navbar links to navbar items

* minor typos

* polish docs components/api

* polish useDocs api surface

* fix the docs version suggestions comp + data

* refactors + add docsClientUtils unit tests

* Add documentation

* typo

* Add check for duplicate plugin ids detection

* multi-instance: createData plugin data should be namespaced by plugin instance id

* remove attempt for multi-instance support
2020-07-21 11:16:08 +02:00
Sébastien Lorber
9265de982b
chore(v2): refactor scripts + add theme-classic watchmode (#2998) 2020-07-01 18:30:44 +02:00
Teik Jun
0f59cd1599
feat(v2): add option validation for remaining official plugins (#2970)
* feat(v2): add option validation lifecycle method

* chore(v2): add dependencies

* chore(v2): add yup dependency

* feat(v2): add option validation for plugin-content-docs

* chore(v2): add facebook copyright

* refactor(v2): remove unused variable

* chore(v2): add dependencies

* chore(v2): add copyright

* fix(v2): use strict for option validation

* feat(v2): add option validation for plugin-content-pages

* feat(v2): add schema for plugin-google-analytics and plugin-google-gtag

* feat(v2): add option validation for plugin-sitemap

* chore(v2): add dependency for yup

* fix(v2): remove strict to allow normalization

* refactor(v2): refactor validate method

* feat(v2): modify existing tests

* feat(v2): add tests for plugin normalization

* style(v2): use a more descriptive filename for schema

* feat(v2): add normalization tests

* feat(v2): add more tests for option validation

* refactor(v2): remove unused code

* refactor(v2): remove unused code

* refactor(v2): refactor methods and types

* feat(v2): replace Yup with Joi

* fix(v2): fix plugin-content-docs schema

* feat(v2): modify tests for plugin-content-docs

* fix(v2): fix a typo

* refactor(v2): improve tests and refactor code

* feat(v2): support both commonjs and ES modules

* refactor(v2): refactor validateOption method

* style(v2): fix eslint errors and typo in types

* chore(v2): remove unused yup dependency

* style(v2): standardize naming across official plugins

* chore(v2): update test snapshots

* chore(v2): remove obsolete snapshots

* chore(v2): fix a typo and check test

* feat(v2): add validation for new field

* feat(v2): add test for new field
2020-06-26 15:14:59 +02:00
Anshul Goyal
81d855355e
feat(v2): option and config validation life cycle method for official plugins (#2943)
* add validation for blog plugin

* fix wrong default component

* fix test and add yup to package.json

* remove console.log

* add validation for classic theme and code block theme

* add yup to packages

* remove console.log

* fix build

* fix logo required

* replaced yup with joi

* fix test

* remove hapi from docusuars core

* replace joi with @hapi/joi

* fix eslint

* fix remark plugin type

* change remark plugin validation to match documentation

* move schema to it's own file

* allow unknown only on outer theme object

* fix type for schema type

* fix yarn.lock

* support both commonjs and ES modules

* add docs for new lifecycle method
2020-06-24 20:08:16 +02:00
Sam Zhou
6e43c9bd34
chore(v2): Fix more eslint errors (#2976) 2020-06-21 15:09:00 +08:00
Sam Zhou
3611c96f90
chore(v2): Fix a lot of eslint warnings (#2972) 2020-06-20 12:30:18 +08:00
slorber
16ba6e54b6 v2.0.0-alpha.58 2020-06-18 14:02:26 +02: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
025ac4e28c
refactor(v2): legacy export = syntax (#2948) 2020-06-17 01:55:14 +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
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
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
Alexey Pyltsyn
d8ebe8b2e4 v2.0.0-alpha.56 2020-05-27 20:18:28 +03:00
Sam Zhou
33b60c6ba4
fix(v2): Consistently use 10.15.1 as the minimum required node version (#2819) 2020-05-27 23:18:48 +08:00
Sam Zhou
705f8f3c51
fix(v2): Consistently use require.resolve in official plugins to resolve modules (#2797)
* fix(v2): Use require.resolve to resolve loaders in official plugins

* Use require.resolve to resolve client modules
2020-05-23 11:26:50 +08:00
Alexey Pyltsyn
d94a549cfb v2.0.0-alpha.55 2020-05-19 13:55:03 +03:00
Yamagishi Kazutoshi
57c7550a87
fix(v2): add routeBasePath to feed link (#2691) 2020-04-29 23:22:42 +08:00
Alexey Pyltsyn
753d117025 v2.0.0-alpha.54 2020-04-28 09:49:27 +03:00