\r\n \u003C/a>\r\n \u003C/nav>\r\n \u003C/header>\r\n\u003C/template>\r\n```\r\n\r\n\n\n### Reproduction\n\n\r\nhttps://github.com/vuejs/vitepress/assets/36221207/cb78fbb6-8ae3-482e-8c37-063fcc7e441d\r\n\r\n\n\n### Expected behavior\n\nA way to switch themes in a custom theme:\r\n\r\nThe theme color of the page switches automatically when the isDark value is changed.\r\n\r\nOr provide a method to actively modify.\r\n\r\nThanks❤️\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.3.1\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 45.83 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.17.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.1.2 - /usr/local/bin/npm\r\n pnpm: 8.6.12 - /usr/local/bin/pnpm\r\n Browsers:\r\n Chrome: 116.0.5845.96\r\n Safari: 16.4\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2926],{"name":2876,"color":2877},2830,"How to toggle dark theme in custom theme?","2023-08-30T00:04:14Z","https://github.com/vuejs/vitepress/issues/2830",0.7476777,{"description":2933,"labels":2934,"number":2936,"owner":2865,"repository":2866,"state":2867,"title":2937,"updated_at":2938,"url":2939,"score":2940},"### Describe the bug\n\nHTML rendered within the `buildEnd` hook contain `{{ $frontmatter.title }}` rather than the actual title contained with the frontmatted metadata. \n\n### Reproduction\n\n\r\n\r\nHere is my implementation:\r\nhttps://github.com/CodyBontecou/blog/commit/cd40a9d79f9954bf7f64fd329b0ee74b06c2dadc#diff-a2c09d222e870efa333dc7e96fbe9b10bc9b289553da72641eb52f7605a2ed51\n\n### Expected behavior\n\nI expect the `buildEnd` hook to have the template `$frontmatter` variables to be the value of what it's calling, not of `{{ $frontmatter.title }}`.\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 128.91 MB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node\r\n Yarn: 1.22.15 - ~/.nvm/versions/node/v16.14.2/bin/yarn\r\n npm: 9.6.2 - ~/.nvm/versions/node/v16.14.2/bin/npm\r\n Watchman: 2023.07.24.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Chrome: 115.0.5790.170\r\n Safari: 16.5.2\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.44 => 1.0.0-beta.7\n```\n\n\n### Additional context\n\nYou can see the generated file at https://codybontecou.com/feed.rss.\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2935],{"name":2876,"color":2877},2748,"Build hook buildEnd rendering $frontmatter in generated template.","2023-08-16T00:04:26Z","https://github.com/vuejs/vitepress/issues/2748",0.7477151,{"description":2942,"labels":2943,"number":2945,"owner":2865,"repository":2866,"state":2867,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Describe the bug\r\n\r\nThis ones tricky. I think it may be related to #1918 \r\n\r\nOn prod, getting `hydration mismatch error` on my theme\r\nhttps://github.com/jcamp-code/vitepress-blog-theme\r\n\r\nOn initial load, the HTML is correct (you see the post excerpt) but it flashes away in milliseconds.\r\n\r\nWondering if it has to do with the v-html:\r\n\r\n```\r\n\u003Cp class=\"mb-5 font-light\" v-html=\"post.excerpt\" />\r\n```\r\n\r\nThis looks related:\r\nhttps://github.com/vuejs/core/issues/6435\r\n\r\nBut I did the [workaround](https://play.vuejs.org/#__SSR__eNpNjz8LgzAQxb/KkSUKoru1hdKlQ7t1qx1Ke6JgTEhOESTfvfmjxRvC5d27H+8WdlYqn0ZkJasIherfhKd6AKi+3RQa115GQ1I8cCYoyb3HmnFCQ7xmUER3Ee1VsYNU5qM7RWCQRuX+nVBSE+xojZYCeF5cpAgpuCfErRPL2Cb7cKv6pyzQgl0BcRPnMPhi8x57Z/C5lJbKlE+Xdib+yrwU0iRhkEYTgHaaHiBJ4bjeDNAm3N3Es83jqxsG1NfH/VZGcu65gerLpgffWifY/SH2B6Tydgw=) suggested but it made no difference. It's like `excerpt` is not getting loaded\r\n\r\n### Reproduction\r\n\r\nEasily seen here:\r\nhttps://deploy-preview-2--vitepress-blog.netlify.app/blog/\r\n\r\nGo to it and then reload the page and you'll see the hydration mismatch\r\n\r\nhttps://github.com/jcamp-code/vitepress-blog-theme\r\n\r\nClone it\r\n\r\n```pnpm serve```\r\n\r\nGo to: \r\nhttp://localhost:4173/blog/\r\n\r\nLoaded directly, you'll see the excerpts are missing. If you go to another page and come back it displays correctly.\r\n\r\n### Expected behavior\r\n\r\nCorrect display of page upon hydration\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 13.3.1\r\n CPU: (12) arm64 Apple M2 Pro\r\n Memory: 94.23 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.14.1 - /usr/local/bin/node\r\n npm: 9.5.0 - /usr/local/bin/npm\r\n Browsers:\r\n Chrome: 112.0.5615.137\r\n Firefox: 111.0.1\r\n Safari: 16.4\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.74 => 1.0.0-alpha.74\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2944],{"name":2876,"color":2877},2293,"bug: hydration mismatch","2023-05-04T00:04:02Z","https://github.com/vuejs/vitepress/issues/2293",0.7483242,{"description":2951,"labels":2952,"number":2954,"owner":2865,"repository":2866,"state":2867,"title":2955,"updated_at":2956,"url":2957,"score":2958},"### Is your feature request related to a problem? Please describe.\r\n\r\nIt can be difficult to gather some \"necessary\" information when using a fully custom theme. This is normally not much of an issue, but I have found a few issues with the default behavior when using a custom theme. \r\n\r\n1. Codeblocks render in a strange way, and it's not very straightforward on how to edit the default behavior. \r\n\r\nFor example, I frequently make a basic example like so:\r\n```\r\n\\```bash\r\npnpm add bootstrap bootstrap-vue-next @bootstrap-vue-next/nuxt -D\r\n\\```\r\n```\r\n\r\nThe code highlighting works well, but I end up getting some weird extra business:\r\n\r\n\r\nIn addition to this, 'code-groups' give undesirable behavior: \r\n\r\n```\r\n::: code-group\r\n\r\n\\```bash [PNPM]\r\npnpm add bootstrap bootstrap-vue-next\r\n\r\npnpm add unplugin-vue-components -D\r\n\\```\r\n\r\n\\```bash [YARN]\r\nyarn add bootstrap bootstrap-vue-next\r\n\r\nyarn add unplugin-vue-components -D\r\n\\```\r\n\r\n\\```bash [NPM]\r\nnpm i bootstrap bootstrap-vue-next\r\n\r\nnpm i unplugin-vue-components -D\r\n\\```\r\n\r\n:::\r\n```\r\n\r\n\r\n\r\nIn this specific instance, I solved it by simply not using the default code-group and instead just using my already existing custom component \r\n\r\n```vue\r\n\u003Cb-tabs v-model=\"codePreference\">\r\n \u003Cb-tab title=\"PNPM\">\r\n\r\n\\```bash\r\npnpm add bootstrap bootstrap-vue-next\r\n\\```\r\n\r\n \u003C/b-tab>\r\n \u003Cb-tab title=\"YARN\">\r\n```\r\netc etc.\r\n\r\nHowever, each of these instances still render\r\n\r\nAbove them, which is undesirable\r\n\r\n2. Links, \r\n\r\nThe default behavior of links is \"fine\", however, it would be nice if I could convert all links in markdown to use a component of my choosing. Specifically, I already have a \"BLink\" component that I could use.\r\n\r\nIn addition to this, a nice ease of use that I would enjoy is the auto creation of perma links. This one also goes together with the next section. Simply using `## Some header`, it would be nice if it auto created subsequent links for each instance... However, it doesn't. Which, perhaps most people wouldn't benefit from that behavior. This goes with Table of contents as I'm not exactly sure how a toc would be generated without these items existing... Perhaps you need to make each of these things manually? But if that's the case, how do custom themes like the default theme do it? There has to be a way if the default theme accomplishes this behavior.\r\n\r\n3. Table of contents\r\n\r\nNow, I haven't used the table of contents list, but I imagine that this one will be somewhat difficult as there's little information on it's usage. It's only shown usage is `[[toc]]`. But this doesn't really give much. Say for example if you wanted to put the toc into a layout vue component. It doesn't say anything about that.\r\n\r\n4. Custom containers\r\n\r\nNow, a simple solution to using a \"custom container\" is to use your own component. However, I'm wondering if there is another way to fulfill this syntax:\r\n\r\n::: info\r\nFoo!\r\n:::\r\n\r\nAnd simply have it use a component of your choosing. \r\n\r\n### Describe the solution you'd like\r\n\r\nPerhaps some more information on the \"Using a Custom Theme\" section could be useful. Most of the issue I find here revolve around the \"Markdown Extensions\" usage. It's clear that extensions are available whether or not you decide to use a custom theme, so it makes it difficult to understand how to overwrite some of those behaviors. \r\n\r\n### Describe alternatives you've considered\r\n\r\nHonestly, I'm not sure of the best alternatives in any of these situations. In some cases, I can simply use my builtin components and forgo the extensions. \r\n\r\n### Additional context\r\n\r\nIt seems that some of this information is upstream in the markdown-it library. But this I am unsure about. But in addition to this, there is the `theme/index.ts` file, which proposes to export a weakly typed object. Perhaps there could be a strongly typed function for this that would provide some info\r\n\r\nI have found no reference to this being strongly typed though.\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2953],{"name":2916,"color":2917},2368,"Docs: more information when using a custom theme","2023-08-25T19:31:40Z","https://github.com/vuejs/vitepress/issues/2368",0.7499298,["Reactive",2960],{},["Set"],["ShallowReactive",2963],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fYw9GfUGeYV33nzWZXG38CwsJmSra9oNj8LFICvxtfQI":-1},"/vuejs/vitepress/769"]