Skip to content

feat(v2): blog + docs multi-instance plugins - #3204

Merged
slorber merged 17 commits into
masterfrom
slorber/multi-blog
Aug 5, 2020
Merged

slorber merged 17 commits into
masterfrom
slorber/multi-blog

Conversation

@slorber

@slorber slorber commented Aug 4, 2020 •

Copy link
Copy Markdown
Collaborator

Motivation

We should support multi-instance for the existing plugins, docs + blog.

Namespacing createData by pluginName/pluginId (it could work without, if file names are all hashed, but namespacing seems safer to me)

Dogfooding:

The docs versioning cli should work for both docs instances in a retrocompatible way.

I choose to add different command names, as we'd otherwise register twice the same command, and it would complicated to generate some kind of generic --pluginId option without any breaking change.

  docs:version <version>                                   Tag a new docs version
  docs:version:community <version>                         Tag a new docs version (community)

Other things done in this PR:

  • refactor docs tests to make them more maintainable
  • move some validation logic to docusaurus/utils-validation
  • redirect old URLs like /docs/next/team

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Tests + Dogfooding:

Docs

Only the blog multi-instance has been documented a bit.

I don't document docs multi-instance now (or provide path customization options), because I want to do some breaking changes (particularly moving sidebars.js inside the docs folder, and renaming it to ./config.js)

@slorber
slorber requested a review from yangshun as a code owner August 4, 2020 09:48
@slorber slorber changed the title feat(v2): blog + docs multi-instance feat(v2): blog + docs multi-instance plugins Aug 4, 2020
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 4, 2020
@slorber slorber added pr: new feature This PR adds a new API or behavior. and removed CLA Signed Signed Facebook CLA labels Aug 4, 2020
@slorber
slorber marked this pull request as draft August 4, 2020 09:49
@docusaurus-bot

docusaurus-bot commented Aug 4, 2020 •

Copy link
Copy Markdown
Contributor

@slorber
slorber marked this pull request as ready for review August 4, 2020 16:46
@slorber slorber added the CLA Signed Signed Facebook CLA label Aug 4, 2020
@slorber
slorber merged commit 59f705e into master Aug 5, 2020
@yangshun
yangshun deleted the slorber/multi-blog branch August 26, 2020 02:00
@greenpau greenpau mentioned this pull request Nov 4, 2021
7 tasks done
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants