From 2971f98b4c518b7f5a835ec07cdbdd9a46d30e6c Mon Sep 17 00:00:00 2001 From: Stephan Lo Date: Fri, 7 Nov 2025 14:57:05 +0100 Subject: [PATCH] docs: Fix and improve LikeC4 example in local development guide - Fix shortcode example to show code instead of rendering - Add complete LikeC4 example with specification, model, and views blocks - Fix syntax: use 'include element' not 'include element element' - Add guidance on finding available view IDs - Use correct element type names and structure --- .../docs/documentation/local-development.md | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/content/en/docs/documentation/local-development.md b/content/en/docs/documentation/local-development.md index 3934f19..1958e97 100644 --- a/content/en/docs/documentation/local-development.md +++ b/content/en/docs/documentation/local-development.md @@ -97,6 +97,38 @@ Architecture diagrams are created with LikeC4: 2. **Edit or create `.c4` files** with your model + Example: Create a simple view in `resources/edp-likec4/views/my-view.c4`: + + ```likec4 + specification { + element myperson + element mysystem + } + + model { + customer = myperson 'Customer' { + description 'End user of the platform' + } + + mySystem = mysystem 'My System' { + description 'Example system component' + } + + customer -> mySystem 'uses' + } + + views { + view myCustomView { + title "My Custom Architecture View" + + include customer + include mySystem + + autoLayout TopBottom + } + } + ``` + 3. **Regenerate webcomponents:** ```bash @@ -106,16 +138,14 @@ Architecture diagrams are created with LikeC4: 4. **Embed diagrams in Markdown:** ```markdown - {{< likec4-view view="localDevelopment" title="Local Development Workflow" >}} + {{}} ``` - Available views: - - `overview` - Complete system overview - - `localDevelopment` - Documentor workflow - - `cicdPipeline` - CI/CD process - - `deploymentFlow` - Edge deployment - - `fullWorkflow` - End-to-end workflow - - `testingCapabilities` - Testing overview + **Finding available view IDs:** + - Open the `.c4` files in your project directory + - Look for `view {` declarations + - The `` is what you use in the `view` parameter + - Or use: `grep -r "^view " resources/edp-likec4/ --include="*.c4"` ## Available Tasks