aboutsummaryrefslogtreecommitdiff
path: root/build/assets/js/18ce1c6a.fb9468ea.js
blob: b909b1818c9008b4921e9f8de98bb04771b4bb42 (plain)
1
"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[1891],{48117:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>d,toc:()=>a});var r=i(74848),t=i(28453);const s={title:"Docusaurus\u306e\u6ce8\u610f\u66f8\u304d\u3084\u8b66\u544a\u6587\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u898b\u51fa\u3057\u306b\u3057\u3066\u3001\u76ee\u6b21\u306b\u3082\u4e57\u305b\u308b\u65b9\u6cd5",description:"Docusaurus\uff08V3.1\uff09\u3067\u306f\u3001\u6ce8\u610f\u66f8\u304d\u3084\u8b66\u544a\u6587\uff08Admonition\uff09\u306f\u898b\u51fa\u3057\uff08Heading\uff09\u306b\u306f\u306a\u3089\u305a\u76ee\u6b21\u306b\u3082\u63b2\u8f09\u3055\u308c\u306a\u3044\u306e\u3067\u3001Remark/Rehype\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068Swizzle\u3092\u6d3b\u7528\u3057\u3066\u5b9f\u73fe\u3057\u307e\u3057\u305f\u3002",authors:"yohei",tags:["\u6280\u8853","docusaurus","v3.1"],hide_table_of_contents:!1},o=void 0,d={permalink:"/docs/blog/2024/01/27/docusaurus-admonition-heading-toc",source:"@site/blog/2024/01/27/docusaurus-admonition-heading-toc/index.mdx",title:"Docusaurus\u306e\u6ce8\u610f\u66f8\u304d\u3084\u8b66\u544a\u6587\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u898b\u51fa\u3057\u306b\u3057\u3066\u3001\u76ee\u6b21\u306b\u3082\u4e57\u305b\u308b\u65b9\u6cd5",description:"Docusaurus\uff08V3.1\uff09\u3067\u306f\u3001\u6ce8\u610f\u66f8\u304d\u3084\u8b66\u544a\u6587\uff08Admonition\uff09\u306f\u898b\u51fa\u3057\uff08Heading\uff09\u306b\u306f\u306a\u3089\u305a\u76ee\u6b21\u306b\u3082\u63b2\u8f09\u3055\u308c\u306a\u3044\u306e\u3067\u3001Remark/Rehype\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068Swizzle\u3092\u6d3b\u7528\u3057\u3066\u5b9f\u73fe\u3057\u307e\u3057\u305f\u3002",date:"2024-01-27T00:00:00.000Z",tags:[{label:"\u6280\u8853",permalink:"/docs/blog/tags/\u6280\u8853"},{label:"docusaurus",permalink:"/docs/blog/tags/docusaurus"},{label:"v3.1",permalink:"/docs/blog/tags/v-3-1"}],readingTime:16.8,hasTruncateMarker:!0,authors:[{name:"\u5b89\u7af9 \u6d0b\u5e73",title:"\u6771\u4eac\u90fd\u5c0f\u5e73\u5e02\u8b70\u4f1a\u8b70\u54e1",url:"https://yasutakeyohei.com",email:"yohei@yasutakeyohei.com",imageURL:"https://cgit.yasutakeyohei.com/yohei.jpg",key:"yohei"}],frontMatter:{title:"Docusaurus\u306e\u6ce8\u610f\u66f8\u304d\u3084\u8b66\u544a\u6587\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u898b\u51fa\u3057\u306b\u3057\u3066\u3001\u76ee\u6b21\u306b\u3082\u4e57\u305b\u308b\u65b9\u6cd5",description:"Docusaurus\uff08V3.1\uff09\u3067\u306f\u3001\u6ce8\u610f\u66f8\u304d\u3084\u8b66\u544a\u6587\uff08Admonition\uff09\u306f\u898b\u51fa\u3057\uff08Heading\uff09\u306b\u306f\u306a\u3089\u305a\u76ee\u6b21\u306b\u3082\u63b2\u8f09\u3055\u308c\u306a\u3044\u306e\u3067\u3001Remark/Rehype\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068Swizzle\u3092\u6d3b\u7528\u3057\u3066\u5b9f\u73fe\u3057\u307e\u3057\u305f\u3002",authors:"yohei",tags:["\u6280\u8853","docusaurus","v3.1"],hide_table_of_contents:!1},unlisted:!1,prevItem:{title:"\u5408\u6c17\u516c\u5712\u306e\u6574\u5099\u9032\u6357\u72b6\u6cc1",permalink:"/docs/blog/2024/01/31/sagawa-aiki-kouen-seibi-joukyou"},nextItem:{title:"\u65b0\u3075\u3089\u3063\u3068\u30d6\u30ed\u30b0\u7acb\u3061\u4e0a\u3052\u307e\u3057\u305f",permalink:"/docs/blog/2024/01/26/new-flat-blog"}},l={authorsImageUrls:[void 0]},a=[{value:"Docusaurus\ud83e\udd96",id:"docusaurus",level:2},{value:"Admonition\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u898b\u51fa\u3057\u306b\u306a\u3089\u306a\u3044",id:"admonition\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u898b\u51fa\u3057\u306b\u306a\u3089\u306a\u3044",level:2},{value:"\u30c6\u30b9\u30c8",id:"\u30c6\u30b9\u30c8",level:4},{value:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u5f8c\u306f\u3069\u3046\u306a\u308b\u304b",id:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u5f8c\u306f\u3069\u3046\u306a\u308b\u304b",level:2},{value:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b#\u3092\u5165\u308c\u305f\u5834\u5408",id:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b\u3092\u5165\u308c\u305f\u5834\u5408",level:3},{value:"\u898b\u51fa\u3057\u306b\u306a\u308a\u3001TOC\u306b\u53cd\u6620\u3055\u308c\u308b\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",id:"\u898b\u51fa\u3057\u306b\u306a\u308atoc\u306b\u53cd\u6620\u3055\u308c\u308b\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",level:4},{value:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b#\u3092\u5165\u308c\u306a\u3044\u5834\u5408",id:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b\u3092\u5165\u308c\u306a\u3044\u5834\u5408",level:3},{value:"\u898b\u51fa\u3057\u306b\u306a\u3089\u305a\u3001TOC\u306b\u53cd\u6620\u3055\u308c\u306a\u3044\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",id:"\u898b\u51fa\u3057\u306b\u306a\u3089\u305atoc\u306b\u53cd\u6620\u3055\u308c\u306a\u3044\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",level:4},{value:"\u30bf\u30a4\u30c8\u30eb\u306bHTML\u3092\u5165\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd",id:"\u30bf\u30a4\u30c8\u30eb\u306bhtml\u3092\u5165\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd",level:3},{value:"\u30c6\u30b9\u30c8<sup>123</sup>\u30c6\u30b9\u30c8<u>\u4e0b\u7dda</u>",id:"\u30c6\u30b9\u30c8123\u30c6\u30b9\u30c8\u4e0b\u7dda",level:4},{value:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u5229\u7528\u3057\u305f\u6a5f\u80fd",id:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u5229\u7528\u3057\u305f\u6a5f\u80fd",level:2},{value:"Remark\u3068Rehype\u306b\u3064\u3044\u3066",id:"remark\u3068rehype\u306b\u3064\u3044\u3066",level:3},{value:"Docusaurus\u306b\u304a\u3051\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0",id:"docusaurus\u306b\u304a\u3051\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0",level:4},{value:"Swizzling\u306b\u3064\u3044\u3066",id:"swizzling\u306b\u3064\u3044\u3066",level:3},{value:"\u52d5\u4f5c\u539f\u7406",id:"\u52d5\u4f5c\u539f\u7406",level:2},{value:"\u5b9f\u88c5",id:"\u5b9f\u88c5",level:2},{value:"docusaurus.config.json",id:"docusaurusconfigjson",level:3},{value:"Remark/Rehype\u30d7\u30e9\u30b0\u30a4\u30f3",id:"remarkrehype\u30d7\u30e9\u30b0\u30a4\u30f3",level:3},{value:"Swizzling",id:"swizzling",level:3},{value:"Ejecting",id:"ejecting",level:4},{value:"\u30b3\u30fc\u30c9\u306e\u5909\u66f4",id:"\u30b3\u30fc\u30c9\u306e\u5909\u66f4",level:4}];function c(n){const e={a:"a",admonition:"admonition",br:"br",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h2,{id:"docusaurus",children:"Docusaurus\ud83e\udd96"}),"\n",(0,r.jsxs)(e.p,{children:["1\u30f5\u6708\u5f31\u4f7f\u3044\u307e\u3057\u305f\u304c\u3053\u306e",(0,r.jsx)(e.a,{href:"https://docusaurus.io/",children:"Docusaurus"}),"\uff08\u30c9\u30ad\u30e5\u30b5\u30a6\u30eb\u30b9\uff09\u306f\u6570\u3042\u308bCMS\u306e\u4e2d\u3067\u3082\u79c0\u9038\u3067\u3059\u3002"]}),"\n",(0,r.jsx)(e.p,{children:"\u6587\u66f8\u4f5c\u6210\u3068\u7ba1\u7406\u304c\u5bb9\u6613\u3067\u3001\u62e1\u5f35\u306e\u81ea\u7531\u5ea6\u3082\u975e\u5e38\u306b\u9ad8\u304f\u3001\u5b8c\u5168\u306a\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3002"}),"\n",(0,r.jsxs)(e.p,{children:["\u8b70\u54e1\u6d3b\u52d5\u306b\u91cd\u8981\u306a\u300c",(0,r.jsx)(e.strong,{children:"\u8cc7\u6599\u3092\u4f5c\u6210\u3057\u307e\u3068\u3081\u3066\u516c\u958b\u3059\u308b\u30c4\u30fc\u30eb"}),"\u300d\u3068\u3057\u3066\u73fe\u72b6\u306e\u6700\u9069\u89e3\u3068\u611f\u3058\u307e\u3059\u3002"]}),"\n","\n",(0,r.jsxs)(e.p,{children:["Facebook\u304c\u6bcd\u4f53\u306a\u306e\u3067\u3044\u308d\u3044\u308d\u3068\u6c17\u306b\u306a\u308b\u3068\u3053\u308d\u3067\u3059\u304c\u3001",(0,r.jsx)(e.a,{href:"https://ja.legacy.reactjs.org/",children:"React"}),"\u3092\u521d\u3081\u3068\u3057\u3066\u6709\u76ca\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5b8c\u5168\u306a\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3068\u3057\u3066\u63d0\u4f9b\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u3053\u3068\u306f\u7d14\u7c8b\u306b\u3042\u308a\u304c\u305f\u3044\u3068\u611f\u3058\u307e\u3059\u3002"]}),"\n",(0,r.jsx)(e.h2,{id:"admonition\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u898b\u51fa\u3057\u306b\u306a\u3089\u306a\u3044",children:"Admonition\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u898b\u51fa\u3057\u306b\u306a\u3089\u306a\u3044"}),"\n",(0,r.jsxs)(e.p,{children:["\u3055\u3066Docusaurus\u306b\u306f",(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/markdown-features/admonitions",children:"Admonition"}),"\uff08\u6ce8\u610f\u66f8\u304d\u3084\u8b66\u544a\u6587\uff09\u3092\u5bb9\u6613\u306bMarkdown\u3067\u66f8\u304f\u65b9\u6cd5\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002"]}),"\n",(0,r.jsx)(e.p,{children:"\u305f\u3068\u3048\u3070info\u306a\u3089\u3001\u6b21\u306e\u3088\u3046\u306bMarkdown\u3067\u66f8\u3051\u3070\u3001"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-mdx",metastring:'title="Admonition\u306e\u8a18\u6cd5\uff08md\u3082\u3057\u304f\u306fmdx\u306b\u8a18\u8f09\uff09"',children:":::info[info\u306e\u4f8b]\r\n\r\n\u3053\u3053\u306b\u6587\u7ae0\u3092\u66f8\u304f\r\n\r\n:::\n"})}),"\n",(0,r.jsx)(e.p,{children:"\u6b21\u306e\u3088\u3046\u306bHTML\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.admonition,{title:"info\u306e\u4f8b",type:"info",children:(0,r.jsx)(e.p,{children:"\u3053\u3053\u306b\u6587\u7ae0\u3092\u66f8\u304f"})}),"\n",(0,r.jsxs)(e.p,{children:["\u3057\u304b\u3057\uff08DocusaurusV3.1\uff09\u3067\u3053\u306eAdmonition\u306e\u30bf\u30a4\u30c8\u30eb\u306f\u898b\u51fa\u3057\uff08",(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/markdown-features/toc",children:"Heading"}),"\uff09\u306b\u306a\u3089\u305a\u3001\u76ee\u6b21\uff08",(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/markdown-features/toc",children:"TOC"}),"\uff09\u306b\u3082\u4e57\u308a\u307e\u305b\u3093\u3002\u4e0a\u8a18\u4f8b\u306a\u3089\u300cINFO\u306e\u4f8b\u300d\u304cTOC\u306b\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002"]}),"\n",(0,r.jsx)(e.p,{children:"\u6b21\u306e\u56f3\u304b\u3089\u3082\u5206\u304b\u3063\u3066\u3044\u305f\u3060\u3051\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.img,{alt:"Admonition\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u898b\u51fa\u3057\u306b\u306a\u3089\u306a\u3044",src:i(32685).A+"",width:"903",height:"820"})}),"\n",(0,r.jsx)(e.p,{children:"\u4e9b\u7d30\u306a\u3053\u3068\u306e\u3088\u3046\u306b\u3082\u601d\u3048\u307e\u3059\u304c\u3001Docusaurus\u3092\u66f8\u7c4d\u306e\u3088\u3046\u306b\u6271\u3046\u306b\u306f\u7d50\u69cb\u6c17\u306b\u306a\u308b\u3068\u3053\u308d\u3002"}),"\n",(0,r.jsxs)(e.p,{children:["\u306a\u304a",(0,r.jsx)(e.a,{href:"https://github.com/elviswolcott/remark-admonitions/issues/26",children:"\u4ee5\u524d\u306fAdmonition\u306e\u30bf\u30a4\u30c8\u30eb\u306fH5\u8981\u7d20\u306b\u306a\u3063\u3066\u3044\u305f"}),"\u3088\u3046\u3067\u3059\u304c\u3001\u6df1\u3055\uff08H1\uff5eH5\u306e\u30ec\u30d9\u30eb\uff09\u3092\u6c7a\u3081\u6253\u3061\u3059\u308b\u306e\u306f\u597d\u307e\u3057\u304f\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u304b\u3089\uff08\uff1f\uff09\u3001\u4eca\u306fH5\u8981\u7d20\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002"]}),"\n",(0,r.jsx)(e.p,{children:"\u6b21\u306e\u3088\u3046\u306b\u672c\u6587\u4e2d\u306b\u898b\u51fa\u3057\u3092\u66f8\u304f\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u304c"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-mdx",metastring:'title="Admonition\u306e\u8a18\u6cd5\uff08md\u3082\u3057\u304f\u306fmdx\u306b\u8a18\u8f09\uff09"',children:":::info\r\n\r\n#### \u30c6\u30b9\u30c8\r\n\r\n\uff5e\u6587\u7ae0\uff5e\r\n\r\n:::\n"})}),"\n",(0,r.jsx)(e.p,{children:"\u898b\u305f\u76ee\u304c\u30a4\u30de\u30a4\u30c1\u306b\u306a\u308a\u307e\u3059\u3002"}),"\n",(0,r.jsxs)(e.admonition,{type:"info",children:[(0,r.jsx)(e.h4,{id:"\u30c6\u30b9\u30c8",children:"\u30c6\u30b9\u30c8"}),(0,r.jsx)(e.p,{children:"\uff5e\u6587\u7ae0\uff5e"})]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.a,{href:"https://github.com/facebook/docusaurus/discussions/7146",children:"\u307b\u304b\u306e\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u8981\u671b"}),"\u3082\u4e0a\u304c\u3063\u3066\u304a\u308a\u3001\u79c1\u3082\u5c11\u3057\u4e0d\u4fbf\u306b\u611f\u3058\u3066\u3044\u305f\u306e\u3067\u3001\u6b21\u306e\u4ed5\u69d8\u306b\u306a\u308b\u3088\u3046\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u307e\u3057\u305f\u306e\u3067\u305d\u306e\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002"]}),"\n",(0,r.jsx)(e.h2,{id:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u5f8c\u306f\u3069\u3046\u306a\u308b\u304b",children:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u5f8c\u306f\u3069\u3046\u306a\u308b\u304b"}),"\n",(0,r.jsxs)(e.p,{children:["\u5f8c\u8ff0\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u3059\u308b\u3068\u3001Admonition\u306e\u30bf\u30a4\u30c8\u30eb\u90e8\u306b\uff08\u901a\u5e38\u306e\u898b\u51fa\u3057Markdown\u3068\u540c\u69d8\u306b\uff09",(0,r.jsx)(e.strong,{children:"#\u3092\u5192\u982d\u306b2\u500b\u4ee5\u4e0a\u5165\u308c\u308b"})," \u3053\u3068\u3067\u898b\u51fa\u3057\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305fTOC\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u3059\u3002#\u30922\u500b\u4ee5\u4e0a\u3068\u3057\u3066\u3044\u308b\u306e\u306f\u3001H1\u3092Admonition\u306b\u306f\u4f7f\u308f\u306a\u3044\u306f\u305a\u306e\u305f\u3081\u3002#\u3092\u5165\u308c\u306a\u3044\u5834\u5408\u306f\u898b\u51fa\u3057\u306b\u306a\u3089\u305a\u3001TOC\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u305b\u3093\u3002"]}),"\n",(0,r.jsx)(e.h3,{id:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b\u3092\u5165\u308c\u305f\u5834\u5408",children:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b#\u3092\u5165\u308c\u305f\u5834\u5408"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-mdx",metastring:'title="Admonition\u306e\u8a18\u6cd5\uff08md\u3082\u3057\u304f\u306fmdx\u306b\u8a18\u8f09\uff09"',children:":::info[#### \u898b\u51fa\u3057\u306b\u306a\u308aTOC\u306b\u53cd\u6620\u3055\u308c\u308b\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b]\r\n\r\n#\u304c4\u3064\u5206\u306e\u305f\u3081H4\u898b\u51fa\u3057\u306b\u306a\u308a\u307e\u3059\u3002TOC\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u3059\u3002\r\n\r\n:::\n"})}),"\n",(0,r.jsx)(e.p,{children:"\u2193"}),"\n","\n",(0,r.jsx)(e.admonition,{title:"#### \u898b\u51fa\u3057\u306b\u306a\u308a\u3001TOC\u306b\u53cd\u6620\u3055\u308c\u308b\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",type:"info",id:"\u898b\u51fa\u3057\u306b\u306a\u308atoc\u306b\u53cd\u6620\u3055\u308c\u308b\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",children:(0,r.jsx)(e.p,{children:"#\u304c4\u3064\u5206\u306e\u305f\u3081H4\u898b\u51fa\u3057\u306b\u306a\u308a\u307e\u3059\u3002TOC\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u3059\u3002"})}),"\n",(0,r.jsxs)(e.p,{children:["\u3053\u306e\u30d6\u30ed\u30b0\u3067\u3082TOC\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002",(0,r.jsx)(e.br,{}),"\n","\u306a\u304a\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u3092\u4e57\u305b\u305f\u969b\u306b\u30cf\u30c3\u30b7\u30e5\u30ea\u30f3\u30af\uff08#\uff09\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306fCSS\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002"]}),"\n",(0,r.jsx)(e.h3,{id:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b\u3092\u5165\u308c\u306a\u3044\u5834\u5408",children:"\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u306b#\u3092\u5165\u308c\u306a\u3044\u5834\u5408"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-mdx",metastring:'title="Admonition\u306e\u8a18\u6cd5\uff08md\u3082\u3057\u304f\u306fmdx\u306b\u8a18\u8f09\uff09"',children:":::info[\u898b\u51fa\u3057\u306b\u306a\u3089\u305aTOC\u306b\u53cd\u6620\u3055\u308c\u306a\u3044\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b]\r\n\r\n#\u304c\u306a\u3044\u305f\u3081\u898b\u51fa\u3057\u306b\u306a\u3089\u305a\u3001TOC\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u305b\u3093\u3002\r\n\r\n:::\n"})}),"\n",(0,r.jsx)(e.p,{children:"\u2193"}),"\n","\n",(0,r.jsx)(e.admonition,{title:"#### \u898b\u51fa\u3057\u306b\u306a\u3089\u305a\u3001TOC\u306b\u53cd\u6620\u3055\u308c\u306a\u3044\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",type:"info",id:"\u898b\u51fa\u3057\u306b\u306a\u3089\u305atoc\u306b\u53cd\u6620\u3055\u308c\u306a\u3044\u30bf\u30a4\u30c8\u30eb\u306e\u4f8b",children:(0,r.jsx)(e.p,{children:"#\u304c\u306a\u3044\u305f\u3081\u898b\u51fa\u3057\u306b\u306a\u308a\u307e\u305b\u3093\u3002"})}),"\n",(0,r.jsx)(e.h3,{id:"\u30bf\u30a4\u30c8\u30eb\u306bhtml\u3092\u5165\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd",children:"\u30bf\u30a4\u30c8\u30eb\u306bHTML\u3092\u5165\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd"}),"\n",(0,r.jsx)(e.p,{children:"\u306a\u304a\u30bf\u30a4\u30c8\u30eb\u90e8\u306bHTML\u3092\u5165\u308c\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002TOC\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u3059\u3002"}),"\n","\n",(0,r.jsxs)(e.admonition,{type:"info",id:"\u30c6\u30b9\u30c8123\u30c6\u30b9\u30c8\u4e0b\u7dda",children:[(0,r.jsxs)(e.mdxAdmonitionTitle,{children:["#### \u30c6\u30b9\u30c8",(0,r.jsx)("sup",{children:"123"}),"\u30c6\u30b9\u30c8",(0,r.jsx)("u",{children:"\u4e0b\u7dda"})]}),(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{children:"\r\n\u30bf\u30a4\u30c8\u30eb\u90e8\u306emarkdown\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002\r\n\r\n#### \u30c6\u30b9\u30c8<sup>123</sup>\u30c6\u30b9\u30c8<u>\u4e0b\u7dda</u>\r\n\n"})})]}),"\n",(0,r.jsx)(e.h2,{id:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u5229\u7528\u3057\u305f\u6a5f\u80fd",children:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u5229\u7528\u3057\u305f\u6a5f\u80fd"}),"\n",(0,r.jsx)(e.p,{children:"\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306f\u6b21\u306e\u6a5f\u80fd\u3092\u6d3b\u7528\u3057\u307e\u3057\u305f\u3002"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/markdown-features/plugins",children:"Remark/Rehype\u306e\u30d7\u30e9\u30b0\u30a4\u30f3"})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/swizzling",children:"Swizzling"})}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"remark\u3068rehype\u306b\u3064\u3044\u3066",children:"Remark\u3068Rehype\u306b\u3064\u3044\u3066"}),"\n",(0,r.jsxs)(e.p,{children:["Remark\u3068Rehype\u306f\u3001Markdown\u3092HTML\u306b\u5909\u63db\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u306b\u304a\u3044\u3066\u3001AST\uff08\u62bd\u8c61\u69cb\u6587\u6728\u30fbAbstract Syntax Tree\uff09\u306b\u4f5c\u7528\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u3059\u3002\u306a\u304a",(0,r.jsx)(e.a,{href:"https://github.com/unifiedjs/unified",children:"AST\u3092\u64cd\u4f5c\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0"}),"\u306e\u4e2d\u306b\u306f\u3082\u3046\uff11\u3064",(0,r.jsx)(e.a,{href:"https://github.com/retextjs/retext",children:"Retext"}),"\u3068\u3044\u3046\u30d7\u30e9\u30b0\u30a4\u30f3\u3082\u3042\u308a\u307e\u3059\u304c\u3001Docusaurus\u306b\u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002"]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-md",metastring:'title="markdown\u304b\u3089HTML\u3078\u5909\u63db\u51e6\u7406\u306e\u6d41\u308c"',children:"| ........................ process ........................... |\r\n| .......... parse ... | ... run ... | ... stringify ..........|\r\n\r\n          +--------+                     +----------+\r\nInput ->- | Parser | ->- Syntax Tree ->- | Compiler | ->- Output\r\n          +--------+          |          +----------+\r\n                              X\r\n                              |\r\n                       +--------------+\r\n                       | Transformers |\r\n                       +--------------+\n"})}),"\n",(0,r.jsxs)(e.p,{children:["\u4e0a\u56f3\uff08",(0,r.jsx)(e.a,{href:"https://github.com/unifiedjs/unified?tab=readme-ov-file#overview",children:"Unified Overview\u3088\u308a"}),"\uff09\u306bTransformers\u3068\u3042\u308b\u3068\u3053\u308d\u304cRemark/Rehype\u306e\u52d5\u4f5c\u3059\u308b\u3068\u3053\u308d\u3002"]}),"\n",(0,r.jsx)(e.p,{children:"Remark\u306fMarkdown\u5f62\u5f0f\u3067\u3001Rehype\u306fHTML\u5f62\u5f0f\u3067AST\u3092\u6271\u3044\u307e\u3059\u3002\u3069\u3061\u3089\u3082\u540c\u3058\u3088\u3046\u306bAST\u3092\u64cd\u4f5c\u3067\u304d\u307e\u3059\u304c\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u9055\u3046\u305f\u3081\u3001\u76ee\u7684\u306b\u5fdc\u3058\u3066\u9078\u629e\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u306e\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.a,{href:"https://vivliostyle.github.io/vivliostyle_doc/ja/vivliostyle-user-group-vol2/spring-raining/index.html",children:"\u3053\u3061\u3089\u306e\u30b5\u30a4\u30c8"}),"\u306a\u3069\u304c\u8a73\u3057\u3044\u3067\u3059\u3002"]}),"\n",(0,r.jsx)(e.h4,{id:"docusaurus\u306b\u304a\u3051\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0",children:"Docusaurus\u306b\u304a\u3051\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0"}),"\n",(0,r.jsxs)(e.p,{children:["Docusaurus\u3067\u3053\u308c\u3089\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u306fdocusaurus.config.json\u306b\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002",(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/markdown-features/plugins",children:"\u3053\u306e\u30da\u30fc\u30b8\u306b\u3088\u308b\u3068"}),"\u6b21\u306e4\u7a2e\u985e\u306e\u8a2d\u5b9a\u5024\u306b\u3066\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3067\u304d\u307e\u3059\u3002"]}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{}),(0,r.jsx)(e.th,{children:"\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u9069\u7528\u524d"}),(0,r.jsx)(e.th,{children:"\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u9069\u7528\u5f8c"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsxs)(e.td,{children:["Remark",(0,r.jsx)("br",{}),"Markdown\u5f62\u5f0f"]}),(0,r.jsx)(e.td,{children:"beforeDefaultRemarkPlugins"}),(0,r.jsx)(e.td,{children:"remarkPlugins"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsxs)(e.td,{children:["Rehype",(0,r.jsx)("br",{}),"HTML\u5f62\u5f0f"]}),(0,r.jsx)(e.td,{children:"beforeDefaultRehypePlugins"}),(0,r.jsx)(e.td,{children:"rehypePlugins"})]})]})]}),"\n",(0,r.jsx)(e.p,{children:"Markdown\u304b\u3089HTML\u3078\u306e\u5909\u63db\u51e6\u7406\u306e\u3068\u3053\u308d\u3067\u3001Docusaurus\u306f\u81ea\u524d\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\uff09\u3092\u4f7f\u3044\u300c\u898b\u51fa\u3057\u306bid\u3092\u3064\u3051\u308b\u300d\u300cAST\u304b\u3089TOC\u3092\u4f5c\u6210\u3059\u308b\u300d\u306a\u3069\u306e\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u4eca\u56de\u306e\u3088\u3046\u306b\u300cAmonition\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u8aad\u3093\u3067TOC\u306b\u53cd\u6620\u3059\u308b\u300d\u305f\u3081\u306b\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u9069\u7528\u524d\u3068\u9069\u7528\u5f8c\u306e\u4e21\u65b9\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u306e\u51e6\u7406\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.h3,{id:"swizzling\u306b\u3064\u3044\u3066",children:"Swizzling\u306b\u3064\u3044\u3066"}),"\n",(0,r.jsxs)(e.p,{children:["Swizzling\u306f",(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/swizzling",children:"\u3053\u3061\u3089"}),"\u306b\u8aac\u660e\u304c\u3042\u308b\u3068\u304a\u308a\u306e\u6a5f\u80fd\u3067\u3001\u7c21\u5358\u306b\u8a00\u3046\u3068React\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u6a5f\u80fd\u3067\u3059\u3002"]}),"\n",(0,r.jsx)(e.p,{children:"Swizzling\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3068\u3001Docusaurus\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u4ee3\u308f\u308a\u306b\u81ea\u52d5\u7684\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.p,{children:"\u4eca\u56de\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306eAdmonition\u306b\u306a\u3044ID\u5c5e\u6027\u3092\u6301\u305f\u305b\u308b\u305f\u3081Admonition\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u307e\u3057\u305f\u3002Swizzling\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306eAdmonition\u306e\u4ee3\u308f\u308a\u306b\u3053\u306e\u30ab\u30b9\u30bf\u30e0\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u4f7f\u308f\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.h2,{id:"\u52d5\u4f5c\u539f\u7406",children:"\u52d5\u4f5c\u539f\u7406"}),"\n",(0,r.jsx)(e.p,{children:"TOC\u306f\u300cAST\u306b\u542b\u307e\u308c\u3066\u3044\u308bheading\u8981\u7d20\u3092\u5358\u7d14\u306b\u914d\u5217\u306b\u5165\u308c\u3066\u3044\u308b\u300d\u3060\u3051\u3067\u3059\u304c\u3001\u3053\u306e\u51e6\u7406\u306f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u4e0a\u66f8\u304d\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u3053\u3067\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u51e6\u7406\u3060\u3051\u3067Admonition\u306e\u30bf\u30a4\u30c8\u30eb\u3092TOC\u306b\u53cd\u6620\u3059\u308b\u65b9\u6cd5\u3068\u3057\u3066\u6b21\u3092\u601d\u3044\u3064\u304d\u3001\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002"}),"\n",(0,r.jsxs)(e.ol,{children:["\n",(0,r.jsx)(e.li,{children:"docusaurus\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u304cTOC\u306e\u51e6\u7406\u3092\u884c\u3046\u3088\u308a\u524d\u306b\u3001Admonition\u306e\u30bf\u30a4\u30c8\u30eb\u90e8\u3092\u898b\u51fa\u3057\u3068\u3057\u3066\u65b0\u898f\u4f5c\u6210\u3057\u3001Admonition\u8981\u7d20\u306e\u76f4\u524d\u306b\u8ffd\u52a0\u3059\u308b"}),"\n",(0,r.jsx)(e.li,{children:"docusaurus\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u304cTOC\u306e\u51e6\u7406\u3092\u884c\u3044\u3001Admonition\u306e\u30bf\u30a4\u30c8\u30eb\u90e8\u304cTOC\u306b\u5165\u308b\u3002\u898b\u51fa\u3057\u306b\u306fid\u304c\u4ed8\u4e0e\u3055\u308c\u308b"}),"\n",(0,r.jsx)(e.li,{children:"\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u51e6\u7406\u304c\u7d42\u4e86\u3057\u305f\u3089\u4f5c\u6210\u3057\u305f\u898b\u51fa\u3057\u306f\u4e0d\u8981\u306b\u306a\u308b\u306e\u3067\u524a\u9664\u3059\u308b\u3002\u305d\u306e\u969b\u3001\u524a\u9664\u3059\u308b\u898b\u51fa\u3057\u3068\u540c\u3058\u30bf\u30a4\u30c8\u30eb\u3092\u3082\u3064Admonition\u8981\u7d20\u3092\u63a2\u3057\u3001id\u3092\u4e0e\u3048\u308b"}),"\n",(0,r.jsx)(e.li,{children:"Admonition\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067id\u3092HTML\u30bf\u30b0\u306b\u4ed8\u4e0e\u3059\u308b"}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"\u5b9f\u88c5",children:"\u5b9f\u88c5"}),"\n",(0,r.jsx)(e.h3,{id:"docusaurusconfigjson",children:"docusaurus.config.json"}),"\n",(0,r.jsx)(e.p,{children:"\u307e\u305adocusaurus.config.json\u306bimport\u3068plugin\u8a2d\u5b9a\u3092\u8a18\u5165\u3057\u307e\u3059\uff08\u30cf\u30a4\u30e9\u30a4\u30c8\u90e8\uff09\u3002"}),"\n",(0,r.jsx)(e.p,{children:"\u3053\u308c\u3067Docusaurus\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u9069\u7528\u306e\u524d\u5f8c\u306b\u305d\u308c\u305e\u308c\u81ea\u4f5c\u306eRemark/Rehype\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5b9f\u884c\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.p,{children:"blog\u306a\u3069\u3092\u5165\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3082\u8a18\u8f09\u3057\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-js",metastring:'title="docusaurus.config.json"',children:"// highlight-start\r\nimport admonitionTitleToHeadingBeforeTOC from './src/remark/admonition-title-to-heading-before-toc.js';\r\nimport admonitionTitleToHeadingAfterTOC from './src/rehype/admonition-title-to-heading-after-toc.js';\r\n// highlight-end\r\n\r\nexport default {\r\n    // ...\r\n    presets: [\r\n    [\r\n        'classic',\r\n        /** @type {import('@docusaurus/preset-classic').Options} */\r\n        ({\r\n        docs: {\r\n            // ...\r\n            // highlight-start\r\n            beforeDefaultRemarkPlugins: [admonitionTitleToHeadingBeforeTOC],\r\n            rehypePlugins: [admonitionTitleToHeadingAfterTOC],\r\n            // highlight-end\r\n        },\r\n        blog: {\r\n            // ...\r\n            // highlight-start\r\n            beforeDefaultRemarkPlugins: [admonitionTitleToHeadingBeforeTOC],\r\n            rehypePlugins: [admonitionTitleToHeadingAfterTOC],\r\n            // highlight-end\r\n        },\r\n        // ...\r\n        }),\r\n    ]],\r\n    // ...\r\n}\n"})}),"\n",(0,r.jsx)(e.h3,{id:"remarkrehype\u30d7\u30e9\u30b0\u30a4\u30f3",children:"Remark/Rehype\u30d7\u30e9\u30b0\u30a4\u30f3"}),"\n",(0,r.jsx)(e.p,{children:"\u6b21\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.p,{children:"docusaurus\u306esrc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4e0b\u306brehype\u3068remark\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u308a\u3001\u6b21\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u5185\u5bb9\u30672\u3064\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u308a\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-js",metastring:'title="src/rehype/admonition-title-to-heading-before-toc.js"',children:"import {visit} from 'unist-util-visit';\r\n\r\nconst plugin = (options) => {\r\n  const transformer = async (ast) => {\r\n    let newBeginningText = \"\";\r\n    const visitor = ((node, index, parent) => {\r\n      if (node.type === 'containerDirective') {\r\n        // :::info\u306a\u3069\u306b\u7d9a\u304f\u30bf\u30a4\u30c8\u30eb\u5192\u982dText\u90e8\uff08\u5192\u982d#\u3092\u542b\u3080\uff08\u3082\u3057\u304f\u306f\u542b\u307e\u306a\u3044\uff09\u90e8\u5206\uff09\u3092\u53d6\u5f97\uff08:::info ##** \uff09\r\n        // \uff08\u30bf\u30a4\u30c8\u30eb\u5168\u4f53\u306b\u306fHTML\u7b49\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u5192\u982dText\u90e8\u3060\u3051\u64cd\u4f5c\u3059\u308b\u3001\u6b8b\u308a\u306f\u30b7\u30e3\u30ed\u2015\u30b3\u30d4\u30fc\uff09\r\n        const beginningText = node.children[0].children[0].value;\r\n\r\n        // \u30bf\u30a4\u30c8\u30eb\u5192\u982dText\u90e8\u306b#\u304c2\u3064\u4ee5\u4e0a\u9023\u7d9a\u3057\u3066\u3044\u308b\u3068\u304d\r\n        if(/^##/.test(beginningText)) {\r\n          // \u30bf\u30a4\u30c8\u30eb\u5192\u982d\u90e8\u304b\u3089#\u3068\u305d\u308c\u306b\u7d9a\u304f\u7a7a\u767d\u3092\u524a\u9664\r\n          newBeginningText = beginningText.replace(/^#+/, '').trim();\r\n\r\n          // \u30bf\u30a4\u30c8\u30eb\u90e8\u5192\u982d\u3060\u3051\u66f4\u65b0\u3057\u3001\u6b8b\u308a\u306f\u30b7\u30e3\u30ed\u2015\u30b3\u30d4\u30fc\r\n          // \u307e\u305a\u30bf\u30a4\u30c8\u30eb\u90e8\u5168\u4f53\u3092\u30b7\u30e3\u30ed\u2015\u30b3\u30d4\u30fc\r\n          let titleNodes = [...node.children[0].children];\r\n\r\n          // \u5192\u982d\u8981\u7d20\u306evalue\u3092\u66f4\u65b0\uff08\u307b\u304b\u306f\u30b7\u30e3\u30ed\u2015\u30b3\u30d4\u30fc\uff09\r\n          const newTitleBeginningNode = {\r\n            ...titleNodes[0],\r\n            value: newBeginningText,\r\n          }\r\n         \r\n          // \u30bf\u30a4\u30c8\u30eb\u30ce\u30fc\u30c9\u306e\u5192\u982d\u8981\u7d20\u3060\u3051\u66f4\u65b0\uff08\u307b\u304b\u306f\u30b7\u30e3\u30ed\u2015\u30b3\u30d4\u30fc\uff09\r\n          const newTitleNodes = [ ...titleNodes ];\r\n          newTitleNodes[0] = newTitleBeginningNode;\r\n\r\n          // visit\u3057\u3066\u3044\u308bcontainerDirective\u306e\u524d\u306bheading\u30ce\u30fc\u30c9\u3092\u8ffd\u52a0\r\n          parent.children.splice(index, 0, {\r\n            type: 'heading',\r\n            depth: (beginningText.match(/^##+/) || [''])[0].length, // #\u306e\u9023\u7d9a\u6570\u304cheading\u306e\u6df1\u3055\r\n            children: newTitleNodes,\r\n          });\r\n          //  \u6b21\u306b\u691c\u7d22\u3059\u308b\u306e\u306findex\u30922\u3064\u5206\u98db\u3070\u3057\u305f\u30ce\u30fc\u30c9\r\n          return index + 2;\r\n        }\r\n      }\r\n    });\r\n  \r\n    visit(ast, 'containerDirective', visitor);\r\n  \r\n  };\r\n  return transformer;\r\n};\r\n\r\nexport default plugin;\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-js",metastring:'title="src/rehype/admonition-title-to-heading-after-toc.js"',children:"import {visit} from 'unist-util-visit';\r\n\r\nconst plugin = (options) => {\r\n  const transformer = async (ast) => {\r\n    let hId = null;\r\n    let hContent = null;\r\n    visit(ast, 'element', (node, index, parent) => {\r\n      if (/^h[2-6]$/.test(node.tagName) && node.properties && node.properties.id) {\r\n        // H\u8981\u7d20\uff08h2~h6\uff09\u3092\u898b\u3064\u3051\u305f\u5834\u5408\r\n        \r\n        // ID\u3068\u30bf\u30a4\u30c8\u30eb\u306e\u5192\u982dText\u90e8\u3092\u53d6\u5f97\u3059\u308b\r\n        hId = node.properties.id;\r\n        hContent = node.children ? node.children[0].value :\r\n          node.children[0].children[0] ? node.children[0].children[0].value : '';\r\n\r\n        // \u7d9a\u304fAdmonition\u3092\u63a2\u3059\uff08doc\u306fH\u8981\u7d20\u3068admonition\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u304c\r\n        // blog\u3067\u306f\u306a\u305c\u304b\u6539\u884c\u8981\u7d20{ type:'text', value:'\\n' }\u304c\u9593\u306b\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u5ff5\u306e\u305f\u3081\u96a3\u63a53\u8981\u7d20\u3092\u63a2\u3059\r\n        for (let i = index + 1; i < index + 4 && i < parent.children.length; i++) {\r\n          if(parent.children[i] && parent.children[i].tagName === 'admonition') {\r\n            // admonition\uff08div\uff09\u3092\u898b\u3064\u3051\u305f\u5834\u5408\r\n            const admonitionNode = parent.children[i];\r\n            \r\n            // admonition\u30bf\u30a4\u30c8\u30eb\u306e\u5192\u982dText\u90e8\u5206\u3092\u53d6\u5f97\uff08properties.title\u3082\u3057\u304f\u306fchildren[0].children[0].value\uff09\r\n            const admonitionNodeTitle = admonitionNode.properties.title ? admonitionNode.properties.title :\r\n              admonitionNode.children[0] && admonitionNode.children[0].children[0] ? admonitionNode.children[0].children[0].value : '';\r\n\r\n            if(/^##/.test(admonitionNodeTitle) && admonitionNodeTitle.replace(/^#+/, '').trim() === hContent.trim()) {\r\n              // #\u3067\u59cb\u307e\u3063\u3066\u3044\u3066\u3001\u30bf\u30a4\u30c8\u30eb\u5192\u982d\u90e8\u304c\u540c\u3058\u5834\u5408\r\n              // div\u306eid\u3092H\u30bf\u30b0\u306eid\u306b\u8a2d\u5b9a\r\n              admonitionNode.properties.id = hId;\r\n              // H\u8981\u7d20\u3092\u524a\u9664\r\n              parent.children.splice(index, 1);\r\n            }\r\n          }\r\n        }\r\n      }\r\n    });\r\n  };\r\n  return transformer;\r\n};\r\n\r\nexport default plugin;\n"})}),"\n",(0,r.jsxs)(e.admonition,{title:"Admonition\u306e\u30c4\u30ea\u30fc\u69cb\u9020",type:"note",children:[(0,r.jsx)(e.p,{children:"\u53c2\u8003\u307e\u3067\u306b\u3001Remark\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u898b\u308b\u3068Admonition\u306eAST\u306f\u305f\u3068\u3048\u3070\u6b21\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002"}),(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-javascript",metastring:'title="Admonition\u306e\u30c4\u30ea\u30fc\u69cb\u9020\uff08\u4e00\u4f8b\uff09"',children:"{\r\n  type: 'containerDirective',\r\n  name: 'info',\r\n  attributes: {},\r\n  children: [\r\n    {\r\n      type: 'paragraph',\r\n      data: { directiveLabel: true },\r\n      children: [\r\n        {\r\n          type: 'text',\r\n          value: '#### info title \u3082\u3057HTML\u7b49\u304c\u5165\u308b\u3068\uff08\u3053\u3053\u306ba\u30bf\u30b0\u3092\u5165\u308c\u308b\u3068\uff09',\r\n          position: [Object]\r\n        },\r\n        {\r\n          type: 'mdxJsxTextElement',\r\n          name: 'a',\r\n          attributes: [],\r\n          position: [Object],\r\n          data: [Object],\r\n          children: [Array]\r\n        },\r\n        { type: 'text', value: '\u3053\u306e\u3088\u3046\u306b\u30bf\u30a4\u30c8\u30eb\u90e8\u304c\u5225\u3005\u306e\u8981\u7d20\u3068\u3057\u3066\u914d\u5217\u306b\u5165\u3063\u3066\u3044\u308b\u3002', position: [Object] }\r\n      ],\r\n      position: {\r\n        start: { line: 1347, column: 8, offset: 34053 },\r\n        end: { line: 1347, column: 55, offset: 34100 }\r\n      }\r\n    },\r\n    { type: 'paragraph', children: [Array], position: [Object] },\r\n    ...\r\n  ],\r\n  ...\r\n}\n"})})]}),"\n",(0,r.jsx)(e.h3,{id:"swizzling",children:"Swizzling"}),"\n",(0,r.jsx)(e.p,{children:"\u6b21\u306bSwizzling\u3067\u3059\u3002"}),"\n",(0,r.jsx)(e.p,{children:"Docusaurus\u306esrc/theme\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bAdmonition\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u308a\u3001\u6b21\u306e\u4e00\u4f8b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002"}),"\n",(0,r.jsxs)(e.p,{children:["\u306a\u304a",(0,r.jsx)(e.a,{href:"https://docusaurus.io/docs/swizzling#ejecting",children:"\u3053\u3053\u306b\u8aac\u660e\u304c\u3042\u308b\u901a\u308a"}),"Swizzling\u306b\u306fEjecting\u3068Wrapping\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002"]}),"\n",(0,r.jsx)(e.p,{children:"Wrapping\u3067\u306fAdmonition\u306e\u5185\u90e8\u307e\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u306a\u3044\u305f\u3081\u300c\u30bf\u30a4\u30c8\u30eb\u90e8\u5206\u306bid\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4ed8\u3051\u308b\u300d\u3068\u3044\u3063\u305f\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081Ejecting\u3092\u4f7f\u3044\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.admonition,{type:"note",children:(0,r.jsx)(e.p,{children:"Ejecting\u3092\u4f7f\u3046\u5834\u5408\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306b\u3088\u3063\u3066\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u6319\u52d5\u304c\u5909\u308f\u3063\u3066\u304f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u306e\u969b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002"})}),"\n",(0,r.jsx)(e.h4,{id:"ejecting",children:"Ejecting"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-bash",children:"npm run swizzle @docusaurus/theme-classic Admonition -- --eject\n"})}),"\n",(0,r.jsx)(e.p,{children:"Docusaurus V3.1\u3067\u306f\u6b21\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u307e\u3059\u306e\u3067\u3001YES\u3092\u9078\u3073\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-bash",children:"? Do you really want to swizzle this unsafe internal component? \xbb - Use arrow-keys. Return to submit.\r\n    NO: cancel and stay safe\r\n>   YES: I know what I am doing!\n"})}),"\n",(0,r.jsx)(e.p,{children:"Ejecting\u3092\u3059\u308b\u3068\u3001\u5b9f\u8cea\u7684\u306bnode_modules\u306e@docusaurus/theme-classic/lib/theme\u306b\u3042\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304csrc/theme\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u3002"}),"\n",(0,r.jsx)(e.p,{children:"\u3042\u3068\u306f\u30b3\u30d4\u30fc\u3055\u308c\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u3044\u3058\u308b\u3060\u3051\u3067\u3059\u3002"}),"\n",(0,r.jsx)(e.h4,{id:"\u30b3\u30fc\u30c9\u306e\u5909\u66f4",children:"\u30b3\u30fc\u30c9\u306e\u5909\u66f4"}),"\n",(0,r.jsx)(e.p,{children:"Layout\u30d5\u30a1\u30a4\u30eb\u3092\u6b21\u306e\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u306e\u307f\u3067\u3059\u3002"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-js",metastring:'title="src/theme/Admonition/Layout/index.js"',children:"import React from 'react';\r\nimport clsx from 'clsx';\r\nimport {ThemeClassNames} from '@docusaurus/theme-common';\r\nimport styles from './styles.module.css';\r\n// highlight-next-line\r\nimport headingStyles from '@docusaurus/theme-classic/lib/theme/Heading/styles.module.css';\r\n\r\nfunction AdmonitionContainer({type, className, children}) {\r\n  return (\r\n    <div\r\n      className={clsx(\r\n        ThemeClassNames.common.admonition,\r\n        ThemeClassNames.common.admonitionType(type),\r\n        styles.admonition,\r\n        className,\r\n      )}>\r\n      {children}\r\n    </div>\r\n  );\r\n}\r\n// highlight-start\r\nfunction AdmonitionHeading({icon, title, id}) {\r\n  let depth = 0;\r\n  let trimmedTitle = title;\r\n  // title\u306bHTML\u7b49\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u6587\u5b57\u5217\u3067\u306f\u306a\u304f\u914d\u5217\u306b\u306a\u308b\r\n  if(typeof title === \"string\") {\r\n    // \u6587\u5b57\u5217\u5192\u982d\u306e#\u306e\u6570\u3092\u6570\u3048\u308b\uff08\r\n    depth = title.match ? (title.toString().match(/^#+/) || [''])[0].length : 0;\r\n    // #\u3092\u7701\u3044\u305f\u30bf\u30a4\u30c8\u30eb\u3092\u5f97\u308b\r\n    trimmedTitle = depth > 0 ? title.replace(/^#+/, '').trim() : title;\r\n  } else if (typeof title[0] === \"string\") {\r\n    depth = title[0].match ? (title[0].match(/^#+/) || [''])[0].length : 0;\r\n    trimmedTitle = depth > 0 ? [title[0].replace(/^#+/, '').trim(), ...title.slice(1)] : title;\r\n  }\r\n\r\n  // \u30b9\u30af\u30ed\u30fc\u30eb\u4f4d\u7f6e\u8abf\u6574\u306ecss\r\n  const classNames = clsx(\"anchor\", \"title\", headingStyles.anchorWithStickyNavbar);\r\n  // depth\u306b\u5fdc\u3058\u3066\u898b\u51fa\u3057\u30bf\u30b0\u3092\u30ec\u30f3\u30c0\u30fc\r\n  return (\r\n    <div className={styles.admonitionHeading}>\r\n      <span className={styles.admonitionIcon}>{icon}</span>\r\n      {(() => {\r\n        if (depth == 3) {\r\n          return(\r\n            <h3\r\n              id={id}\r\n              className={classNames}\r\n            >\r\n              {trimmedTitle}\r\n            </h3>\r\n          )\r\n        } else if (depth == 4) {\r\n          return(\r\n            <h4\r\n              id={id}\r\n              className={classNames}\r\n            >\r\n              {trimmedTitle}\r\n            </h4>\r\n          )\r\n        } else if (depth == 5) {\r\n          return(\r\n            <h5\r\n              id={id}\r\n              className={classNames}\r\n            >\r\n              {trimmedTitle}\r\n            </h5>\r\n          )\r\n        } else if (depth == 6) {\r\n          return(\r\n            <h6\r\n              id={id}\r\n              className={classNames}\r\n            >\r\n              {trimmedTitle}\r\n            </h6>\r\n          )\r\n        } else {\r\n          return(\r\n            <>\r\n              {trimmedTitle}\r\n            </>\r\n          )\r\n        }\r\n      })()}\r\n    </div>\r\n  );\r\n}\r\n// highlight-end\r\nfunction AdmonitionContent({children}) {\r\n  return children ? (\r\n    <div className={styles.admonitionContent}>{children}</div>\r\n  ) : null;\r\n}\r\nexport default function AdmonitionLayout(props) {\r\n  // highlight-next-line\r\n  const {type, icon, title, children, className, id} = props;\r\n  return (\r\n    <AdmonitionContainer type={type} className={className}>\r\n  // highlight-next-line\r\n      <AdmonitionHeading title={title} icon={icon} id={id} />\r\n      <AdmonitionContent>{children}</AdmonitionContent>\r\n    </AdmonitionContainer>\r\n  );\r\n}\n"})}),"\n",(0,r.jsx)(e.p,{children:"\u4e0a\u8a18\u3092\u8a2d\u5b9a\u5f8c\u3001npm start\u7b49\u306e\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u3067\u3059\u3002"}),"\n",(0,r.jsx)(e.p,{children:"\u4ee5\u4e0a\u3067\u3059\u3002"})]})}function h(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(c,{...n})}):c(n)}},32685:(n,e,i)=>{i.d(e,{A:()=>r});const r=i.p+"assets/images/admonition-no-toc-98d7dfb77b6d769fe6815f0fb702575d.png"},28453:(n,e,i)=>{i.d(e,{R:()=>o,x:()=>d});var r=i(96540);const t={},s=r.createContext(t);function o(n){const e=r.useContext(s);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function d(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:o(n.components),r.createElement(s.Provider,{value:e},n.children)}}}]);