Skip to content

Commit 1d8d3f9

Browse files
committed
Add custom plugin to implement GitHub-like color dot and swatch on color codes in single backtick code fences
1 parent d0b55be commit 1d8d3f9

17 files changed

Lines changed: 388 additions & 612 deletions

File tree

‎@types/mdast-extensions-figures-and-gridtables.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ declare module 'mdast' {
1313
children: Array<PhrasingContent>
1414
}
1515

16-
/** Custom node emitted by @adobe/remark-gridtables */
16+
/** Custom node emitted by `@adobe/remark-gridtables` */
1717
interface GridTable extends Parent {
1818
type: 'gridTable'
1919
children: Array<RootContent>

‎_TODO.md‎

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,31 @@ You can then opt-out of prefetching for individual links by setting data-astro-p
231231

232232
## Markdown
233233

234-
### PROBLEMS: Markdown Not Working
234+
### Video embedding
235235

236-
- color tabs like GFM when using HEX, RGB, or HSL values in backticks. This should generate a callout box around the hex color with a dot to the right showing the color.
236+
### remark-video
237237

238-
The background color is `#ffffff`
238+
Embed videos in HTML5 markup that are in the `/public` folder
239239

240-
<code class="bg-gray-100 rounded border border-gray-300 inline-block font-mono text-xs mx-1 px-2 py-1">#ffffff</code>
240+
```markdown
241+
::video{src=/videos/sample-video-1.mp4}
241242

242-
- Astro also includes shiki
243+
:::video
244+
/videos/sample-video-1.mp4
245+
:::
246+
```
243247

244-
- We're adding 'rehype-autolink-headings', but Astro does too: https://docs.astro.build/en/guides/markdown-content/#heading-ids-and-plugins
248+
### remark-youtube
245249

246-
### Youtube embedding
250+
```markdown
251+
https://youtu.be/enTFE2c68FQ
247252

248-
- `remark-video`
253+
https://www.youtube.com/watch?v=enTFE2c68FQ
254+
```
249255

256+
## Code Block and Highlighting
250257

258+
## Astro includes shiki, tweak config
251259

252260
### Custom version of the code block integration from Astro Docs. "Beautiful code blocks for your Astro site". Applied to the code blocks created in `.mdx` files
253261

@@ -312,24 +320,11 @@ export default defineConfig({
312320
})
313321
```
314322

315-
rebber - transformation of MDAST into `latex` code. This code must be included inside a custom latex to be compiled.
316-
317-
Have a look at `https://github.com/zestedesavoir/latex-template/blob/master/zmdocument.cls` to get a working example.
318-
319323
### TeX rendering using KaTeX for math symbols
320324

321-
`markdown-it-texmath`
325+
- `rehype-katex` or `rehype-mathjax`: Rehype plugins that convert the parsed LaTeX into rendered HTML using either KaTeX or MathJax, respectively. KaTeX is often preferred for its performance and ability to allow text selection.
322326

323-
```typescript
324-
const markdownTexmathConfig = {
325-
engine: require('katex'),
326-
delimiters: 'dollars',
327-
katexOptions: { macros: { '\\RR': '\\mathbb{R}' } },
328-
}
329-
```
330327

331-
- `remark-math`: A Remark plugin that parses LaTeX syntax within your Markdown files.
332-
- `rehype-katex` or `rehype-mathjax`: Rehype plugins that convert the parsed LaTeX into rendered HTML using either KaTeX or MathJax, respectively. KaTeX is often preferred for its performance and ability to allow text selection.
333328

334329
### Mermaid JavaScript based diagramming and charting tool
335330

‎docs/CALL_TO_ACTION.md‎

Lines changed: 0 additions & 256 deletions
This file was deleted.

0 commit comments

Comments
 (0)