Open stephane-mori opened 1 year ago
As far as I know this is still not possible yet in backstage itself https://github.com/backstage/backstage/issues/4123#issuecomment-1131801187.
Could you create an issue in the backstage project and link it here?
You can build a custom container based on the techdocs-container:
FROM spotify/techdocs:v1.1.1
RUN pip install --no-cache-dir mkdocs-mermaid2-plugin==0.6.0
ENTRYPOINT [ "mkdocs" ]
And serve it like
techdocs-cli serve:mkdocs -i my-custom-techdocs-container:latest
Hey @axdotl thats a nice approach but at least for me it does not work :(
However, following the discussion in the backstage tickets linked above and according to the comment from @johanneswuerbach we should think here how to solve that properly. In general I like the approach to provide a special docker image which you can then use in the techdocs-cli
command which has the plugin somehow loaded already there as well. Not sure how to achieve this but happy to dig into that a bit if you'd agree on the proposal
The working approach is to use the --preview-app-bundle-path
argument to techdocs-cli serve
. IIRC, this was added in version 1.3.0 of the CLI.
General steps:
dist
path as the value of the --preview-app-bundle-path
arg.Optionally, distribute the project (make sure to include the dist
directory in the tarball) via an npm registry.
The -i
argument is for the build container, not the backstage app.
Hi,
I am looking for a way to make this addon work serving the documentation localy in a Backstage app-like environment using "techdocs-cli serve" command.
Is it something possible ?
Regards, Stéphane