docusaurus-protobuffet-init
v0.3.0
Published
Create Docusaurus projects with Protobuffet preset enabled
Downloads
9
Maintainers
Readme
Docusaurus Project Generator with Protobuffet Preset
Visit the landing page for Protobuffet documentation.
Executable project generator based on @docusaurus/init
. This generator enhances the common template by also initializing the docusaurus-protobuffet
preset with recommended options and sample fixtures.
See docusaurus-protobuffet
for details on this preset.
See Docusaurus docs for details on the common template.
Usage
The package creates Docusaurus projects with the docusaurus-protobuffet
preset initialized. If you have an existing Docusaurus project where you would like to install docusaurus-protobuffet
, this package is not necessary.
Note: These commands should be run from your root directory where you would like the site to be created.
Run the generator. This will create a directory for your site with the generated files. You must specify the project_name
variable.
npx docusaurus-protobuffet-init init <project_name>
Start the development server to view the sample fixtures. See the configuration section for steps on introducing your own Protobuf workspace file.
cd <project_name>
npm run start
Proto doc files were generated for the sample fixture during project initialization. These will need to be generated whenever the fileDescriptorsPath
file (defaulted to ./fixtures/proto_workspace.json
) is updated. Read docusaurus-protobuffet CLI documentation
for details.
npx docusaurus generate-proto-docs
Since this is a normal Docusaurus project, you can follow their documentation for deployments and other details.
Configuration
The default setup configures fileDescriptorsPath
to ./fixtures/proto_workspace.json
. You can override this with your own Protobuf workspace file or update the options passed to docusaurus-protobuffet
within your docusaurus.config.js
file. Please see docusaurus-protobuffet
documentation for details.
The navbar configuration within docusaurus.config.js
points to one of the generated files of the sample fixture. You will need to update this route when using your own Protobuf workspace file.
Contributing
Contributions, issues and feature requests are always welcome!