Closed rsdoiel closed 2 years ago
A simple though hack-ish solution would be to use a pre-processor before calling mkpage. The pre-processor would do a simple substitution of (e.g. $prefix_path$
with a path prefix) in markdown documents, JavaScript and CSS files and render them into the htdocs
directory hierarchy. This can be done with Pandoc as I do now with generating the nav.md file used for application navigation.
If so I should come up with a sensible name schema for the files that generate the intermediate markdown content used to render the final HTML, CSS and JavaScript.
Re-implimented the path mapping. In settings.json the hostname holds the hostname and port (e.g. localhost:8486), prefix_path holds the public facing URL path prefix used for both "api" and "app" end points. Removed the redirects that were at the root level of the service.
The markdown content has embedded paths that need to respect the prefix of the font end web server since the page content pass through the font end system to the staff person's browser.
In the nav.md file I solved this by maintain the content in nav.tmpl (a Pandoc template that renders as markdown). It seems odd to use this technique for primary content pages.