You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Astro wrapper for GitHub's relative time web component. Translates dates to past or future time phrases, like "*4 hours from now*" or "*20 days ago*"
### Astro wrapper for GitHub's relative time web component. Translates dates to past or future time phrases, like "*4 hours from now*" or "*20 days ago*"
Next I'd like to setup the rehype-mermaid package. I've installed it already.
280
-
1. Use the 'inline-svg' strategy
281
-
2. Point the 'css' option key to a file src/styles/vendor/mermaid.css
282
-
3. In the 'errorFallback' add a function that rethrows the error as a BuildError with descriptive text that Mermaid has encountered something it can't graph
283
-
4. Evaluate whether we can set fontFamily in the mermaidConfig option property to use one of our fonts in public/fonts. The docs mention "You need to call mermaid.initialize() manually", I'm not sure if we can do this.
Copy file name to clipboardExpand all lines: src/content/articles/demo/index.mdx
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -529,6 +529,26 @@ There is a doc listing all available emojis in the /docs directory.
529
529
530
530
:rocket:
531
531
532
+
### rehype-mermaid
533
+
534
+
With Mermaid markup like this in a code block with "mermaid" set as the language:
535
+
536
+
```text
537
+
graph TD
538
+
A[Start ] --> B{Is it working? }
539
+
B -->|Yes | C[Great!]
540
+
B -->|No | D[Debug ]
541
+
D --> B
542
+
```
543
+
544
+
```mermaid
545
+
graph TD
546
+
A[Start ] --> B{Is it working? }
547
+
B -->|Yes | C[Great! ]
548
+
B -->|No | D[Debug ]
549
+
D --> B
550
+
```
551
+
532
552
### remark-align
533
553
534
554
This custom plugin parses custom Markdown syntax to center- or right-align elements. Alignment is done by wrapping something in shortcode-style tags, applying Tailwind `text-right` or `text-center` classes:
0 commit comments