Fix rendering issues when mermaid is used #59
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When mermaid support is enabled, also inject the code snippet suggested in the ExDoc README (into the HTML
<body/>
rather than the<head/>
). This resolves rendering issues such as the menu not being displayed properly. See, for example:https://eturnal.net/tmp/rendering-broken/
When I access that page (on desktop), the menu items on the left aren't displayed (until I press PAGES/MODULES). This happens on pages without mermaid diagrams as well.
With this PR applied, things appear to be rendered fine:
https://eturnal.net/tmp/rendering-fixed/
I must admit that I'm not a web dev and am not entirely sure regarding the details here. However, I figured that following the 'official' ExDoc advice seems fine if it resolves issues.