Skip to content

Commit 38ba27f

Browse files
KianNHmaheshwarip
authored andcommitted
[Docs Site] Add figcaption from img title attribute (#16891)
1 parent b18e98b commit 38ba27f

File tree

3 files changed

+149
-0
lines changed

3 files changed

+149
-0
lines changed

astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { h } from "hastscript";
1313
import { readdir } from "fs/promises";
1414
import icon from "astro-icon";
1515
import sitemap from "@astrojs/sitemap";
16+
import rehypeTitleFigure from "rehype-title-figure";
1617

1718
const runLinkCheck = process.env.RUN_LINK_CHECK || false;
1819

@@ -83,6 +84,7 @@ export default defineConfig({
8384
],
8485
rehypeSlug,
8586
[rehypeAutolinkHeadings, autolinkConfig],
87+
rehypeTitleFigure,
8688
],
8789
},
8890
experimental: {

package-lock.json

Lines changed: 146 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"rehype-external-links": "^3.0.0",
5252
"rehype-mermaid": "^2.1.0",
5353
"rehype-slug": "^6.0.0",
54+
"rehype-title-figure": "^0.1.2",
5455
"sharp": "^0.33.5",
5556
"solarflare-theme": "^0.0.2",
5657
"starlight-image-zoom": "^0.8.0",

0 commit comments

Comments
 (0)