Comments (11)
Thanks for opening the issue, @rv0. To clarify:
- We're talking about the HTML template, right?
- If we add a tags menu to the sidebar then the table of contents shouldn't be needed. Am I right?
- When you say hierarchical collapsible structure you mean 2 collapsible items like, for instance, Operations and Tags? Or you mean hierarchical by looking at the common beginning of a channel name?
from generator.
- yes, html template
- yes, tags in sidebar seems like nicest solution
- hierarchical with first level tags and 2nd level operations, like the small example above.. hierarchical with channel names would be very cool but seems outside of the scope of this FRQ
from generator.
I see. Just as a side note for the future implementer: the hierarchical organization on the sidebar could be driven by a special parameter for the HTML template. See #8.
For instance:
ag asyncapi.yaml html --params '{"sidebarOrganization":"hierarchical"}'
from generator.
I'm currently working on this issue. So far I have been able to implement the functionality of tags in the sidebar.
The user can click the tag which will reveal all topics associated with that particular tag.
However I ran into some trouble when trying to require the special parameter for the HTML template.
In the code I check if the parameter is present using:
{{#if params.sidebarOrganization}}
as mentioned in the referenced issue.
But when I use the CLI to try and generate the docs using the command:
ag asyncapi.yaml html --params '{"sidebarOrganization":"hierarchical"}'
I will get a JSON parse error saying: Unexpected token ' in JSON at position 0.
I've tried the parameter in a couple of different notations but none of them seem to work. Any ideas?
from generator.
Hey @GianniCoene. I'm trying exactly the same command and it works perfectly. Can you make sure you're running the latest version of the package? If the problem persists, what operating system and terminal are you using?
from generator.
Hello @fmvilas.
I'm using the most recent package. I'm using Windows 10 and CMD (the standard terminal that comes with it).
Just to be clear, the files do generate but I'm getting the --params error message saying they will not be available in the templates because of a parsing error.
from generator.
My guess is that it's a Windows CMD issue with double-quotes. Can you try the following:
ag asyncapi.yaml html --params '{\"sidebarOrganization\":\"hierarchical\"}'
from generator.
Turns out the problem was an issue with the double-quotes as you said. However I had to leave out the single-quotes as well. The following command works in the Windows CMD:
ag asyncapi.yaml html --params {\"sidebarOrganization\":\"hierarchical\"}
Thank you for the help!
from generator.
No problem. Windows keeps surprising me 😄
from generator.
Sorry for writing to a closed thread, but it seems like 'params' is not yet passed on when using the generator as a module with the .generateTemplateFile function. Shall I write a PR?
from generator.
You're right. Yeah, feel free to open a PR. Thanks!
from generator.
Related Issues (20)
- Improve arborist (npm installation) to have no hacks HOT 4
- Allow $$operation$$ file template HOT 2
- `noOverwriteGlobs` will not work in majority of cases in templates using react HOT 10
- Proposal for mentorship of potential maintainers of generator -> `Becoming a Maintainer of AsyncAPI Generator` HOT 22
- [BUG] Demo from homepage does not work HOT 9
- Need to add proper options to generate the template from private registory using CLI HOT 2
- Allowing Generator to pull the templates from the private GitHub Repository HOT 1
- [Docs Bug 🐞 report]: The `template-constant` link is broken at the generator docs HOT 6
- [Docs Bug 🐞 report]: The `AsyncAPI document` button is broken at the generator docs HOT 3
- [📑 Docs]: Improve documentation related to `File templates` feature HOT 8
- `conditionalFiles` feature is broken when template uses `server` special parameter HOT 1
- Incoming changes for generator HOT 3
- Support platform generator type templates to infrastructure as code HOT 4
- [BUG] Docker container html template is not compatible with generator HOT 3
- Figure out what development flow will be without cli.js HOT 4
- Add Post-installation script for Cli.js deprecation and migration
- Migration Guide to md & post-installation script to deprecate `cli.js` HOT 4
- create our own changeset bot HOT 1
- Provide a development.md or **Development Guide** in readme where you explain how to start project locally and do some basic manual tests and how to run existing tests in isolated docker env HOT 1
- Put all (most) templates into the generator together for better developers' experience HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator.