Skip to content

Commit ba61649

Browse files
committed
Add remark-deflist to add definition lists with 'dl', 'dt', and 'dd' HTML elements
1 parent c8623a7 commit ba61649

12 files changed

Lines changed: 723 additions & 463 deletions

File tree

‎.markdownlint.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"MD004": false,
23
"MD013": false,
34
"MD025": false,
45
"MD033": false,

‎_TODO.md‎

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

232232
## Markdown
233233

234-
### Custom plugins
235-
236-
- `remark-replacements` - Heading anchor links
237-
- `rehype-tailwind` - Add custom CSS classes to Markdown-generated elements in this file
238-
239234
### PROBLEMS: Markdown Not Working
240235

241236
- 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.
@@ -256,19 +251,6 @@ Components: { <MyComponent /> }
256251

257252
### THINGS TO WIRE INTO CUSTOM COMPONENTS IN STANDARD MARKDOWN OR ADD AS COMPONENTS
258253

259-
#### Details/Summary elements
260-
261-
These HTML elements aren't being processed by remarkGfm (they need to be raw HTML). Expandable and collapsible content using HTML <details> and <summary> elements.
262-
263-
### Add accessible name to section in footnotes plugin
264-
265-
```typescript
266-
const markdownFootnoteBlockOpen = () =>
267-
'<hr className="footnotes-sep">\n' +
268-
'<section class="footnotes" aria-label="footnotes">\n' +
269-
'<ol class="footnotes-list">\n'
270-
```
271-
272254
### remark-text-decoration
273255

274256
This plugin lets you apply an element to text based on a marker defined in config. It could handle subscript, superscript, underline, and highlighting.
@@ -283,16 +265,6 @@ This plugin lets you apply an element to text based on a marker defined in confi
283265
==marked== gives <mark>inserted</mark>
284266
```
285267

286-
### remark-deflist
287-
288-
Definitions under definition header, stringified as `dl`, `dt`, and `dd`
289-
290-
```markdown
291-
Term 1
292-
293-
: Definition 1
294-
```
295-
296268
### Youtube embedding
297269

298270
- `rehype-video` for self-hosted videos, you have to pass the video filename into the unified `process()` pipeline along with the plugin
@@ -303,16 +275,24 @@ Term 1
303275

304276
This plugin parses custom Markdown syntax to create new custom blocks. It takes a config object with a name for the block, CSS classes to apply to it, and whether a title is required, optional, or the block does not have a title.
305277

278+
These HTML elements aren't being processed by remarkGfm (they need to be raw HTML). Expandable and collapsible content using HTML <details> and <summary> elements.
279+
306280
```markdown
307-
[[bar | my **title**]]
308-
| content
281+
[[details | My summary]]
282+
| Some content for the detail
309283
```
310284

311-
```html
312-
<div class="custom-block something">
313-
<div class="custom-block-heading">my <strong>title</strong></div>
314-
<div class="custom-block-body"><p>content</p></div>
315-
</div>
285+
```typescript
286+
{
287+
details: {
288+
classes: '',
289+
title: 'required',
290+
containerElement: 'details',
291+
titleElement: 'summary',
292+
contentsElement: 'div',
293+
details: true,
294+
},
295+
}
316296
```
317297

318298
### remark-captions

0 commit comments

Comments
 (0)