Allow deployment of static website output outside of web server root
ckolumbus opened this issue ยท 3 comments
Feature Request
Feature Suggestion
It shall be possible to host the generated static website within a sub-path of the web server.
Context
Our web server hosts several projects with associated documentation/adrs. Each one is accessible through a url path prefix.
The generated static website from log4brains assumes to be hosted in the web server root. The generated files refer to other content via absolute paths (with leading "/"). This prevents the hosting within a sub-path (e.g. http://example.com/project1/docs/decisions).
Possible Implementation
Suggestion: convert all generated path elements to be relative.
Hi @ckolumbus, thank you for your issue.
This feature is already available. You can specify your path prefix by passing the --basePath
option to log4brains build
.
Example:
log4brains build --basePath /project1/docs/decisions
See log4brains build --help
to see the other options available.
But thanks to your feedback it means this is not documented enough in the README :-)
I leave this issue opened to remind me to update it.
I actually found this feature but did only try it without the leading /
which simply fails the build without an error message. Now that I know how to properly use it, it works like a charm. A little more verbosity in the documentation would be appreciated :-)
@thomvaill Thanks for your quick reply... i WAS searching for it... and i thought I've seen it somewhere but couldn't find it anymore ๐ค, sorry. So I'll close this one here!