docusaurus/assets/js/86e3a3d9.75b82844.js
2024-10-22 10:43:30 +00:00

1 line
No EOL
7.2 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["59093"],{37760:function(e,t,r){r.r(t),r.d(t,{metadata:()=>n,contentTitle:()=>l,default:()=>f,assets:()=>u,toc:()=>d,frontMatter:()=>s});var n=JSON.parse('{"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":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1729593657000,"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"}}'),o=r("24246"),a=r("80980"),c=r("78042"),i=r("34134");let s={},l="Category with a doc of category's name",u={},d=[{value:"Intro",id:"intro",level:2},{value:"Category content",id:"category-content",level:2}];function m(e){let t={admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,a.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{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,i.jA)().items})]})}function f(e={}){let{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(m,{...e})}):m(e)}f.displayName="MDXContent(_dogfooding/_docs tests/tests/category-links/with-category-name-doc/with-category-name-doc.mdx)"},78042:function(e,t,r){r.d(t,{Z:()=>b});var n=r("24246");r("27378");var o=r("90496"),a=r("85921"),c=r("35363"),i=r("11660"),s=r("82095"),l=r("77827"),u=r("57922");let d={cardContainer:"cardContainer_Uewx",cardTitle:"cardTitle_dwRT",cardDescription:"cardDescription_mCBT"};function m(e){var t=e.href,r=e.children;return(0,n.jsx)(c.Z,{href:t,className:(0,o.Z)("card padding--lg",d.cardContainer),children:r})}function f(e){var t=e.href,r=e.icon,a=e.title,c=e.description;return(0,n.jsxs)(m,{href:t,children:[(0,n.jsxs)(u.Z,{as:"h2",className:(0,o.Z)("text--truncate",d.cardTitle),title:a,children:[r," ",a]}),c&&(0,n.jsx)("p",{className:(0,o.Z)("text--truncate",d.cardDescription),title:c,children:c})]})}function h(e){var t,r,o=e.item,c=(0,a.LM)(o);var s=(t=(0,i.c)().selectMessage,function(e){return t(e,(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:e}))});return c?(0,n.jsx)(f,{href:c,icon:"\uD83D\uDDC3\uFE0F",title:o.label,description:null!==(r=o.description)&&void 0!==r?r:s(o.items.length)}):null}function p(e){var t,r,o=e.item,c=(0,s.Z)(o.href)?"\uD83D\uDCC4\uFE0F":"\uD83D\uDD17",i=(0,a.xz)(null!==(t=o.docId)&&void 0!==t?t:void 0);return(0,n.jsx)(f,{href:o.href,icon:c,title:o.label,description:null!==(r=o.description)&&void 0!==r?r:null==i?void 0:i.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,n.jsx)(p,{item:t});case"category":return(0,n.jsx)(h,{item:t});default:throw Error("unknown item type ".concat(JSON.stringify(t)))}}function y(e){var t=e.className,r=(0,a.jA)();return(0,n.jsx)(b,{items:r.items,className:t})}function b(e){var t=e.items,r=e.className;if(!t)return(0,n.jsx)(y,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},e));var c=(0,a.MN)(t);return(0,n.jsx)("section",{className:(0,o.Z)("row",r),children:c.map(function(e,t){return(0,n.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,n.jsx)(g,{item:e})},t)})})}},34134:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,{jA:function(){return o}}),r(8156);function o(){for(var e,t,o=arguments.length,a=Array(o),c=0;c<o;c++)a[c]=arguments[c];return(t=r(90158)).useCurrentSidebarCategory.apply(t,function(e){if(Array.isArray(e))return n(e)}(e=a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}},11660:function(e,t,r){r.d(t,{c:function(){return s}});var n=r(27378),o=r(8156),a=["zero","one","two","few","many","other"];function c(e){return a.filter(function(t){return e.includes(t)})}var i={locale:"en",pluralForms:c(["one","other"]),select:function(e){return 1===e?"one":"other"}};function s(){var e,t=(e=(0,o.Z)().i18n.currentLocale,(0,n.useMemo)(function(){try{var t,r;return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:c(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(t){return console.error('Failed to use Intl.PluralRules for locale "'.concat(e,'".\nDocusaurus will fallback to the default (English) implementation.\nError: ').concat(t.message,"\n")),i}},[e]));return{selectMessage:function(e,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale=".concat(r.locale,", a maximum of ").concat(r.pluralForms.length," plural forms are expected (").concat(r.pluralForms.join(","),"), but the message contains ").concat(n.length,": ").concat(e));var o=r.select(t);return n[Math.min(r.pluralForms.indexOf(o),n.length-1)]}(r,e,t)}}}},80980:function(e,t,r){r.d(t,{Z:function(){return i},a:function(){return c}});var n=r(27378);let o={},a=n.createContext(o);function c(e){let t=n.useContext(a);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]);