Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mermaid support to documentation #1773

Closed
huijing opened this issue Aug 23, 2023 · 4 comments · Fixed by #1929
Closed

Add Mermaid support to documentation #1773

huijing opened this issue Aug 23, 2023 · 4 comments · Fixed by #1929
Assignees
Labels
pkg: documentation Changes in the documentation package. type: documentation (archived) Improvements or additions to documentation
Milestone

Comments

@huijing
Copy link
Contributor

huijing commented Aug 23, 2023

We would like to add Mermaid support to the Rafiki docs, currently running on Starlight.

@huijing huijing added documentation pkg: documentation Changes in the documentation package. labels Aug 23, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Aug 23, 2023
@huijing huijing self-assigned this Aug 23, 2023
@huijing huijing mentioned this issue Aug 24, 2023
5 tasks
@huijing
Copy link
Contributor Author

huijing commented Aug 29, 2023

We have unfortunately run into a blocker where the generated SVG has issues with attributes that contain dashes, e.g. marker-end is being generated as markerend causing the arrow heads to not render.
Am currently in the process of asking for help (remcohaszing/remark-mermaidjs#23), will continue to update this issue if it progresses.

The exact same configuration works perfectly on Web Monetization. The difference is that Web Monetization is not a monorepo and was built with bun. It also does not have the Mathjax plugins installed.

import remarkMermaid from 'remark-mermaidjs'

export default defineConfig({
  markdown: {
    remarkPlugins: [remarkMermaid],
  }
})

Testing on a fresh Astro Starlight install built with pnpm using the same configuration as above also works correctly. The Mermaid plugin did not present any issues when used together with the Mathjax plugins.

import remarkMermaid from 'remark-mermaidjs'
import remarkMath from 'remark-math'
import rehypeMathjax from 'rehype-mathjax'

export default defineConfig({
  markdown: {
    remarkPlugins: [remarkMath, remarkMermaid],
    rehypePlugins: [rehypeMathjax]
  },

Hui Jing is just very annoyed and confused at this point.

@huijing huijing added the blocked Issue/PR that is blocked from proceeding label Aug 29, 2023
@sabineschaller sabineschaller added this to the Documentation milestone Sep 5, 2023
@BlairCurrey
Copy link
Contributor

I was testing this out and found a few things.

@huijing huijing removed the blocked Issue/PR that is blocked from proceeding label Sep 22, 2023
@huijing
Copy link
Contributor Author

huijing commented Sep 22, 2023

This issue is not entirely solved, but we do have Mermaid support in .md files with the ```mermaid syntax. It does not work in .mdx yet. So leaving this open for now.

@huijing huijing added type: documentation (archived) Improvements or additions to documentation and removed documentation labels Oct 30, 2023
@huijing
Copy link
Contributor Author

huijing commented Dec 13, 2023

This has been resolved by #2237

@huijing huijing closed this as completed Dec 13, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Rafiki Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: documentation Changes in the documentation package. type: documentation (archived) Improvements or additions to documentation
Projects
Archived in project
3 participants