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
{{ message }}
Repository navigation
Commit ce32410
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: _TODO.md
+10-48Lines changed: 10 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,64 +241,24 @@ You can then opt-out of prefetching for individual links by setting data-astro-p
241
241
242
242
-`remark-attributes` does not work because `{...}` in MDX embeds dynamic JavaScript logic or JSX components directly within Markdown content
243
243
244
+
Must define escaping rules (what if the content legitimately includes `[[...]]`), and whether .md, .mdx, or both:
245
+
244
246
```markdown
245
-
{width=300 .centered}
247
+
### Heading [[.my-class #my-id]]
248
+
[[width=300 .centered]]
249
+
[Link](url)[[.btn target=_blank]]
246
250
247
-
Variables: # {postTitle}.
248
-
Calculations: {Math.PI * 2}.
249
-
Components: { <MyComponent /> }
251
+
### Heading[[.my-class #my-id]]
252
+
[[width=300 .centered]]
253
+
[Link](url)[[.btn target=_blank]]
250
254
```
251
255
252
256
### Youtube embedding
253
257
254
258
-`rehype-video` for self-hosted videos, you have to pass the video filename into the unified `process()` pipeline along with the plugin
255
259
-`@hongvanpc10/rehype-embed` works the same way - you have to pass the Youtube link into the config to be processed
256
260
257
-
### remark-captions
258
-
259
-
By default it wraps the elements code, image, table and blockquote in a `<figure>` element, and adds a `<figcaption>` block as the last child. You can configure it to work on other elements. You supply the keyword (by default Code, Figure, Table, and Source respectively) and to add a caption you add a line right below the element with that keyword:
260
-
261
-
```markdown
262
-
> Some blockquote text that will have a caption
263
-
Source: The caption text that will appear under the blockquote
264
-
```
265
-
266
-
### Add Twitter like mentions in markdown using @twittername syntax
267
-
268
-
`markdown-it-mentions`
269
-
270
-
Options object including parse function for content generated by mentions plugin using `@twittername` syntax:
271
-
272
-
```javascript
273
-
constmarkdownMentionsConfig= {
274
-
parseURL:username=> {
275
-
return`https://twitter.com/@${username}`
276
-
},
277
-
/** adds a target="_blank" attribute if it's true and target="_self" if it's false */
278
-
external:true,
279
-
}
280
-
```
281
-
282
-
### my-accessible-list-plugin
283
261
284
-
```typescript
285
-
import { visit } from'unist-util-visit';
286
-
287
-
exportfunction myAccessibleListPlugin() {
288
-
return (tree) => {
289
-
visit(tree, 'list', (node) => {
290
-
// Example: Add an aria-label to lists
291
-
if (!node.data) {
292
-
node.data= {}
293
-
}
294
-
if (!node.data.hProperties) {
295
-
node.data.hProperties= {}
296
-
}
297
-
node.data.hProperties['aria-label'] ='List of items'; // Customize this
298
-
})
299
-
}
300
-
}
301
-
```
302
262
303
263
### 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
0 commit comments