Sébastien Lorber
f6ec757aa0
feat: npm init docusaurus, yarn create docusaurus ( #5635 )
...
* initial create-docusaurus impl
* cleanup
* @docusaurus/init renamed to create-docusaurus
* 0.0.6
* update lockfile
* fix lint
* remove npm2yarn for "npm init" because npm2yarn doesn't convert it and yarn result fails to execute
* prettier
* add correct version
* prettier
* prettier
* prettier
* prettier
* fix annoying --config .prettierrc issue
2021-10-07 16:06:42 +02:00
Joshua Chen
7f7b858cd4
refactor: make all Props defined as interface + readonly ( #5636 )
...
* Initial work
* Fix
2021-10-05 19:04:24 +02:00
Sébastien Lorber
42e70e6d42
feat: new docs options: versions.{badge,className} ( #5454 )
...
* docs: add versions.{badge,className} options
* remove badge option test
2021-08-31 15:40:37 +02:00
Joshua Chen
3fc47938a5
chore(mdx-loader): migrate package to TypeScript ( #5347 )
...
* Polish code style
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Partly done migration
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Complete typing
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tests
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* A-ha
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Cleanup
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix error
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Cleanup
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-12 14:55:14 +02:00
Sébastien Lorber
a2ab4d33c8
feat: Markdown page-specific head metadatas ( #5330 )
...
* Markdown page-specific head metadatas
* ensure mdxType attribute is not added to the final markup
* polish doc
* Update packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
* fix eslint annoying rule error
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-08-11 11:39:01 +02:00
Joshua Chen
28e25992ab
feat: new init template classic-typescript ( #5233 )
...
* Add typescript template
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update template
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Complete CLI
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove d.ts file
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Refactor
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert lock file changes
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Regenerate lock
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add stylelint ignore
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tsconfig
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Attempt to use symlink
* More symlinks
* Link all markdown
* Link source files
* Change to relative links
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix blogs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix link
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Link config
* Documentation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add option to index
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add option
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix copying
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Provide suffix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Always have colored output
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove return signature
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update generate examples
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update lock
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tsconfig
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use latest docusaurus
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update lock
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add type def
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* init: make classic first in list + mark as recommended + minor refactors
* remove types.d.ts
* add "yarn typecheck" script
* Minor tweaks
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Generate example for TS
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add comment
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* No emit when running tsc
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* FIx generate examples
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove compiler options
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* This looks better
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use new tsconfig
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-06 19:11:36 +02:00
Joshua Chen
462b1cf2bc
style(v2): reduce number of ESLint warnings ( #4993 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More fixes
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Update packages/docusaurus-theme-bootstrap/src/theme/ThemedImage/index.tsx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Replace versionPathPart with function
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Prefer non-null assertions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Substitute for-of with forEach
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fill `catch` block with placeholder comment
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Ignore local require
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert global require change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Tighten eslint disable range
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Make eslint ignore examples and more tolerating to templates
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use reduce to handle doc items sequentially
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert "Use reduce to handle doc items sequentially"
This reverts commit c7525d463b
.
* Address change requests
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-24 18:12:48 +02:00
Armano
15107ee099
refactor(v2): correct client types and type aliases ( #4451 )
2021-03-19 11:32:38 +01:00
Sam Zhou
83d043ecb3
chore(v2): Fix more linter warnings ( #4450 )
2021-03-18 18:05:09 +01:00
Sam Zhou
5e73c72f26
chore(v2): Fix linter warnings ( #4442 )
...
* chore(v2): Fix linter warnings
223 warnings to 145 warnings
* Remove explicit type annotations
* Do not prefetch when targetLink == null
2021-03-17 17:28:42 +01:00
Alexey Pyltsyn
643a1ffd7e
chore(v2): upgrade ESLint deps ( #3767 )
...
* chore(v2): upgrade ESLint deps
* Fix for no-redeclare rule
2020-11-18 17:52:50 +01:00
Sam Zhou
16ae3bf462
fix(v2): Add missing dependencies to packages ( #3355 )
2020-08-28 15:04:44 +02:00
Sébastien Lorber
a4c8a7f55b
refactor(v2): docs plugin refactor ( #3245 )
...
* safe refactorings
* safe refactors
* add code to read versions more generically
* refactor docs plugin
* refactors
* stable docs refactor
* progress on refactor
* stable docs refactor
* stable docs refactor
* stable docs refactor
* attempt to fix admonition :(
* configureWebpack docs: better typing
* more refactors
* rename cli
* refactor docs metadata processing => move to pure function
* stable docs refactor
* stable docs refactor
* named exports
* basic sidebars refactor
* add getElementsAround utils
* refactor sidebar + ordering/navigation logic
* stable retrocompatible refactor
* add proper versions metadata tests
* fix docs metadata tests
* fix docs tests
* fix test due to absolute path
* fix webpack tests
* refactor linkify + add broken markdown links warning
* fix DOM warning due to forwarding legacy prop to div element
* add todo
2020-08-17 17:50:22 +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
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
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
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
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
Fanny
434da1d7ea
feat(v2): bootstrap bootstrap (heh) theme, preset, template ( #2557 )
...
* feat(v2): Add bootstrap theme structure
* chore(v2): run prettier
* chore(v2): remove unused dependencies
* feat(v2): add bootstrap preset
* feat(v2): add bootstrap template
* remove unnecessary stuff
* --
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-09 12:58:01 +08:00
Yangshun Tay
c50df3003c
misc: update stylelint rule tester
2020-03-21 15:22:25 +08:00
Rémi Doreau
b4f4057d97
misc: improve stylelint rule ( #2415 )
...
* feat(header-lint): allow for rule configuration
* test(stylelint-copyright): moove implementation to jest
* test(stylelint-copyright): add missing check
* test(jest-setup): add linter
2020-03-21 12:42:10 +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
Alexey Pyltsyn
894dbcff49
chore(eslint): require curly brackets on all blocks ( #2239 )
2020-01-24 13:28:56 +08:00
Yangshun Tay
e39d76c40c
chore(v2): turn off import/extensions ESLint rule
2019-12-22 11:34:44 +08:00
Yangshun Tay
b6315f4136
feat(v2): add Facebook Docusaurus 2 template ( #2124 )
...
* feat(v2): add Facebook Docusaurus 2 template
* -
2019-12-15 17:16:27 +08:00
Endi
3be2e86546
chore: bump dev dependencies ( #1955 )
...
* chore: bump devdeps
* upd infima url
2019-11-11 17:44:26 +07:00
Endi
64fb7a2d0c
chore(v2): tweak eslint config ( #1445 )
2019-05-09 20:01:48 +07:00
Yangshun Tay
96cb4672d5
feat(v2): implement ComponentCreator ( #1366 )
...
* v2(feat): convert blog to view-driven content queries
* feat(v2): port blog to use ContentRenderer
* misc(v2): fix test and change ContentRenderer url
* avoid chunkName collision
* avoid chunkname collision more
* fix(v2): fix content-renderer ssr problem (#1367 )
* wip
* avoid chunk names collision
* ContentRenderer is a wrapper for Loadable
* convert docs and pages
* nits and rename
* rename routeModules -> modules
* remove lodash from component creator
* resolve chunk not being picked up correctly
* add comment for explanation
* small refactoring
2019-04-16 22:18:29 +08:00
Yangshun Tay
1edbeecbe5
chore(v2): add ESLint rule to check for Facebook copyright headers in JS files ( #1301 )
2019-03-24 14:50:26 +07:00
Endilie Yacop Sucipto
1f91d19a8c
chore: move to monorepo ( #1297 )
...
* chore: move to monorepo
* lint all js file
* simplify circleCI
* fix failing tests
* fix tests due to folder rename
* fix test since v1 website is renamed
2019-03-23 14:21:36 +07:00
Yangshun Tay
f2927a9fc4
Move Docusaurus 1 files into directory ( #966 )
...
* Move Docusaurus 1 into v1 directory
* Update Circle CI commands for new v1 dir
* Remove OC
* Fix tests
2018-09-18 00:58:07 +08:00
Yangshun Tay
a7a214fb3a
ESLintify Part 3 ( #846 )
...
* ESLintify Part 3
* ESLintify Part 3
* ESLintify Part 3
2018-07-11 18:21:31 +08:00
Yangshun Tay
5ac2cee658
ESLintify Part 2 ( #841 )
...
* ESLintify Part 2
* Fix
* Fix tests
* Fix tests
* Fix tests
2018-07-10 21:53:08 -07:00
Yangshun Tay
e8e3f42685
ESLintify Part 1 ( #837 )
...
* ESLint-ify
* Allow empty try/catch
* Escape regexp
2018-07-08 09:13:18 -07:00
Yangshun Tay
128dbfca0a
Tidy up ESLint usage ( #836 )
...
* Use Airbnb ESLint
* Turn off rules
* Add back
* add website to eslint precommit
* Add back
* remove useless escape
2018-07-07 15:25:14 +07:00
Endilie Yacop Sucipto
21dcea2a31
Integrate eslint & precommit to codebase ( #815 )
...
* add eslint, precommit & refactor
* fix exit code 127
* modify contributing.md & add package-lock
* use .eslintrc.js
2018-07-01 12:27:31 +08:00