I’ve a need to generate rail road diagrams from BNF. We have a tool in java and javascript that can generate these diagrams. For now, the team has been generating the files manually add adding them as static files to be served by Hugo.
Is there any way I can write a shortcode that can execute the jar or js file to create the diagram and have the diagram automatically generated during the site generation? Can I convert the js (or jar) as a plugin?
ESBuild seems to process js files, but is there a way to execute them?
Note: I understand that I can use resource.GetRemote
to fetch from a hosted dynamic page (for now I don’t have that option , unless I could do it within HUGO)