Giter Club home page Giter Club logo

html-template's Introduction

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/[email protected]

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

Name Description Required Default Allowed values Example
sidebarOrganization Defines 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. No undefined byTags, byTagsNoRoot byTagsNoRoot
baseHref Sets the base URL for links and forms. No / Any /docs
version Override the version of your application provided under info.version location in the specification file. No Version is taken from the spec file. Any (See Semver versioning) 1.0.0
singleFile Set output into one html-file with styles and scripts inside. No false true,false true
outFilename The filename of the output file. No index.html Any asyncapi.html
pdf Generates output HTML as PDF. No false true, false true
pdfTimeout Timeout (in ms) used to generate the PDF. No 30000 >=0 1000
favicon Defines the URL/Path used for the favicon. No assets/asyncapi-favicon.ico Any valid favicon URL/Path. "https://studio.asyncapi.com/favicon.ico"
config Inline 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):

James Crowley
James Crowley

💻 🐛
Waleed Ashraf
Waleed Ashraf

💻 🐛
Julian Rabe
Julian Rabe

💻
Sebastián
Sebastián

⚠️ 💻
Gordeev Artem
Gordeev Artem

💻
Mitchell Sawatzky
Mitchell Sawatzky

💻
Talmiz Ahmed
Talmiz Ahmed

💻
Jürgen B.
Jürgen B.

🚇
Gabriel Claudino
Gabriel Claudino

💻
Barbara Szwarc
Barbara Szwarc

📖
Julian S.
Julian S.

💻
Ludovic Dussart
Ludovic Dussart

💻
David Weber
David Weber

💻
Maciej Urbańczyk
Maciej Urbańczyk

💻 ⚠️ 🐛 🚧 👀
Lukasz Gornicki
Lukasz Gornicki

🚧 💻 🐛 👀 ⚠️
Fran Méndez
Fran Méndez

🚧 💻 🐛 👀 ⚠️
Arya Gupta
Arya Gupta

📖

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

html-template's People

Contributors

allcontributors[bot] avatar anbreaker avatar asyncapi-bot avatar btodell avatar bufutda avatar c-zekeri avatar codingtenshi avatar dependabot[bot] avatar derberg avatar dweber019 avatar fmvilas avatar gabrielclaudino avatar gmin2 avatar gordeevart avatar hashtalmiz avatar jamescrowley avatar jarnorfb avatar jonaslagoni avatar juergenbr avatar khudadad414 avatar llobetrj avatar m3lkior avatar magicmatatjahu avatar raphaelletseng avatar schw4rzlicht avatar sebastian-palma avatar stavalfi avatar theeques avatar theiaz avatar waleedashraf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.