Commit graph

359 commits

Author SHA1 Message Date
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
Alexey Pyltsyn
d90fdb04d5 v2.0.0-alpha.53 2020-04-27 16:38:33 +03:00
Alexey Pyltsyn
7359945f52 v2.0.0-alpha.52 2020-04-27 16:30:15 +03:00
Alexey Pyltsyn
c9c5aedcb5 v2.0.0-alpha.51 2020-04-27 14:44:56 +03:00
Alexey Pyltsyn
9e1f816fcd
fix(v2): use remark-admonitions separately in each plugin instead of in preset only (#2642)
* fix(v2): use remark-admonitions separately in each plugin instead of in preset only

* Update types.d.ts

* Update types.d.ts

* Address fixes from review

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-24 12:18:54 +08:00
Alexey Pyltsyn
5eba5f24a2
fix(v2): use synchronous write for generate blog feeds (#2540)
* fix(v2): use synchronous write for generate blog feeds

* FIx code style
2020-04-05 23:09:28 +08:00
Alexey Pyltsyn
1f00d15c74 chore(v2): fix code style (revert previous changes) 2020-04-05 17:38:12 +03:00
Alexey Pyltsyn
6965a668cd chore(v2): fix code style 2020-04-05 17:30:59 +03:00
Yangshun Tay
b07507c9cc
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies

* chore(v2): upgrade devDependencies

* chore: prettier
2020-04-05 19:07:44 +08:00
Fanny
5e664a1f26
feat(v2): add edit url in post page (#2524)
* Add edit page url in docs

* feat(v2): Create EditPage component

* feat(v2): Improve component

* Add test

* çhore(v2): update description

* çhore(v2): update url

* fix(v2): test

* fix(v2): test

* feat(v2): change the prop of EditPage component

* chore(v2): Remove packages

* feat(v2): Update old tests

* chore(v2): fix package

* fix(v2): fix editUrl

* docs(v2): document editUrl

* --

* --

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-05 17:34:48 +08:00
José Renan
95fdfe7e15
feat(v2): add blog post estimated reading time (#2531)
* feat: add estimated reading time to blog posts

* docs: add showReadingTime on plugin docs

* test: update plugin-content-blog tests to cover readingTime

* Update index.js

* Update using-plugins.md

* Update index.js

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-05 15:08:42 +08:00
Alexey Pyltsyn
c207c3ba31 v2.0.0-alpha.50 2020-04-02 21:00:47 +03:00
Alexey Pyltsyn
9cff1bb9e4
chore(v2): upgrade deps (#2508) 2020-04-02 19:05:03 +08:00
Yangshun Tay
409f169379 v2.0.0-alpha.49 2020-04-01 16:00:14 +08:00
Bartosz Kaszubowski
85c124e3f1
chore(v2): use single method package instead of whole Lodash package in blog plugin (#2460) 2020-03-25 18:28:27 +08:00
Alexey Pyltsyn
38bb8c4ced v2.0.0-alpha.48 2020-03-09 01:46:10 +03:00
Alexey Pyltsyn
1dc1f21e91 v2.0.0-alpha.47 2020-03-08 23:40:44 +03:00
Alexey Pyltsyn
9d45993da2 v2.0.0-alpha.46 2020-03-08 23:29:42 +03:00
Alexey Pyltsyn
bbb465be02 v2.0.0-alpha.45 2020-03-08 23:07:13 +03:00
Yangshun Tay
1e09feb2db v2.0.0-alpha.44 2020-03-08 23:45:30 +08:00
Alexey Pyltsyn
36163773ec
fix(v2): linkify blog posts (#2326)
* fix(v2): linkify blog posts

* Fix tests
2020-02-29 14:49:00 +08:00
Alexey Pyltsyn
84eeb5120c
feat(v2): add draft feature to blog posts (#2335) 2020-02-29 13:19:59 +08:00
Yangshun Tay
32c1a92b17
chore: yearless copyright headers for source code (#2320)
* chore: yearless copyright headers for source code

* update snapshots
2020-02-25 23:12:28 +08:00
Yangshun Tay
996b115199
misc(v2): clean up comments in code (#2294) 2020-02-18 21:29:23 +08:00
Yangshun Tay
3056479ed2 v2.0.0-alpha.43 2020-02-18 18:54:39 +08:00