avisi-cloud / structurizr-site-generatr

Static site generator for architecture models created with Structurizr DSL
https://avisi-cloud.github.io/structurizr-site-generatr/
Apache License 2.0
203 stars 31 forks source link

Wiki style linking in Structurizr Site Generatr #502

Open galuszkak opened 3 months ago

galuszkak commented 3 months ago

Hey,

I saw that in #284 #260 was added support to link between ADRs.

This is straightforward suport for linking just inside ADRs. The problem with this is just local for a given scope of ADRs. So even if added linking on workspace and software system level it didn't add linking in container level.

But there are use cases where you would like to link not only inside one stream of ADRs but also:

Therefore I would like to propose change how we should handle links for Structurizr.

Relative links:

Absolute Links:

We would need to first generate links before we start generating the pages. Given they are deterministic we could have HashMap of all Links and based on patterns above generate correct links.

Let me know if this would make sense to add.

jp7677 commented 1 month ago

Thanks for the proposal. I've read it several times, but I don't think I fully understand what you are actually asking (it's already getting late here, that might not help ;)). The current transformation for ADR links has two steps (explained in https://github.com/avisi-cloud/structurizr-site-generatr/pull/284#issue-1846529966). The first one is done by the structurizr library itself. The second one is on our side to transform the ADR number notation back to a working link. Where in that process do you intend to intervene?