When generating HTML using various templates, it’d be helpful to be able to insert relative links to web assets (CSS, JS, etc.) and to navigate between DHQ pages. Currently, most links start with /dhq, meaning that they will only resolve if the HTML is placed in a certain way, probably using a server.
Using relative links instead would allow DHQ HTML to be proofed in a “standalone” fashion, regardless of where the outer dhq/ directory is placed. It would aid proofing of a statically-generated DHQ site, since testing could occur on local computers instead of in a specific location on a server.
Some coding work would be necessary to take directory structure into account when generating links. As part of the static site generation project, I added a parameter $assets-path to head.xsl. When generating preview article HTML, the Ant build file sets this parameter to ensure that CSS is accurately applied. Other stylesheets would need similar tweaks.
When generating HTML using various templates, it’d be helpful to be able to insert relative links to web assets (CSS, JS, etc.) and to navigate between DHQ pages. Currently, most links start with
/dhq
, meaning that they will only resolve if the HTML is placed in a certain way, probably using a server.Using relative links instead would allow DHQ HTML to be proofed in a “standalone” fashion, regardless of where the outer
dhq/
directory is placed. It would aid proofing of a statically-generated DHQ site, since testing could occur on local computers instead of in a specific location on a server.Some coding work would be necessary to take directory structure into account when generating links. As part of the static site generation project, I added a parameter
$assets-path
to head.xsl. When generating preview article HTML, the Ant build file sets this parameter to ensure that CSS is accurately applied. Other stylesheets would need similar tweaks.