[v2] Proposal: Official CodeSandbox Template
See original GitHub issueHi there! I’m part of the team over at @codesandbox and we’ve recently been working on a new feature set that allows our users to create their own custom Templates, which like our official templates allows them to quickly start a new project from pre-configured boilerplate code. This functionality is similar to what you might find in a CLI scaffolding tool, such as the one Docusaurus v2 features.
Recently I took the time to see if Docusaurus v2 would run inside of our container sandboxes, which it indeed does with the minor addition of a sandbox.config.json to specify the execution environment (without it, our GitHub importer defaults to react based on the project’s dependencies). You can check out an example template here:
https://codesandbox.io/s/docusaurus-template-8hm7z
This template was created by first using our GitHub importer, which allows us to take the content of any repository or a subfolder within a repository to quickly create a new sandbox. In this case, I simply ran your CLI tool to generate the new project files and added the above mentioned config file. Here’s an example from our templates repository and an import link to create a new sandbox from that repo:
One of our goals with Templates is that we want to empower framework developers to quickly add and maintain their own templates inside of CodeSandbox, which the community can then subscribe to in order to quickly create new sandboxes. We’re still nailing down the exact flow for linking a Template to a GitHub repository, but it is a key milestone on our roadmap as our plan is to move all of our official templates to repositories. The goal here is that we want to provide a better experience for users by allowing both framework maintainers and the open source community to quickly make updates and resolve issues without necessitating involvement on our part.
So as far as my proposal goes, Docusaurus could create and maintain their own custom template by adding a new package to the packages directory of this repository, which would contain the output from the CLI plus the required config file, similar to the example linked above. I’ll keep in contact and provide support in setting up a template based on that package once everything is in place on our end. From there, it would be the Docusaurus team’s responsibility to keep that package up to date, which would keep the linked template up to date as well.
I would very much like to hear your thoughts on this! Any feedback you might have would be highly appreciated!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:20 (9 by maintainers)

Top Related StackOverflow Question
I’m going to work on this issue
That sounds good to me! Let me know if you have any other questions and I’ll do my best to come up with solutions.