2.3.5 • Published 8 days ago

@asyncapi/html-template v2.3.5

Weekly downloads
3,765
License
Apache-2.0
Repository
github
Last release
8 days ago

AsyncAPI HTML Template

HTML template for the AsyncAPI Generator using an AsyncAPI React Component under the hood.


All Contributors

npm


Usage

Install AsyncAPI CLI

npm install -g @asyncapi/cli

Generate using CLI

asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/html-template@0.28.0

You can replace <asyncapi.yaml> with local path or URL pointing to any AsyncAPI document. Look into Releases of this template to pick up the version you need. It is not recommended to always use the latest in production. Always use a specific version.

Supported parameters

NameDescriptionRequiredDefaultAllowed valuesExample
sidebarOrganizationDefines how the sidebar should be organized. Set its value to byTagsNoRoot to categorize operations by operations tags. Set its value to byTags when you have tags on a root level. These tags are used to model tags navigation and need to have the same tags in operations.NoundefinedbyTags, byTagsNoRootbyTagsNoRoot
baseHrefSets the base URL for links and forms.No/Any/docs
versionOverride the version of your application provided under info.version location in the specification file.NoVersion is taken from the spec file.Any (See Semver versioning)1.0.0
singleFileSet output into one html-file with styles and scripts inside.Nofalsetrue,falsetrue
outFilenameThe filename of the output file.Noindex.htmlAnyasyncapi.html
pdfGenerates output HTML as PDF.Nofalsetrue, falsetrue
pdfTimeoutTimeout (in ms) used to generate the PDF.No30000>=01000
faviconDefines the URL/Path used for the favicon.Noassets/asyncapi-favicon.icoAny valid favicon URL/Path."https://studio.asyncapi.com/favicon.ico"
configInline stringified JSON or a path to a JSON file to override default React component config. The config override is merged with the default config using the JSON Merge Patch algorithm.No{ "show": { "sidebar": true }, "sidebar": { "showOperations": "byDefault" } }JSON config for the React component{"show":{"sidebar":false}}

NOTE: If you only generate an HTML website, set the environment variable PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to true and the generator will skip downloading chromium.

Development

The HTML-Template is built with an AsyncAPI React Component. For any changes regarding the styling of the page, rendering of the missing/existing elements, please contribute to the AsyncAPI React Component repository.

If you want make changes in template itself, please follow:

  1. Make sure you have the latest generator installed: npm install -g @asyncapi/generator.
  2. Modify the template or its helper functions.

    NOTE: If you have to modify the dummy.yml file to develop your features, open a PR with the changes in the asyncapi/generator repository.

  3. Generate output with watcher enabled: npm run develop.

    NOTE: If your changes are not visible, this is maybe because the ag use the already installed html-template so you should use the --install option

    • run npm run develop:install
    • if command failed, delete the cached html-template module in your system and re-rerun the command
  4. Open HTML in your browser: open ./test/output/index.html.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

2.3.4

8 days ago

2.3.5

8 days ago

2.3.3

11 days ago

2.3.2

22 days ago

2.3.1

22 days ago

2.3.0

23 days ago

2.2.3

25 days ago

2.2.4

25 days ago

2.2.2

1 month ago

2.2.1

1 month ago

2.2.0

1 month ago

2.1.6

3 months ago

2.1.7

3 months ago

2.1.2

3 months ago

2.1.4

3 months ago

2.1.3

3 months ago

2.1.5

3 months ago

2.1.1

3 months ago

2.1.0

3 months ago

2.0.0

5 months ago

1.0.0

7 months ago

0.28.4

8 months ago

0.28.3

1 year ago

0.28.2

1 year ago

0.27.0

1 year ago

0.28.1

1 year ago

0.28.0

1 year ago

0.26.0

2 years ago

0.25.2

2 years ago

0.25.1

2 years ago

0.25.0

2 years ago

0.24.10

2 years ago

0.24.9

2 years ago

0.23.15

2 years ago

0.24.5

2 years ago

0.24.4

2 years ago

0.24.3

2 years ago

0.24.2

2 years ago

0.24.1

2 years ago

0.24.0

2 years ago

0.24.8

2 years ago

0.24.7

2 years ago

0.24.6

2 years ago

0.23.13

2 years ago

0.23.14

2 years ago

0.23.12

2 years ago

0.23.11

3 years ago

0.23.9

3 years ago

0.23.10

3 years ago

0.23.8

3 years ago

0.23.6

3 years ago

0.23.7

3 years ago

0.23.5

3 years ago

0.23.4

3 years ago

0.23.3

3 years ago

0.23.2

3 years ago

0.23.1

3 years ago

0.23.0

3 years ago

0.22.3

3 years ago

0.22.2

3 years ago

0.22.1

3 years ago

0.22.0

3 years ago

0.21.6

3 years ago

0.21.5

3 years ago

0.21.4

3 years ago

0.21.3

3 years ago

0.21.0

3 years ago

0.21.2

3 years ago

0.21.1

3 years ago

0.20.1

3 years ago

0.20.0

3 years ago

0.19.0

3 years ago

0.18.2

3 years ago

0.18.1

3 years ago

0.18.0

3 years ago

0.17.2

3 years ago

0.17.3

3 years ago

0.17.1

3 years ago

0.17.0

3 years ago

0.16.0

3 years ago

0.15.4

3 years ago

0.15.3

3 years ago

0.15.2

3 years ago

0.15.1

4 years ago

0.15.0

4 years ago

0.14.3

4 years ago

0.14.2

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.0

4 years ago

0.12.3

4 years ago

0.12.2

4 years ago

0.12.1

4 years ago

0.12.0

4 years ago

0.11.0

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.5.0

4 years ago

0.6.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago