Skip to content

Inconsistent use of unpkg and jsdelivr in the documentation #97

@Arthri

Description

@Arthri

Context

No response

Description

The documentation uses both jsdelivr and unpkg, but the UI only uses unpkg.

In particular, the documentation shows the use of jsdelivr in the Mermaid customization script, but the UI loads it from unpkg.

import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
import elkLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0/dist/mermaid-layout-elk.esm.min.mjs';

https://github.com/zensical/ui/blob/7ebda1e307c73eaa59d79f11181a588e392b9eb6/src/assets/javascripts/components/content/mermaid/index.ts#L73-L77

Related links

Use Cases

Most Zensical sites already load from one CDN, unpkg, and the sites which have a Mermaid customization script cannot be retroactively updated. This change primarily affects future users who customize their Mermaid installation with the script from the documentation. In which case, their Zensical sites will remain loading from one CDN, unpkg, instead of unintentionally introducing jsdelivr, and the script will load a browser-cached version of Mermaid instead of a new one.

Visuals

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions