Sam Ko
2a3fe86579
docs(v2): update Deploy to Vercel guide ( #3344 )
2020-09-01 12:14:39 +02:00
Sébastien Lorber
d8cfabb66a
feat(v2): docs options.onlyIncludeVersions ( #3373 )
...
* docs options.onlyIncludeVersions
* adapt docsVersionDropdown if we render a single version
* fix bad error message
* fix netlify deploy when versioning is disabled
2020-08-31 17:08:24 +02:00
Thad Guidry
149d82c730
docs(v2): fix grammar on introduction page ( #3369 )
2020-08-31 01:16:12 +08:00
Sébastien Lorber
ae877f2990
feat(v2): docs version configuration: lastVersion, version.{path,label} ( #3357 )
...
* add new docs versioning options
* Add some tests for new versioning options
* Add some docs for version configurations
* try to fix broken link detection after /docs/ root paths have been removed on deploy previews
* improve dev/deploypreview versioning configurations
* disable custom current version path, as it produces broken links
* readVersionDocs should not be order sensitive
* fix versions page according to versioning config
* fix versions page according to versioning config
2020-08-28 18:37:49 +02:00
Sébastien Lorber
c7fc781ce0
fix(v2): linking to asset or external html page -> don't use history.push() ( #3347 )
...
* Rework markdown links to asset require processing + add test page
* implement pathname:// protocol / escape hatch at the Link level
* linking to assets: fix tests + avoid creating an useless nested paragraph
* fix assets linking doc
* attempt to fix windows e2e test
* try to fix windows errors
2020-08-28 12:47:03 +02:00
Fanny
8c05aa8e94
feat(v2): bootstrap theme, preset, template, CI previews ( #2981 )
...
* 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): Add bootstrap doc
* docs(v2): Update preset
* doc(v2): finish bootstrap documentation
* chore(v2): run lint
* doc(v2): update hook
* fix theme bootstrap layout (far from perfect)
* Try to fix bootstrap theme and deploy it!
* fix netlify error
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-08-17 20:18:37 +02:00
Orta Therox
33ecc4bb17
chore(v2): tighten up the TypeScript onboarding ( #3244 )
...
* Tighten up the TypeScript onboarding
* Extend the API to cover everything used in the classic theme
* Wrap up internal TS support
2020-08-17 18:03:21 +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
Amy Lei
473d263469
feat(v2): add toc to blog posts ( #3274 )
...
* refactor TOC into own component
* make layout consistent across blog pages
2020-08-17 14:47:19 +02:00
Hani Mohammed
826dc8dc02
docs(v2): fix typo ( #3271 )
...
* docs(v2): fix typo
* @thehanimo docs(v2): fix typo in website/docs
* Update website/docs/deployment.md
* Update website/versioned_docs/version-2.0.0-alpha.61/deployment.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-14 12:11:40 +02:00
Franklyn Chisom
0d489aeb9e
docs: corrected some few typos in the docusaurus tech docs ( #3276 )
...
* corrected some few typos
* Update blog.md
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-08-14 11:38:54 +02:00
Bogdan
b75a7150b2
docs(v2): fix migration command ( #3249 )
2020-08-11 17:16:48 +02:00
Sébastien Lorber
0a33a52301
fix(v2): deprecate docs homePageId in favor of frontmatter "slug: /" ( #3228 )
...
* homePageId => deprecated
* docs prettier
2020-08-06 18:31:50 +02:00
Anshul Goyal
ef9314e5a4
feat(v2): update swizzle command to suggest component/theme ( #3021 )
...
* update swizzle command
* change messages
* fix formatting
* add docs
* fix component lisiting
* allow themes to provide a list for safe swizzle components
* support both commanjs and ES exports
* fix debug plugin doesn't swizzle
* add dos
* remove unsed file
* fix docs plugin not swizzle properly
* fix console.log
* use new validate
* fix linting
* use config options for plugin
* rerun test
* fix type
* add a comment
* Update packages/docusaurus/src/commands/swizzle.ts
* Update packages/docusaurus/src/commands/swizzle.ts
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-06 13:53:03 +02:00
Anshul Goyal
f234c407f1
feat(v2): add support to ignore files in pages plugin ( #3196 )
...
* add support to ignore pages
* fix import problem
* Update website/docs/guides/creating-pages.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Revert "fix import problem"
This reverts commit 4457a2e938
.
* revert
* fix slash
* forbid frontmatter
* fix formatting
* Update website/docs/guides/creating-pages.md
* Update website/src/pages/examples/_chapter1.md
* Update website/src/pages/examples/_chapter2.mdx
* Update website/src/pages/examples/markdownPageExample.md
* Update website/src/pages/examples/markdownPageExample.md
* Update website/src/pages/examples/markdownPageExample.md
* Update website/src/pages/examples/markdownPageExample.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-05 21:35:55 +02:00
Anshul Goyal
25b70b5342
fix(v2): fix svg loader ( #3202 )
...
* fix loader
* Update website/docs/markdown-features.mdx
* Update website/docs/markdown-features.mdx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-05 19:19:20 +02:00
Drew Alexander
fdf08e787f
docs(v2): Added switch config docs to theme-classic API ( #3194 )
...
* Reduce commented info in API
* Update yarn lock
* Add switch config documentation to theme-classic
* Expand highlighted code block
* Add unicode example to icons
* Punctuation and white space fixes
* Revert changed comment
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Remove camel case comment
* Revert api style comment
* Revert "Update yarn lock"
This reverts commit 5b5b3d39a1
.
* Update website/docs/theme-classic.md
* Update website/docs/theme-classic.md
* Update website/docs/theme-classic.md
* Update website/docs/theme-classic.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-05 18:54:41 +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
alex busnelli
0d7314a6f7
docs(v2): removed duplicate text under "Using React" section ( #3201 )
...
* removed duplicate text under "Using React" section
* docs(v2): removed duplicate text under "Using React" section in trunk docs
2020-08-04 07:30:22 +08:00
Anshul Goyal
325559933f
feat(v2): add support to import assets using relative link in markdown syntax ( #3096 )
...
* add a rehyper plugin
* fix yarn.lok
* add target
* convert to remark
* add docs
* remove unused package
* remove file-loader
* add test for file-loader
* fix test
2020-08-03 15:19:12 +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
Teik Jun
300aecb8bc
feat(v2): warn user when there are conflicting routes ( #3083 )
...
* feat(v2): add warning for path override
* feat(v2): check all routes recursively
* docs(v2): add docs for conflicting routes
* style(v2): improve comments in code
* refactor(v2): remove unused lifecycle method from docs plugin
* Revert "refactor(v2): remove unused lifecycle method from docs plugin"
This reverts commit 8b2caaa091
.
* feat(v2): add option for changing duplicate path behavior
* feat(v2): decouple logging from logic and detect duplicate routes in one pass
* test(v2): fix failing tests
* test(v2): add tests for duplicateRoutes
* test(v2): add test for handleDuplicateRoutes
* style(v2): add else statement
* docs(v2): modify documentation for duplicate routes
* docs(v2): move doc into guides folder
* fix(v2): fix broken links
* docs(v2): move docs for docusaurus config into api folder
* style(v2): add comments
* refactor(v2): extract getFinalRoutes
* refactor(v2): scope getFinalRoutes to docusaurus package
* test(v2): remove obsolete snapshots
* docs(v2): remove some docs
* fix(v2): rerun github actions
* docs(v2): change slug of docs in api folder
* refactor(v2): extract out a reportMessage method
* refactor(v2): extract getAllFinalRoutes
* test(v2): replace snapshots with actual value
* style(v2): remove unnecessary comment and change type
* chore(v2): remove unused dependency
* style(v2): remove unused code
* Update packages/docusaurus/src/server/utils.ts
* Update website/docs/guides/creating-pages.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-07-31 21:14:49 +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
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
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
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
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
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
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
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
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
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
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
Anshul Goyal
a51a56ec42
feat(v2): add support for serve command ( #3080 )
...
* add support for serve command
* add serve to init
* use existing choosePort function
* add --host
* add more docs
* add docs to deployment
2020-07-20 19:00:37 +02:00
Sébastien Lorber
1272ab83fb
feat(v2): useDocusaurusContext().siteMetadata ( #3058 )
2020-07-16 12:46:21 +02:00
Teik Jun
11751c20b0
docs(v2): correct the documentation for doc-only mode ( #3040 )
2020-07-09 17:15:23 +02:00
Sébastien Lorber
a8b2e59a48
feat(v2): add useBaseUrlUtils() hook ( #3033 )
...
* add useBaseUrlUtils
* fix code highlighted lines
2020-07-08 17:51:59 +02:00
Jeremy Asuncion
9b3da59886
feat(v2): Plugin for Offline/PWA support ( #2205 )
...
* implement PWA plugin
* added pwa support for docusaurus website
* moved sw registration to client module
* moved compile function to webpack util
* build sw using webpack and render pwa popup
* implement @theme/PwaReloadPopup
* update website sw to use modules
* updated pwa readme
* fix header lint errors
* apply code formatting
* cache files only for mobile, saveData, or installed pwa
* added comments about clearing registrations
* fixed prettier error
* updated pwa README
* fix README JS
* move /blog => /blog/index.html logic to else branch
* add `alwaysPrecache` option
* updated docusaurus-plugin-pwa version
* added pwa to using-plugins.md
* review fixes
* re-disable restricted-globals to use self in service worker
* useless doc
* Update packages/docusaurus-plugin-pwa/README.md
Co-authored-by: Reece Dunham <me@rdil.rocks>
* Update packages/docusaurus-plugin-pwa/README.md
* update a bit pwa doc + minor refactors
* minor refactors + add workbox debug mode
* env PWA_ prefix
* typo
* minor refactor
* fix file output
* add serve:v2:ssl yarn command
* minor pwa fixes
* typo
* add dynamic import comment in SW
* comment
* let the PWA plugin implement its reload popup on his own
* pwa: add Joi options validation
* pwa plugin should have its own webpack/babel custom setup
* PWA:
- debug logs
- better SW params system
- offline mode activation strategies
- docs
* add pwa install gif
* pwa: popup -> reloadPopup + minor refactors
* fix process.env reading + better debug log
* minor fixes
* minor changes
* minor changes
Co-authored-by: slorber <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Reece Dunham <me@rdil.rocks>
2020-07-08 12:32:41 +02:00
Sébastien Lorber
8aa6ef47e4
feat(v2): configureWebpack merge strategy + use file-loader for common asset types ( #2994 )
...
* Add some default asset loaders
Add webpack merge strategy feature to enable plugins to prepend some webpack configuration (like the ideal image plugin that should override the default image loader)
* Add documentation for using assets from markdown
* add path prefix for webpack file loader
* renaming
* document Merge strategies
* rename mergeStrategies -> mergeStrategy
2020-07-01 19:06:02 +02:00
Sébastien Lorber
a5b2b6056b
feat(v2): add disableVersioning config to docs plugin ( #2989 )
...
* add disableVersioning config to docs plugin
* fix test
* fix test
2020-07-01 19:03:59 +02:00
Teik Jun
086d1b7135
fix(v2): fix broken links on versions page ( #3017 )
...
* fix(v2): fix broken links on versions page
* fix(v2): fix broken link to remark and rehype
2020-07-01 12:04:53 +02:00
Sébastien Lorber
c2bb03ab00
fix(v2): refactor color mode system ( #3012 )
...
* refactor color mode system to enable all possibilities
* fix destructuring bug
* colorMode validation + deprecation + minor name changes + doc
* rename method noFlashColorMode
* fix doc wording
* docs wording
* docs wording
* re-enable theme config merging/normalization + colorMode fixes
* document theme normalization
* code review changes
2020-06-30 12:21:20 +02:00
Sam Zhou
ec3c281952
docs(v2): Document TypeScript support ( #2997 )
2020-06-26 12:09:21 +02:00
Alexey Pyltsyn
bdffd28b9f
feat(v2): allow skipping build docs for next version ( #2877 )
...
* feat(v2): allow skipping build docs for next version
* Refactor
* Refactor
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-06-25 17:21:05 +02:00