docusaurus/assets/js/86e3a3d9.e20cc67c.js
2024-07-01 15:38:32 +00:00

1 line
No EOL
6.1 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[15158],{24239:(e,t,n)=>{n.d(t,{Z:()=>w});var o=n(24246),r=(n(27378),n(40624)),c=n(41876),s=n(41428),a=n(7812),i=n(64149),l=n(36712),d=n(52615);const u={cardContainer:"cardContainer_Uewx",cardTitle:"cardTitle_dwRT",cardDescription:"cardDescription_mCBT"};function m({href:e,children:t}){return(0,o.jsx)(s.Z,{href:e,className:(0,r.Z)("card padding--lg",u.cardContainer),children:t})}function h({href:e,icon:t,title:n,description:c}){return(0,o.jsxs)(m,{href:e,children:[(0,o.jsxs)(d.Z,{as:"h2",className:(0,r.Z)("text--truncate",u.cardTitle),title:n,children:[t," ",n]}),c&&(0,o.jsx)("p",{className:(0,r.Z)("text--truncate",u.cardDescription),title:c,children:c})]})}function g({item:e}){const t=(0,c.LM)(e),n=function(){const{selectMessage:e}=(0,a.c)();return t=>e(t,(0,l.I)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return t?(0,o.jsx)(h,{href:t,icon:"\ud83d\uddc3\ufe0f",title:e.label,description:null!==(r=e.description)&&void 0!==r?r:n(e.items.length)}):null;var r}function p({item:e}){const t=(0,i.Z)(e.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17";var n;const r=(0,c.xz)(null!==(n=e.docId)&&void 0!==n?n:void 0);var s;return(0,o.jsx)(h,{href:e.href,icon:t,title:e.label,description:null!==(s=e.description)&&void 0!==s?s:null==r?void 0:r.description})}function f({item:e}){switch(e.type){case"link":return(0,o.jsx)(p,{item:e});case"category":return(0,o.jsx)(g,{item:e});default:throw new Error(`unknown item type ${JSON.stringify(e)}`)}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x({className:e}){const t=(0,c.jA)();return(0,o.jsx)(w,{items:t.items,className:e})}function w(e){const{items:t,className:n}=e;if(!t)return(0,o.jsx)(x,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){y(e,t,n[t])}))}return e}({},e));const s=(0,c.MN)(t);return(0,o.jsx)("section",{className:(0,r.Z)("row",n),children:s.map(((e,t)=>(0,o.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,o.jsx)(f,{item:e})},t)))})}},7812:(e,t,n)=>{n.d(t,{c:()=>l});var o=n(27378),r=n(4423);const c=["zero","one","two","few","many","other"];function s(e){return c.filter((t=>e.includes(t)))}const a={locale:"en",pluralForms:s(["one","other"]),select:e=>1===e?"one":"other"};function i(){const{i18n:{currentLocale:e}}=(0,r.Z)();return(0,o.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:s(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),a}}),[e])}function l(){const e=i();return{selectMessage:(t,n)=>function(e,t,n){const o=e.split("|");if(1===o.length)return o[0];o.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${o.length}: ${e}`);const r=n.select(t),c=n.pluralForms.indexOf(r);return o[Math.min(c,o.length-1)]}(n,t,e)}}},36911:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>l,toc:()=>u});var o=n(24246),r=n(71670),c=n(24239),s=n(41876);const a={},i="Category with a doc of category's name",l={id:"tests/category-links/with-category-name-doc/with-category-name-doc",title:"Category with a doc of category's name",description:"You should be able to click on the category and browse this /.md doc",source:"@site/_dogfooding/_docs tests/tests/category-links/with-category-name-doc/with-category-name-doc.mdx",sourceDirName:"tests/category-links/with-category-name-doc",slug:"/tests/category-links/with-category-name-doc/",permalink:"/tests/docs/tests/category-links/with-category-name-doc/",draft:!1,unlisted:!1,tags:[],version:"current",lastUpdatedBy:"S\xe9bastien Lorber",lastUpdatedAt:171984808e4,frontMatter:{},sidebar:"sidebar",previous:{title:"Sample doc",permalink:"/tests/docs/tests/category-links/regular-category/sample-doc"},next:{title:"Sample doc",permalink:"/tests/docs/tests/category-links/with-category-name-doc/sample-doc"}},d={},u=[{value:"Intro",id:"intro",level:2},{value:"Category content",id:"category-content",level:2}];function m(e){const t={admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"category-with-a-doc-of-categorys-name",children:"Category with a doc of category's name"}),"\n",(0,o.jsxs)(t.p,{children:["You should be able to click on the category and browse this ",(0,o.jsx)(t.code,{children:"<categoryName>/<categoryName>.md"})," doc"]}),"\n",(0,o.jsx)(t.h2,{id:"intro",children:"Intro"}),"\n",(0,o.jsx)(t.p,{children:"Some intro text"}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsx)(t.p,{children:"It is also possible to render the card items for that category thanks to MDX:"})}),"\n",(0,o.jsx)(t.h2,{id:"category-content",children:"Category content"}),"\n","\n",(0,o.jsx)(c.Z,{items:(0,s.jA)().items})]})}function h(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(m,{...e})}):m(e)}h.displayName="MDXContent(_dogfooding/_docs tests/tests/category-links/with-category-name-doc/with-category-name-doc.mdx)"},71670:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>s});var o=n(27378);const r={},c=o.createContext(r);function s(e){const t=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),o.createElement(c.Provider,{value:t},e.children)}}}]);