{"pageProps":{"post":{"mdxSource":"var Component=(()=>{var m=Object.create;var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var r=a=>c(a,\"__esModule\",{value:!0});var f=(a,s)=>()=>(s||a((s={exports:{}}).exports,s),s.exports),y=(a,s)=>{r(a);for(var t in s)c(a,t,{get:s[t],enumerable:!0})},b=(a,s,t)=>{if(s&&typeof s==\"object\"||typeof s==\"function\")for(let n of N(s))!g.call(a,n)&&n!==\"default\"&&c(a,n,{get:()=>s[n],enumerable:!(t=u(s,n))||t.enumerable});return a},w=a=>b(r(c(a!=null?m(k(a)):{},\"default\",a&&a.__esModule&&\"default\"in a?{get:()=>a.default,enumerable:!0}:{value:a,enumerable:!0})),a);var p=f((C,d)=>{d.exports=_jsx_runtime});var T={};y(T,{default:()=>j,frontmatter:()=>x});var e=w(p());function i({children:a}){return React.createElement(\"h1\",{className:\"text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-5xl md:leading-14\"},a)}var x={title:\"New features in v1\",date:new Date(1628350334e3),lastmod:\"2021-02-01\",tags:[\"next-js\",\"tailwind\",\"guide\"],draft:!1,summary:\"An overview of the new features released in v1 - code block copy, multiple authors, frontmatter layout and more\",layout:\"PostSimple\",bibliography:\"references-data.bib\",canonicalUrl:\"https://tailwind-nextjs-starter-blog.vercel.app/blog/new-features-in-v1/\"};function v(a={}){let{wrapper:s}=a.components||{};return s?(0,e.jsx)(s,Object.assign({},a,{children:(0,e.jsx)(t,{})})):t();function t(){let n=Object.assign({h2:\"h2\",a:\"a\",span:\"span\",p:\"p\",sup:\"sup\",pre:\"pre\",code:\"code\",strong:\"strong\",h3:\"h3\",em:\"em\",ul:\"ul\",li:\"li\",br:\"br\",div:\"div\",i:\"i\",blockquote:\"blockquote\",ol:\"ol\",section:\"section\"},a.components),{TOCInline:l,BlogNewsletterForm:o}=n;return o||h(\"BlogNewsletterForm\",!0),l||h(\"TOCInline\",!0),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(n.h2,{id:\"overview\",children:[(0,e.jsx)(n.a,{href:\"#overview\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Overview\"]}),(0,e.jsx)(n.p,{children:\"A post on the new features introduced in v1.0. New features:\"}),(0,e.jsx)(l,{toc:a.toc,exclude:\"Overview\",toHeading:2}),(0,e.jsxs)(n.p,{children:[\"First load JS decreased from 43kB to 39kB despite all the new features added!\",(0,e.jsx)(n.sup,{children:(0,e.jsx)(n.a,{href:\"#user-content-fn-1\",\"aria-describedby\":\"footnote-label\",\"data-footnote-ref\":!0,id:\"user-content-fnref-1\",children:\"1\"})})]}),(0,e.jsxs)(n.p,{children:[\"See \",(0,e.jsx)(n.a,{href:\"#upgrade-guide\",children:\"upgrade guide\"}),\" below if you are migrating from v0 version of the template.\"]}),(0,e.jsxs)(n.h2,{id:\"theme-colors\",children:[(0,e.jsx)(n.a,{href:\"#theme-colors\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Theme colors\"]}),(0,e.jsx)(n.p,{children:\"You can easily modify the theme color by changing the primary attribute in the tailwind config file:\"}),(0,e.jsx)(\"div\",{className:\"remark-code-title\",children:\"tailwind.config.js\"}),(0,e.jsx)(n.pre,{className:\"language-js\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-js\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"theme\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"colors\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"primary\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" colors\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"teal\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"gray\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" colors\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"neutral\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token operator spread\",children:\"...\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token operator spread\",children:\"...\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]})]})}),(0,e.jsx)(n.p,{children:\"The primary color attribute should be assigned an object with keys from 50, 100, 200 ... 900 and the corresponding color code values.\"}),(0,e.jsxs)(n.p,{children:[\"Tailwind includes great default color palettes that can be used for theming your own website. Check out \",(0,e.jsx)(n.a,{href:\"https://tailwindcss.com/docs/customizing-colors\",children:\"customizing colors documentation page\"}),\" for the full range of options.\"]}),(0,e.jsxs)(n.p,{children:[\"Migrating from v1? You can revert to the previous theme by setting \",(0,e.jsx)(n.code,{children:\"primary\"}),\" to \",(0,e.jsx)(n.code,{children:\"colors.sky\"}),\" (Tailwind 2.2.2 and above, otherwise \",(0,e.jsx)(n.code,{children:\"colors.lightBlue\"}),\") and changing gray to \",(0,e.jsx)(n.code,{children:\"colors.gray\"}),\".\"]}),(0,e.jsxs)(n.p,{children:[\"From v1.1.2+, you can also customize the style of your code blocks easily by modifying the \",(0,e.jsx)(n.code,{children:\"css/prism.css\"}),\" stylesheet. Token classnames are compatible with prismjs so you can copy and adapt token styles from a prismjs stylesheet e.g. \",(0,e.jsx)(n.a,{href:\"https://github.com/PrismJS/prism-themes\",children:\"prism themes\"}),\".\"]}),(0,e.jsxs)(n.h2,{id:\"xdm-mdx-compiler\",children:[(0,e.jsx)(n.a,{href:\"#xdm-mdx-compiler\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Xdm MDX compiler\"]}),(0,e.jsxs)(n.p,{children:[\"We switched the MDX bundler from \",(0,e.jsx)(n.a,{href:\"https://github.com/hashicorp/next-mdx-remote\",children:\"next-mdx-remote\"}),\" to \",(0,e.jsx)(n.a,{href:\"https://github.com/kentcdodds/mdx-bundler\",children:\"mdx-bundler\"}),\". This uses \",(0,e.jsx)(n.a,{href:\"https://github.com/wooorm/xdm\",children:\"xdm\"}),\" under the hood, the latest micromark 3 and remark, rehype libraries.\"]}),(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.strong,{children:\"Warning:\"}),\" If you were using custom remark or rehype libraries, please upgrade to micromark 3 compatible ones. If you are upgrading, please delete \",(0,e.jsx)(n.code,{children:\"node_modules\"}),\" and \",(0,e.jsx)(n.code,{children:\"package-lock.json\"}),\" to avoid having past dependencies related issues.\"]}),(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.a,{href:\"https://github.com/wooorm/xdm\",children:\"xdm\"}),\" contains multiple improvements over \",(0,e.jsx)(n.a,{href:\"https://github.com/mdx-js/mdx\",children:\"@mdx-js/mdx\"}),\", the compiler used internally by next-mdx-remote, but there might be some breaking behaviour changes. Please check your markdown output to verify.\"]}),(0,e.jsx)(n.p,{children:\"Some new possibilities include loading components directly in the mdx file using the import syntax and including js code which could be compiled and bundled at the build step.\"}),(0,e.jsx)(n.p,{children:\"For example, the following jsx snippet can be used directly in an MDX file to render the page title component:\"}),(0,e.jsx)(n.pre,{className:\"language-jsx\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-jsx\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token keyword module\",children:\"import\"}),\" \",(0,e.jsx)(n.span,{className:\"token imports\",children:(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"PageTitle\"})}),\" \",(0,e.jsx)(n.span,{className:\"token keyword module\",children:\"from\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'./PageTitle.js'\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"PageTitle\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token plain-text\",children:\" Using JSX components in MDX \"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"PageTitle\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),`\n`]})]})}),\" \",(0,e.jsx)(i,{children:\"Using JSX components in MDX\"}),(0,e.jsxs)(n.p,{children:[\"The default configuration resolves all components relative to the \",(0,e.jsx)(n.code,{children:\"components\"}),\" directory.\"]}),(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.strong,{children:\"Note\"}),\": Components which require external image loaders also require additional esbuild configuration. Components which are dependent on global application state on lifecycle like the Nextjs \",(0,e.jsx)(n.code,{children:\"Link\"}),\" component would also not work with this setup as each mdx file is built independently. For such cases, it is better to use component substitution.\"]}),(0,e.jsxs)(n.h2,{id:\"table-of-contents-component\",children:[(0,e.jsx)(n.a,{href:\"#table-of-contents-component\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Table of contents component\"]}),(0,e.jsxs)(n.p,{children:[\"Inspired by \",(0,e.jsx)(n.a,{href:\"https://docusaurus.io/docs/next/markdown-features/inline-toc\",children:\"Docusaurus\"}),\" and Gatsby's \",(0,e.jsx)(n.a,{href:\"https://www.gatsbyjs.com/plugins/gatsby-remark-table-of-contents/\",children:\"gatsby-remark-table-of-contents\"}),\", the \",(0,e.jsx)(n.code,{children:\"toc\"}),\" variable containing all the top level headings of the document is passed to the MDX file and can be styled accordingly. To make generating a table of contents (TOC) simple, you can use the existing \",(0,e.jsx)(n.code,{children:\"TOCInline\"}),\" component.\"]}),(0,e.jsx)(n.p,{children:\"For example, the TOC in this post was generated with the following code:\"}),(0,e.jsx)(n.pre,{className:\"language-jsx\",children:(0,e.jsx)(n.code,{className:\"code-highlight language-jsx\",children:(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"TOCInline\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"toc\"}),(0,e.jsxs)(n.span,{className:\"token language-javascript script\",children:[(0,e.jsx)(n.span,{className:\"token punctuation script-punctuation\",children:\"=\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\"props\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"toc\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"exclude\"}),(0,e.jsxs)(n.span,{className:\"token attr-value\",children:[(0,e.jsx)(n.span,{className:\"token punctuation attr-equals\",children:\"=\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:'\"'}),\"Overview\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:'\"'})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"toHeading\"}),(0,e.jsxs)(n.span,{className:\"token language-javascript script\",children:[(0,e.jsx)(n.span,{className:\"token punctuation script-punctuation\",children:\"=\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),(0,e.jsx)(n.span,{className:\"token number\",children:\"2\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"/>\"})]}),`\n`]})})}),(0,e.jsxs)(n.p,{children:[\"You can customise the headings that are displayed by configuring the \",(0,e.jsx)(n.code,{children:\"fromHeading\"}),\" and \",(0,e.jsx)(n.code,{children:\"toHeading\"}),\" props, or exclude particular headings by passing a string or a string array to the \",(0,e.jsx)(n.code,{children:\"exclude\"}),\" prop. By default, all headings that are of depth 3 or smaller are indented. This can be configured by changing the \",(0,e.jsx)(n.code,{children:\"indentDepth\"}),\" property. A \",(0,e.jsx)(n.code,{children:\"asDisclosure\"}),\" prop can be used to render the TOC within an expandable disclosure element.\"]}),(0,e.jsx)(n.p,{children:\"Here's the full TOC rendered in a disclosure element.\"}),(0,e.jsx)(n.pre,{className:\"language-jsx\",children:(0,e.jsx)(n.code,{className:\"code-highlight language-jsx\",children:(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"TOCInline\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"toc\"}),(0,e.jsxs)(n.span,{className:\"token language-javascript script\",children:[(0,e.jsx)(n.span,{className:\"token punctuation script-punctuation\",children:\"=\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\"props\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"toc\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"asDisclosure\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"/>\"})]}),`\n`]})})}),(0,e.jsx)(l,{toc:a.toc,asDisclosure:!0}),(0,e.jsxs)(n.h2,{id:\"layouts\",children:[(0,e.jsx)(n.a,{href:\"#layouts\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Layouts\"]}),(0,e.jsxs)(n.p,{children:[\"You can map mdx blog content to layout components by configuring the frontmatter field. For example, this post is written with the new \",(0,e.jsx)(n.code,{children:\"PostSimple\"}),\" layout!\"]}),(0,e.jsxs)(n.h3,{id:\"adding-new-templates\",children:[(0,e.jsx)(n.a,{href:\"#adding-new-templates\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Adding new templates\"]}),(0,e.jsxs)(n.p,{children:[\"layout templates are stored in the \",(0,e.jsx)(n.code,{children:\"./layouts\"}),\" folder. You can add your React components that you want to map to markdown content in this folder. The component file name must match that specified in the markdown frontmatter \",(0,e.jsx)(n.code,{children:\"layout\"}),\" field.\"]}),(0,e.jsxs)(n.p,{children:[\"The only required field is \",(0,e.jsx)(n.code,{children:\"children\"}),\" which contains the rendered MDX content, though you would probably want to pass in the frontMatter contents and render it in the template.\"]}),(0,e.jsxs)(n.p,{children:[\"You can configure the template to take in other fields - see \",(0,e.jsx)(n.code,{children:\"PostLayout\"}),\" component for an example.\"]}),(0,e.jsx)(n.p,{children:\"Here's an example layout which you can further customise:\"}),(0,e.jsx)(n.pre,{className:\"language-jsx\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-jsx\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token keyword module\",children:\"export\"}),\" \",(0,e.jsx)(n.span,{className:\"token keyword module\",children:\"default\"}),\" \",(0,e.jsx)(n.span,{className:\"token keyword\",children:\"function\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"ExampleLayout\"})}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsxs)(n.span,{className:\"token parameter\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\" frontMatter\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" children \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token keyword\",children:\"const\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\" date\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" title \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),` frontMatter\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token keyword control-flow\",children:\"return\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"SectionContainer\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token plain-text\",children:`\n`})]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token plain-text\",children:\" \"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),\"div\"]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\"date\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"\"}),\"div\"]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token plain-text\",children:`\n`})]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token plain-text\",children:\" \"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),\"h1\"]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\"title\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"\"}),\"h1\"]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token plain-text\",children:`\n`})]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token plain-text\",children:\" \"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),\"div\"]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\"children\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"\"}),\"div\"]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),(0,e.jsx)(n.span,{className:\"token plain-text\",children:`\n`})]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token plain-text\",children:\" \"}),(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"SectionContainer\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\">\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]})]})}),(0,e.jsxs)(n.h3,{id:\"configuring-a-blog-post-frontmatter\",children:[(0,e.jsx)(n.a,{href:\"#configuring-a-blog-post-frontmatter\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Configuring a blog post frontmatter\"]}),(0,e.jsxs)(n.p,{children:[\"Use the \",(0,e.jsx)(n.code,{children:\"layout\"}),\" frontmatter field to specify the template you want to map the markdown post to. Here's how the frontmatter of this post looks like:\"]}),(0,e.jsx)(n.pre,{children:(0,e.jsxs)(n.code,{className:\"code-highlight\",children:[(0,e.jsx)(n.span,{className:\"code-line\",children:`---\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`title: 'New features in v1'\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`date: '2021-05-26 '\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`tags: ['next-js', 'tailwind', 'guide']\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`draft: false\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`summary: 'Introducing the new layout features - you can map mdx blog content to layout components by configuring the frontmatter field'\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`layout: PostSimple\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`---\n`})]})}),(0,e.jsxs)(n.p,{children:[\"You can configure the default layout in the respective page section by modifying the \",(0,e.jsx)(n.code,{children:\"DEFAULT_LAYOUT\"}),\" variable. The \",(0,e.jsx)(n.code,{children:\"DEFAULT_LAYOUT\"}),\" for blog posts page is set to \",(0,e.jsx)(n.code,{children:\"PostLayout\"}),\".\"]}),(0,e.jsxs)(n.h3,{id:\"extend\",children:[(0,e.jsx)(n.a,{href:\"#extend\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Extend\"]}),(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.code,{children:\"layout\"}),\" is mapped to wrapper which wraps the entire MDX content.\"]}),(0,e.jsx)(n.pre,{className:\"language-jsx\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-jsx\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token keyword module\",children:\"export\"}),\" \",(0,e.jsx)(n.span,{className:\"token keyword\",children:\"const\"}),\" \",(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"MDXComponents\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"Image\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"a\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"CustomLink\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"pre\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"Pre\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token function function-variable\",children:\"wrapper\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsxs)(n.span,{className:\"token parameter\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\" components\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" layout\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator spread\",children:\"...\"}),\"rest \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator arrow\",children:\"=>\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token keyword\",children:\"const\"}),\" \",(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"Layout\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"require\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsxs)(n.span,{className:\"token template-string\",children:[(0,e.jsx)(n.span,{className:\"token string template-punctuation\",children:\"`\"}),(0,e.jsx)(n.span,{className:\"token string\",children:\"../layouts/\"}),(0,e.jsxs)(n.span,{className:\"token interpolation\",children:[(0,e.jsx)(n.span,{className:\"token punctuation interpolation-punctuation\",children:\"${\"}),\"layout\",(0,e.jsx)(n.span,{className:\"token punctuation interpolation-punctuation\",children:\"}\"})]}),(0,e.jsx)(n.span,{className:\"token string template-punctuation\",children:\"`\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token keyword module\",children:\"default\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token keyword control-flow\",children:\"return\"}),\" \",(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"Layout\"})]}),\" \",(0,e.jsxs)(n.span,{className:\"token spread\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),(0,e.jsx)(n.span,{className:\"token operator spread\",children:\"...\"}),\"rest\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"/>\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token keyword module\",children:\"export\"}),\" \",(0,e.jsx)(n.span,{className:\"token keyword\",children:\"const\"}),\" \",(0,e.jsx)(n.span,{className:\"token function function-variable\",children:(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"MDXLayoutRenderer\"})}),\" \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsxs)(n.span,{className:\"token parameter\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\" layout\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" mdxSource\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator spread\",children:\"...\"}),\"rest \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator arrow\",children:\"=>\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token keyword\",children:\"const\"}),\" \",(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"MDXLayout\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"useMemo\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator arrow\",children:\"=>\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"getMDXComponent\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),\"mdxSource\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"[\"}),\"mdxSource\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"]\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token keyword control-flow\",children:\"return\"}),\" \",(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"MDXLayout\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"layout\"}),(0,e.jsxs)(n.span,{className:\"token language-javascript script\",children:[(0,e.jsx)(n.span,{className:\"token punctuation script-punctuation\",children:\"=\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),\"layout\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"components\"}),(0,e.jsxs)(n.span,{className:\"token language-javascript script\",children:[(0,e.jsx)(n.span,{className:\"token punctuation script-punctuation\",children:\"=\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),(0,e.jsx)(n.span,{className:\"token maybe-class-name\",children:\"MDXComponents\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),\" \",(0,e.jsxs)(n.span,{className:\"token spread\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),(0,e.jsx)(n.span,{className:\"token operator spread\",children:\"...\"}),\"rest\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"/>\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]})]})}),(0,e.jsxs)(n.p,{children:[\"Use the \",(0,e.jsx)(n.code,{children:\"MDXLayoutRenderer\"}),\" component on a page where you want to accept a layout name to map to the desired layout. You need to pass the layout name from the layout folder (it has to be an exact match).\"]}),(0,e.jsxs)(n.h2,{id:\"analytics\",children:[(0,e.jsx)(n.a,{href:\"#analytics\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Analytics\"]}),(0,e.jsxs)(n.p,{children:[\"The template now supports \",(0,e.jsx)(n.a,{href:\"https://plausible.io/\",children:\"plausible\"}),\", \",(0,e.jsx)(n.a,{href:\"https://simpleanalytics.com/\",children:\"simple analytics\"}),\" and google analytics. Configure \",(0,e.jsx)(n.code,{children:\"siteMetadata.js\"}),\" with the settings that correspond with the desired analytics provider.\"]}),(0,e.jsx)(n.pre,{className:\"language-js\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-js\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"analytics\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// supports plausible, simpleAnalytics or googleAnalytics\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"plausibleDataDomain\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"''\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// e.g. tailwind-nextjs-starter-blog.vercel.app\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"simpleAnalytics\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token boolean\",children:\"false\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// true or false\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"googleAnalyticsId\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"''\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// e.g. UA-000000-2 or G-XXXXXXX\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]})]})}),(0,e.jsxs)(n.p,{children:[\"Custom events are also supported. You can import the \",(0,e.jsx)(n.code,{children:\"logEvent\"}),\" function from \",(0,e.jsx)(n.code,{children:\"@components/analytics/[ANALYTICS-PROVIDER]\"}),\" file and call it when triggering certain events of interest. \",(0,e.jsx)(n.em,{children:\"Note\"}),\": Additional configuration might be required depending on the analytics provider, please check their official documentation for more information.\"]}),(0,e.jsxs)(n.h2,{id:\"blog-comments-system\",children:[(0,e.jsx)(n.a,{href:\"#blog-comments-system\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Blog comments system\"]}),(0,e.jsxs)(n.p,{children:[\"We have also added support for \",(0,e.jsx)(n.a,{href:\"https://github.com/laymonage/giscus\",children:\"giscus\"}),\", \",(0,e.jsx)(n.a,{href:\"https://github.com/utterance/utterances\",children:\"utterances\"}),\" or disqus. To enable, simply configure \",(0,e.jsx)(n.code,{children:\"siteMetadata.js\"}),\" comments property with the desired provider and settings as specified in the config file.\"]}),(0,e.jsx)(n.pre,{className:\"language-js\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-js\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"comment\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// Select a provider and use the environment variables associated to it\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// https://vercel.com/docs/environment-variables\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"provider\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'giscus'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// supported providers: giscus, utterances, disqus\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"giscusConfig\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// Visit the link below, and follow the steps in the 'configuration' section\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// https://giscus.app/\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"repo\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" process\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"env\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token constant\",children:\"NEXT_PUBLIC_GISCUS_REPO\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"repositoryId\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" process\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"env\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token constant\",children:\"NEXT_PUBLIC_GISCUS_REPOSITORY_ID\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"category\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" process\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"env\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token constant\",children:\"NEXT_PUBLIC_GISCUS_CATEGORY\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"categoryId\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" process\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"env\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token constant\",children:\"NEXT_PUBLIC_GISCUS_CATEGORY_ID\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"mapping\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'pathname'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// supported options: pathname, url, title\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"reactions\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'1'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// Emoji reactions: 1 = enable / 0 = disable\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// Send discussion metadata periodically to the parent window: 1 = enable / 0 = disable\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"metadata\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'0'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// theme example: light, dark, dark_dimmed, dark_high_contrast\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// transparent_dark, preferred_color_scheme, custom\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"theme\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'light'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// theme when dark mode\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"darkTheme\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'transparent_dark'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// If the theme option above is set to 'custom`\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// please provide a link below to your custom theme css file.\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// example: https://giscus.app/themes/custom_example.css\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"themeURL\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"''\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"utterancesConfig\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// Visit the link below, and follow the steps in the 'configuration' section\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// https://utteranc.es/\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"repo\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" process\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"env\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token constant\",children:\"NEXT_PUBLIC_UTTERANCES_REPO\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"issueTerm\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"''\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// supported options: pathname, url, title\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"label\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"''\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// label (optional): Comment \\u{1F4AC}\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// theme example: github-light, github-dark, preferred-color-scheme\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// github-dark-orange, icy-dark, dark-blue, photon-dark, boxy-light\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"theme\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"''\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// theme when dark mode\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"darkTheme\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"''\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"disqus\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:\"// https://help.disqus.com/en/articles/1717111-what-s-a-shortname\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"shortname\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" process\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token property-access\",children:\"env\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\".\"}),(0,e.jsx)(n.span,{className:\"token constant\",children:\"NEXT_PUBLIC_DISQUS_SHORTNAME\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]})]})}),(0,e.jsxs)(n.h2,{id:\"multiple-authors\",children:[(0,e.jsx)(n.a,{href:\"#multiple-authors\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Multiple authors\"]}),(0,e.jsxs)(n.p,{children:[\"Information on authors is now split from \",(0,e.jsx)(n.code,{children:\"siteMetadata.js\"}),\" and stored in its own \",(0,e.jsx)(n.code,{children:\"data/authors\"}),\" folder as a markdown file. Minimally, you will need to have a \",(0,e.jsx)(n.code,{children:\"default.md\"}),\" file with authorship information. You can create additional files as required and the file name will be used as the reference to the author.\"]}),(0,e.jsx)(n.p,{children:\"Here's how an author markdown file might look like:\"}),(0,e.jsx)(\"div\",{className:\"remark-code-title\",children:\"default.md\"}),(0,e.jsx)(n.pre,{className:\"language-md\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-md\",children:[(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsxs)(n.span,{className:\"token front-matter-block\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"---\"}),`\n`]})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"name\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),` Tails Azimuth\n`]})})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"avatar\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),` /static/images/avatar.png\n`]})})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"occupation\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),` Professor of Atmospheric Science\n`]})})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"company\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),` Stanford University\n`]})})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"email\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),` address@yoursite.com\n`]})})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"twitter\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" https\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),`//twitter.com/Twitter\n`]})})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"linkedin\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" https\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),`//www.linkedin.com\n`]})})}),(0,e.jsx)(n.span,{className:\"code-line\",children:(0,e.jsxs)(n.span,{className:\"token front-matter-block\",children:[(0,e.jsxs)(n.span,{className:\"token language-yaml front-matter yaml\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"github\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" https\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\"//github.com\"]}),`\n`]})}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token front-matter-block\",children:(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"---\"})}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`A long description of yourself...\n`})]})}),(0,e.jsx)(n.p,{children:\"You can use this information in multiple places across the template. For example in the about section of the page, we grab the default author information with this line of code:\"}),(0,e.jsx)(n.pre,{className:\"language-js\",children:(0,e.jsx)(n.code,{className:\"code-highlight language-js\",children:(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token keyword\",children:\"const\"}),\" authorDetails \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token keyword control-flow\",children:\"await\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"getFileBySlug\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsx)(n.span,{className:\"token string\",children:\"'authors'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"[\"}),(0,e.jsx)(n.span,{className:\"token string\",children:\"'default'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"]\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),`\n`]})})}),(0,e.jsxs)(n.p,{children:[\"This is rendered in the \",(0,e.jsx)(n.code,{children:\"AuthorLayout\"}),\" template.\"]}),(0,e.jsxs)(n.h3,{id:\"multiple-authors-in-blog-post\",children:[(0,e.jsx)(n.a,{href:\"#multiple-authors-in-blog-post\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Multiple authors in blog post\"]}),(0,e.jsxs)(n.p,{children:[\"The frontmatter of a blog post accepts an optional \",(0,e.jsx)(n.code,{children:\"authors\"}),\" array field. If no field is specified, it is assumed that the default author is used. Simply pass in an array of authors to render multiple authors associated with a post.\"]}),(0,e.jsxs)(n.p,{children:[\"For example, the following frontmatter will display the authors given by \",(0,e.jsx)(n.code,{children:\"data/authors/default.md\"}),\" and \",(0,e.jsx)(n.code,{children:\"data/authors/sparrowhawk.md\"})]}),(0,e.jsx)(n.pre,{className:\"language-yaml\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-yaml\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"title\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'My first post'\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"date\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'2021-01-12'\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"draft\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token boolean important\",children:\"false\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"summary\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'My first post'\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token atrule key\",children:\"authors\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"[\"}),(0,e.jsx)(n.span,{className:\"token string\",children:\"'default'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'sparrowhawk'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"]\"}),`\n`]})]})}),(0,e.jsxs)(n.p,{children:[\"A demo of a multiple authors post is shown in \",(0,e.jsx)(n.a,{href:\"/blog/introducing-tailwind-nextjs-starter-blog\",children:\"Introducing Tailwind Nextjs Starter Blog post\"}),\".\"]}),(0,e.jsxs)(n.h2,{id:\"copy-button-for-code-blocks\",children:[(0,e.jsx)(n.a,{href:\"#copy-button-for-code-blocks\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Copy button for code blocks\"]}),(0,e.jsxs)(n.p,{children:[\"Hover over a code block and you will notice a GitHub-inspired copy button! You can modify \",(0,e.jsx)(n.code,{children:\"./components/Pre.js\"}),\" to further customise it. The component is passed to \",(0,e.jsx)(n.code,{children:\"MDXComponents\"}),\" and modifies all \",(0,e.jsx)(n.code,{children:\"
\"}),\" blocks.\"]}),(0,e.jsxs)(n.h2,{id:\"line-highlighting-and-line-numbers\",children:[(0,e.jsx)(n.a,{href:\"#line-highlighting-and-line-numbers\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Line highlighting and line numbers\"]}),(0,e.jsxs)(n.p,{children:[\"Line highlighting and line numbers are now supported out of the box thanks to the new \",(0,e.jsx)(n.a,{href:\"https://github.com/timlrx/rehype-prism-plus\",children:\"rehype-prism-plus plugin\"})]}),(0,e.jsx)(n.p,{children:\"The following javascript code block:\"}),(0,e.jsx)(n.pre,{children:(0,e.jsxs)(n.code,{className:\"code-highlight\",children:[(0,e.jsx)(n.span,{className:\"code-line\",children:\"```js {1, 3-4} showLineNumbers\\n\"}),(0,e.jsx)(n.span,{className:\"code-line\",children:`var num1, num2, sum\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`num1 = prompt('Enter first number')\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`num2 = prompt('Enter second number')\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`sum = parseInt(num1) + parseInt(num2) // \"+\" means \"add\"\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`alert('Sum = ' + sum) // \"+\" means combine into a string\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:\"```\\n\"})]})}),(0,e.jsx)(n.p,{children:\"will appear as:\"}),(0,e.jsx)(n.pre,{className:\"language-js\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-js\",children:[(0,e.jsxs)(n.span,{className:\"code-line line-number highlight-line\",line:\"1\",children:[(0,e.jsx)(n.span,{className:\"token keyword\",children:\"var\"}),\" num1\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),\" num2\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),` sum\n`]}),(0,e.jsxs)(n.span,{className:\"code-line line-number\",line:\"2\",children:[\"num1 \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"prompt\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsx)(n.span,{className:\"token string\",children:\"'Enter first number'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line line-number highlight-line\",line:\"3\",children:[\"num2 \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"prompt\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsx)(n.span,{className:\"token string\",children:\"'Enter second number'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line line-number highlight-line\",line:\"4\",children:[\"sum \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"=\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"parseInt\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),\"num1\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"+\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"parseInt\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),\"num2\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:'// \"+\" means \"add\"'}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line line-number\",line:\"5\",children:[(0,e.jsx)(n.span,{className:\"token function\",children:\"alert\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsx)(n.span,{className:\"token string\",children:\"'Sum = '\"}),\" \",(0,e.jsx)(n.span,{className:\"token operator\",children:\"+\"}),\" sum\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token comment\",children:'// \"+\" means combine into a string'}),`\n`]})]})}),(0,e.jsxs)(n.p,{children:[\"To modify the styles, change the following class selectors in the \",(0,e.jsx)(n.code,{children:\"prism.css\"}),\" file:\"]}),(0,e.jsx)(n.pre,{className:\"language-css\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-css\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token selector\",children:(0,e.jsx)(n.span,{className:\"token class\",children:\".code-highlight\"})}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsxs)(n.span,{className:\"token atrule\",children:[(0,e.jsx)(n.span,{className:\"token rule\",children:\"@apply\"}),\" float-left min-w-full\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token selector\",children:(0,e.jsx)(n.span,{className:\"token class\",children:\".code-line\"})}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsxs)(n.span,{className:\"token atrule\",children:[(0,e.jsx)(n.span,{className:\"token rule\",children:\"@apply\"}),\" -mx-4 block border-l-4 border-opacity-0 pl-4 pr-4\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsxs)(n.span,{className:\"token selector\",children:[(0,e.jsx)(n.span,{className:\"token class\",children:\".code-line\"}),(0,e.jsx)(n.span,{className:\"token class\",children:\".inserted\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsxs)(n.span,{className:\"token atrule\",children:[(0,e.jsx)(n.span,{className:\"token rule\",children:\"@apply\"}),\" bg-green-500 bg-opacity-20\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsxs)(n.span,{className:\"token selector\",children:[(0,e.jsx)(n.span,{className:\"token class\",children:\".code-line\"}),(0,e.jsx)(n.span,{className:\"token class\",children:\".deleted\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsxs)(n.span,{className:\"token atrule\",children:[(0,e.jsx)(n.span,{className:\"token rule\",children:\"@apply\"}),\" bg-red-500 bg-opacity-20\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token selector\",children:(0,e.jsx)(n.span,{className:\"token class\",children:\".highlight-line\"})}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsxs)(n.span,{className:\"token atrule\",children:[(0,e.jsx)(n.span,{className:\"token rule\",children:\"@apply\"}),\" -mx-4 border-l-4 border-primary-500 bg-gray-700 bg-opacity-50\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsxs)(n.span,{className:\"token selector\",children:[(0,e.jsx)(n.span,{className:\"token class\",children:\".line-number\"}),(0,e.jsx)(n.span,{className:\"token pseudo-element\",children:\"::before\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsxs)(n.span,{className:\"token atrule\",children:[(0,e.jsx)(n.span,{className:\"token rule\",children:\"@apply\"}),\" mr-4 -ml-2 inline-block w-4 text-right text-gray-400\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"})]}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property\",children:\"content\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"attr\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),\"line\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\";\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]})]})}),(0,e.jsxs)(n.h2,{id:\"newletter-component-v113\",children:[(0,e.jsx)(n.a,{href:\"#newletter-component-v113\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Newletter component (v1.1.3)\"]}),(0,e.jsx)(n.p,{children:\"Introduced in v1.1.3, the newsletter component gives you an easy way to build an audience. It integrates with the following providers:\"}),(0,e.jsxs)(n.ul,{children:[(0,e.jsx)(n.li,{children:(0,e.jsx)(n.a,{href:\"https://mailchimp.com/\",children:\"Mailchimp\"})}),(0,e.jsx)(n.li,{children:(0,e.jsx)(n.a,{href:\"https://buttondown.email/\",children:\"Buttondown\"})}),(0,e.jsx)(n.li,{children:(0,e.jsx)(n.a,{href:\"https://convertkit.com/\",children:\"Convertkit\"})})]}),(0,e.jsxs)(n.p,{children:[\"To use it, specify the provider which you are using in the config file and add the necessary environment variables to the \",(0,e.jsx)(n.code,{children:\".env\"}),\" file. For more information on the required variables, check out \",(0,e.jsx)(n.code,{children:\".env.sample.\"})]}),(0,e.jsxs)(n.p,{children:[\"Two components are exported, a default \",(0,e.jsx)(n.code,{children:\"NewsletterForm\"}),\" and a \",(0,e.jsx)(n.code,{children:\"BlogNewsletterForm\"}),\" component, which is also passed in as an MDX component and can be used in a blog post:\"]}),(0,e.jsx)(n.pre,{className:\"language-jsx\",children:(0,e.jsx)(n.code,{className:\"code-highlight language-jsx\",children:(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsxs)(n.span,{className:\"token tag\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"<\"}),(0,e.jsx)(n.span,{className:\"token class-name\",children:\"BlogNewsletterForm\"})]}),\" \",(0,e.jsx)(n.span,{className:\"token attr-name\",children:\"title\"}),(0,e.jsxs)(n.span,{className:\"token attr-value\",children:[(0,e.jsx)(n.span,{className:\"token punctuation attr-equals\",children:\"=\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:'\"'}),\"Like what you are reading?\",(0,e.jsx)(n.span,{className:\"token punctuation\",children:'\"'})]}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"/>\"})]}),`\n`]})})}),(0,e.jsx)(o,{title:\"Like what you are reading?\"}),(0,e.jsxs)(n.p,{children:[\"The component relies on nextjs's \",(0,e.jsx)(n.a,{href:\"https://nextjs.org/docs/api-routes/introduction\",children:\"API routes\"}),\" which requires a server-side instance of nextjs to be setup and is not compatible with a 100% static site export. Users should either self-host or use a compatible platform like Vercel or Netlify which supports this functionality.\"]}),(0,e.jsx)(n.p,{children:\"A static site compatible alternative is to substitute the route in the newsletter component with a form API endpoint provider.\"}),(0,e.jsxs)(n.h2,{id:\"bibliography-and-citations-v121\",children:[(0,e.jsx)(n.a,{href:\"#bibliography-and-citations-v121\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Bibliography and Citations (v1.2.1)\"]}),(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.code,{children:\"rehype-citation\"}),\" plugin is added to the xdm processing pipeline in v1.2.1. This allows you to easily format citations and insert bibliography from an existing bibtex or CSL-json file.\"]}),(0,e.jsx)(n.p,{children:\"For example, the following markdown code sample:\"}),(0,e.jsx)(n.pre,{className:\"language-md\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-md\",children:[(0,e.jsx)(n.span,{className:\"code-line\",children:`Standard citation [@Nash1950]\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`In-text citations e.g. @Nash1951\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`Multiple citations [see @Nash1950; @Nash1951, page 50]\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsxs)(n.span,{className:\"token bold\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"**\"}),(0,e.jsx)(n.span,{className:\"token content\",children:\"References:\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"**\"})]}),`\n`]}),(0,e.jsx)(n.span,{className:\"code-line\",children:`\n`}),(0,e.jsx)(n.span,{className:\"code-line\",children:`[^ref]\n`})]})}),(0,e.jsx)(n.p,{children:\"is rendered to the following:\"}),(0,e.jsxs)(n.p,{children:[\"Standard citation \",(0,e.jsx)(n.span,{id:\"citation--nash1950--1\",children:\"(Nash, 1950)\"}),(0,e.jsx)(n.br,{}),\"In-text citations e.g. \",(0,e.jsx)(n.span,{id:\"citation--nash1951--2\",children:\"Nash (1951)\"}),(0,e.jsx)(n.br,{}),\"Multiple citations \",(0,e.jsx)(n.span,{id:\"citation--nash1950--nash1951--3\",children:\"(see Nash, 1950, 1951, p. 50)\"})]}),(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:\"References:\"})}),(0,e.jsxs)(n.div,{className:\"csl-bib-body references\",id:\"refs\",children:[(0,e.jsxs)(n.div,{className:\"csl-entry\",id:\"bib-nash1950\",children:[\"Nash, J. (1950). Equilibrium points in n-person games. \",(0,e.jsx)(n.i,{children:\"Proceedings of the National Academy of Sciences\"}),\", \",(0,e.jsx)(n.i,{children:\"36\"}),\"(1), 48\\u201349.\"]}),(0,e.jsxs)(n.div,{className:\"csl-entry\",id:\"bib-nash1951\",children:[\"Nash, J. (1951). Non-cooperative games. \",(0,e.jsx)(n.i,{children:\"Annals of Mathematics\"}),\", 286\\u2013295.\"]})]}),(0,e.jsxs)(n.p,{children:[\"A bibliography will be inserted at the end of the document, but this can be overwritten by specifying a \",(0,e.jsx)(n.code,{children:\"[^Ref]\"}),\" tag at the intended location. The plugin uses APA citation formation, but also supports the following CSLs, 'apa', 'vancouver', 'harvard1', 'chicago', 'mla', or a path to a user-specified CSL file.\"]}),(0,e.jsxs)(n.p,{children:[\"See \",(0,e.jsx)(n.a,{href:\"https://github.com/timlrx/rehype-citation\",children:\"rehype-citation readme\"}),\" for more information on the configuration options.\"]}),(0,e.jsxs)(n.h2,{id:\"self-hosted-font-v150\",children:[(0,e.jsx)(n.a,{href:\"#self-hosted-font-v150\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Self-hosted font (v1.5.0)\"]}),(0,e.jsxs)(n.p,{children:[\"Google font has been replaced with self-hosted font from \",(0,e.jsx)(n.a,{href:\"https://fontsource.org/\",children:\"Fontsource\"}),\". This gives the following \",(0,e.jsx)(n.a,{href:\"https://fontsource.org/docs/introduction\",children:\"advantages\"}),\":\"]}),(0,e.jsxs)(n.blockquote,{children:[(0,e.jsx)(n.p,{children:\"Self-hosting brings significant performance gains as loading fonts from hosted services, such as Google Fonts, lead to an extra (render blocking) network request. To provide perspective, for simple websites it has been seen to double visual load times.\"}),(0,e.jsx)(n.p,{children:\"Fonts remain version locked. Google often pushes updates to their fonts without notice, which may interfere with your live production projects. Manage your fonts like any other NPM dependency.\"}),(0,e.jsx)(n.p,{children:\"Commit to privacy. Google does track the usage of their fonts and for those who are extremely privacy concerned, self-hosting is an alternative.\"})]}),(0,e.jsxs)(n.p,{children:[\"This leads to a smaller font bundle and a 0.1s faster load time (\",(0,e.jsx)(n.a,{href:\"https://www.webpagetest.org/video/compare.php?tests=220201_AiDcFH_f68a69b758454dd52d8e67493fdef7da,220201_BiDcMC_bf2d53f14483814ba61e794311dfa771\",children:\"webpagetest comparison\"}),\").\"]}),(0,e.jsx)(n.p,{children:\"To change the default Inter font:\"}),(0,e.jsxs)(n.ol,{children:[(0,e.jsxs)(n.li,{children:[\"Install the preferred \",(0,e.jsx)(n.a,{href:\"https://fontsource.org/fonts\",children:\"font\"}),\" - \",(0,e.jsx)(n.code,{children:\"npm install -save @fontsource/\"})]}),(0,e.jsxs)(n.li,{children:[\"Update the import at \",(0,e.jsx)(n.code,{children:\"pages/_app.js\"}),\"- \",(0,e.jsx)(n.code,{children:\"import '@fontsource/ .css'\"})]}),(0,e.jsxs)(n.li,{children:[\"Update the \",(0,e.jsx)(n.code,{children:\"fontfamily\"}),\" property in the tailwind css config file\"]})]}),(0,e.jsxs)(n.h2,{id:\"upgrade-guide\",children:[(0,e.jsx)(n.a,{href:\"#upgrade-guide\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Upgrade guide\"]}),(0,e.jsx)(n.p,{children:\"There are significant portions of the code that has been changed from v0 to v1 including support for layouts and a new mdx engine.\"}),(0,e.jsx)(n.p,{children:\"There's also no real reason to change if the previous one serves your needs and it might be easier to copy the component changes you are interested in to your existing blog rather than migrating everything over.\"}),(0,e.jsx)(n.p,{children:\"Nonetheless, if you want to do so and have not changed much of the template, you could clone the new version and copy over the blog post over to the new template.\"}),(0,e.jsx)(n.p,{children:\"Another alternative would be to pull the latest template version with the following code:\"}),(0,e.jsx)(n.pre,{className:\"language-bash\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-bash\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token function\",children:\"git\"}),\" remote \",(0,e.jsx)(n.span,{className:\"token function\",children:\"add\"}),` template git@github.com:timlrx/tailwind-nextjs-starter-blog.git\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token function\",children:\"git\"}),` pull template v1 --allow-unrelated-histories\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token function\",children:\"rm\"}),\" \",(0,e.jsx)(n.span,{className:\"token parameter variable\",children:\"-rf\"}),` node_modules\n`]})]})}),(0,e.jsxs)(n.p,{children:[\"You can see an example of such a migration in this \",(0,e.jsx)(n.a,{href:\"https://github.com/timlrx/timlrx.com/commit/bba1c185384fd6d5cdaac15abf802fdcff027286\",children:\"commit\"}),\" for my personal blog.\"]}),(0,e.jsxs)(n.p,{children:[\"v1 also uses \",(0,e.jsx)(n.code,{children:\"feed.xml\"}),\" rather than \",(0,e.jsx)(n.code,{children:\"index.xml\"}),\", to avoid some build issues with Vercel. If you are migrating you should add a redirect to \",(0,e.jsx)(n.code,{children:\"next.config.js\"}),\" like so:\"]}),(0,e.jsx)(n.pre,{className:\"language-js\",children:(0,e.jsxs)(n.code,{className:\"code-highlight language-js\",children:[(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token keyword\",children:\"async\"}),\" \",(0,e.jsx)(n.span,{className:\"token function\",children:\"redirects\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"(\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token keyword control-flow\",children:\"return\"}),\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"[\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"source\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'/:path/index.xml'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"destination\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token string\",children:\"'/:path/feed.xml'\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token property literal-property\",children:\"permanent\"}),(0,e.jsx)(n.span,{className:\"token operator\",children:\":\"}),\" \",(0,e.jsx)(n.span,{className:\"token boolean\",children:\"true\"}),(0,e.jsx)(n.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[\" \",(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"]\"}),`\n`]}),(0,e.jsxs)(n.span,{className:\"code-line\",children:[(0,e.jsx)(n.span,{className:\"token punctuation\",children:\"}\"}),`\n`]})]})}),(0,e.jsxs)(n.section,{className:\"footnotes\",\"data-footnotes\":!0,children:[(0,e.jsxs)(n.h2,{id:\"footnote-label\",className:\"sr-only\",children:[(0,e.jsx)(n.a,{href:\"#footnote-label\",\"aria-hidden\":\"true\",tabIndex:\"-1\",children:(0,e.jsx)(n.span,{className:\"icon icon-link\"})}),\"Footnotes\"]}),(0,e.jsx)(n.ol,{children:(0,e.jsx)(n.li,{id:\"user-content-fn-1\",children:(0,e.jsxs)(n.p,{children:[\"With the new changes in Nextjs 12, first load JS increase to 45kB. \",(0,e.jsx)(n.a,{href:\"#user-content-fnref-1\",\"aria-label\":\"Back to content\",className:\"data-footnote-backref\",\"data-footnote-backref\":!0,children:\"\\u21A9\"})]})})})]})]})}}var j=v;function h(a,s){throw new Error(\"Expected \"+(s?\"component\":\"object\")+\" `\"+a+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return T;})();\n;return Component;","toc":[{"value":"Overview","url":"#overview","depth":2},{"value":"Theme colors","url":"#theme-colors","depth":2},{"value":"Xdm MDX compiler","url":"#xdm-mdx-compiler","depth":2},{"value":"Table of contents component","url":"#table-of-contents-component","depth":2},{"value":"Layouts","url":"#layouts","depth":2},{"value":"Adding new templates","url":"#adding-new-templates","depth":3},{"value":"Configuring a blog post frontmatter","url":"#configuring-a-blog-post-frontmatter","depth":3},{"value":"Extend","url":"#extend","depth":3},{"value":"Analytics","url":"#analytics","depth":2},{"value":"Blog comments system","url":"#blog-comments-system","depth":2},{"value":"Multiple authors","url":"#multiple-authors","depth":2},{"value":"Multiple authors in blog post","url":"#multiple-authors-in-blog-post","depth":3},{"value":"Copy button for code blocks","url":"#copy-button-for-code-blocks","depth":2},{"value":"Line highlighting and line numbers","url":"#line-highlighting-and-line-numbers","depth":2},{"value":"Newletter component (v1.1.3)","url":"#newletter-component-v113","depth":2},{"value":"Bibliography and Citations (v1.2.1)","url":"#bibliography-and-citations-v121","depth":2},{"value":"Self-hosted font (v1.5.0)","url":"#self-hosted-font-v150","depth":2},{"value":"Upgrade guide","url":"#upgrade-guide","depth":2}],"frontMatter":{"readingTime":{"text":"16 min read","minutes":15.705,"time":942300,"words":3141},"slug":"new-features-in-v1","fileName":"new-features-in-v1.mdx","title":"New features in v1","date":"2021-08-07T15:32:14.000Z","lastmod":"2021-02-01","tags":["next-js","tailwind","guide"],"draft":false,"summary":"An overview of the new features released in v1 - code block copy, multiple authors, frontmatter layout and more","layout":"PostSimple","bibliography":"references-data.bib","canonicalUrl":"https://tailwind-nextjs-starter-blog.vercel.app/blog/new-features-in-v1/"}},"authorDetails":[{"readingTime":{"text":"1 min read","minutes":0.205,"time":12300,"words":41},"slug":["default"],"fileName":"default.md","name":"calvinfeng","avatar":"/static/images/calvin.jpg","occupation":"Professor of Atmospheric Science","company":"Stanford University","email":"hereisfun@163.com","twitter":"https://twitter.com/CalvinFunn","github":"https://github.com/hereisfun","date":null}],"prev":{"title":"Introducing Multi-part Posts with Nested Routing","date":"2021-05-02T00:00:00.000Z","tags":["multi-author","next-js","feature"],"draft":false,"summary":"The blog template supports posts in nested sub-folders. This can be used to group posts of similar content e.g. a multi-part course. This post is itself an example of a nested route!","slug":"nested-route/introducing-multi-part-posts-with-nested-routing"},"next":null},"__N_SSG":true}