Skip to content

Conversation

@MariaBego56
Copy link

Updated the diagram and text for clarity on VPN setup.

create a mermaid diagram

Description

Please provide a clear and concise description of your changes. Explain what this pull request accomplishes and *
why* it is needed.


Related Issue

If this pull request addresses an existing issue, please link to it below. Use the Fixes #<issue-number> syntax to
close the issue automatically when the pull re### Description

Please provide a clear and concise description of your changes. Explain what this pull request accomplishes and *
why* it is needed.


Related Issue

If this pull request addresses an existing issue, please link to it below. Use the Fixes #<issue-number> syntax to
[close the issue](https://docs.githuquest is merged.

Example:

  • Fixes: #1234

Contributor License Agreement (CLA)

By contributing to this project, you agree to the terms of
the Canonical Contributor License Agreement (CLA).
If you have not already signed the CLA, please do so here.


Commit Message for Squash Merge

We typically squash commits when merging. You can specify the commit message that should be used in this case if you wish.
Provide the desired commit message below:

[(optional) category] Brief description of changes made, and why


Checklist


Additional Notes (Optional)

Add any extra information or context that reviewers may need to know. This could include testing instructions,
screenshots, or links to related discussions.


Thank you for contributing to the Ubuntu Server documentation!

Updated the diagram and text for clarity on VPN setup.
Copy link
Contributor

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the rendered output in https://canonical-ubuntu-documentation-library--383.com.readthedocs.build/server/how-to/wireguard-vpn/on-an-internal-system/, I cannot see an actual mermaid diagram.

I see the mermaid sources instead:

flowchart LR
  %% ASCII -> Mermaid conversion of: laptop over wlan0 to public untrusted network,
  %% WireGuard wg0 tunnel (10.90.90.1/24 <-> 10.90.90.2/24) to VPN gw and VPN network.

  laptop["Laptop"]

  internet(("public untrusted<br/>network/internet"))
  vpngw["VPN gw"]
  vpn(("VPN network"))

  %% Physical/normal networking
  laptop --|wlan0|--> internet
  internet --|eth0|--> vpngw

  %% WireGuard VPN endpoints
  laptop -. "wg0 10.90.90.1/24" .-> vpn
  vpngw  -. "wg0 10.90.90.2/24" .-> vpn

I'm unclear if this is expected, but would assume that we should be seeing rendered diagrams in the staging environment. Please correct me if that's wrong @s-makin
When pasting that source to something like https://mermaid.live it renders correctly, so seems to be an issue with our docs/environment specifically.

Besides that, the new diagram seems to be loosing information, such as the structure of the home network or the network's IP range, which was 10.10.10.0/24 before, but the tunnel is now using 10.90.90.0/24. In the explanation around the diagram we're referencing those specific IPs from the old diagram, which are now not visible anymore.




```mermaid
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```mermaid
```{mermaid}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the rendering issue :)

@s-makin
Copy link
Collaborator

s-makin commented Oct 27, 2025

I'm unclear if this is expected, but would assume that we should be seeing rendered diagrams in the staging environment. Please correct me if that's wrong @s-makin When pasting that source to something like https://mermaid.live it renders correctly, so seems to be an issue with our docs/environment specifically.

Thanks @slyon - Sphinx is sometimes a bit fiddly about recognizing mermaid environments. When declaring a mermaid diagram, you have to wrap mermaid in squiggly brackets (like {mermaid}) otherwise Sphinx tries to treat it like a regular code block. I've added a suggestion to the page which, when applied, should fix the issue and the diagram should render properly after that :)

Copy link
Collaborator

@s-makin s-makin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MariaBego56 and thanks for all your work on these diagrams!

I think I identified the reason why the diagrams aren't showing properly, and based on my local testing if you accept the suggestions I left below, and then commit them, it should fix the issue :)

@MariaBego56
Copy link
Author

Hi @s-makin ! Thank you very much 😁 I will follow your suggestions and try to male tge changes @slyon requested. I won't have any time to do it before the weekend. I hope that's ok. Have a lovely evening. 😁

@s-makin
Copy link
Collaborator

s-makin commented Oct 30, 2025

Hi @s-makin ! Thank you very much 😁 I will follow your suggestions and try to male tge changes @slyon requested. I won't have any time to do it before the weekend. I hope that's ok. Have a lovely evening. 😁

That's completely fine, there's no time limit :) let me know if you run into any problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants