Login  Register

How to include dynamically rendered HTML from GitHub source files

Posted by RickEEE on Feb 18, 2019; 9:15pm
URL: https://discuss.asciidoctor.org/How-to-include-dynamically-rendered-HTML-from-GitHub-source-files-tp6751.html

I'm authoring API user documentation using GitHub pages (adocs) and need to include HTML content that is dynamically rendered from XML source docs located within the GitHub repository.  This technique will ensure that the document content is always current -  it auto-generates whenever the Developer updates the XML source code.  Is there a way to use a passthrough block or other technique to make this reality?  

For reference, the following code is how I currently render the XML in an HTML document.  Not sure if this is applicable, but the xsl document parses the XML file and transforms the data into an HTML table and then displays it in a browser.

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<div class="content">
  <script language="javascript"> // Load XML var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("fieldParams/ReqParams.xml") // Load the XSL var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("xsl.xsl") // Transform document.write(xml.transformNode(xsl)) </script></div>
</body>
</html>