1
0
mirror of https://github.com/docker/docs.git synced 2026-10-28 07:15:09 +03:00
Alexa Kristensen e44889768c ux: improve Mermaid rendering and theme switching (#26304)
## Summary

**Problem:** Mermaid diagrams briefly showed their raw source before the
SVG appeared, stayed on the wrong palette after a light/dark theme
toggle, and could leave Mermaid's error graphic in the page when a
diagram failed to parse.

**Why this change:** Diagrams are used more often in the docs, so the
renderer needs to match the site theme and avoid flashing source text
while SVGs load.

**Solution:** Replace `mermaid.run()` with a controlled
`mermaid.render()` loop that caches each block's source, skips stale
async results, re-renders when the `<html>` dark class changes,
suppresses Mermaid's default error SVG, and hides `pre.mermaid` until an
SVG is present (or a render error sets `data-error` so the source can
still be inspected).

@netlify /get-started/docker-concepts/the-basics/what-is-a-registry/

Preview:
https://deploy-preview-26304--docsdocker.netlify.app/get-started/docker-concepts/the-basics/what-is-a-registry/
Example of pre-fix behavior:
https://deploy-preview-26283--docsdocker.netlify.app/accounts/organization/

Generated by Cursor

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 10:41:05 -05:00
2025-01-30 07:54:26 -08:00
2026-09-11 12:37:25 +02:00
2026-03-31 15:20:07 +02:00
2026-01-05 08:34:39 +01:00
2026-09-11 12:37:25 +02:00
2024-09-16 14:43:05 +02:00
2025-07-16 15:13:38 +02:00
2026-09-11 12:37:25 +02:00
2026-10-02 18:11:08 +02:00
2016-09-30 01:51:56 -07:00
2025-04-02 15:46:24 -04:00

Docs @ Docker

Welcome to Docker Documentation


Welcome to the Docker Documentation repository. This is the source for the Docker Docs Website.

Feel free to open pull requests or issues. Our docs are completely open source, and we deeply appreciate contributions from the Docker community!

Provide feedback

We’d love to hear your feedback! To submit feedback:

  • Click New issue on the docs repository, or
  • Click Request changes in the right column of every page on docs.docker.com, or
  • Click Give feedback on every page in the docs.

To get community support, use the Docker Community Slack. Personalized support is available through the Docker Pro, Team, and Business subscriptions. See Docker Pricing for details.

If you have an idea for a new feature or behavior change in a specific aspect of Docker or have found a product bug, file an issue in the project's repository.

Contribute to Docker docs

We welcome contributions! To get started:

Copyright 2013-2026 Docker, Inc., released under the Apache 2.0 license.

Description
Репозиторий с исходным кодом для документации Docker
Readme Apache-2.0 934 MiB
Languages
Markdown 95.1%
HTML 2.3%
CSS 0.7%
Go 0.7%
JavaScript 0.7%
Other 0.2%