\n\n---\n\n\u003Cdetails>\u003Csummary>\u003Ccode>:has()\u003C/code> CSS changes\u003C/summary>\n\u003Cp>\n\n```diff\n .custom-block {\n- padding: 16px 16px 8px;\n+ padding: 8px 16px;\n }\n\n+ .custom-block:has(.custom-block-title) {\n+ padding-top: 16px;\n+ }\n```\n\n\u003C/p>\n\u003C/details> \n\n\n### Describe alternatives you've considered\n\nYou can create custom containers yourself, like this:\n\n```md\n\u003Cdiv class=\"custom-block tip\" style=\"padding-top: 8px\">\n\n💡 This is a helpful tip.\n\n\u003C/div>\n```\n\nHowever, this is not ergonomical, nor is it future-proof (What if those class names change? What if the padding changes?).\n\n### Additional context\n\nThe use case for this already exists within Vitepress docs:\n\nhttps://github.com/vuejs/vitepress/blob/dd293484669c59a471052108995be3b8f898838d/docs/en/guide/what-is-vitepress.md?plain=1#L5-L9\n\n\n\n### Validations\n\n- [x] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [x] Read the [docs](https://vitepress.dev).\n- [x] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [x] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],4928,"vuejs","vitepress","open","Titleless custom containers","2025-08-31T16:22:27Z","https://github.com/vuejs/vitepress/issues/4928",0.71394753,{"description":3154,"labels":3155,"number":3159,"owner":3146,"repository":3147,"state":3148,"title":3160,"updated_at":3161,"url":3162,"score":3163},"### Is your feature request related to a problem? Please describe.\n\nmd文件中的title和description能否是动态的,或者是让生成的 html文件中的title和description能否是动态的\r\njs取 一些文本赋值给title或description\n\n### Describe the solution you'd like\n\nmd文件中的title和description能否是动态的,或者是让生成的 html文件中的title和description能否是动态的\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[3156],{"name":3157,"color":3158},"stale","ededed",3798,"md文件中的title和description能否是动态的","2024-05-23T19:48:32Z","https://github.com/vuejs/vitepress/issues/3798",0.71993226,{"description":3165,"labels":3166,"number":3167,"owner":3146,"repository":3147,"state":3168,"title":3169,"updated_at":3170,"url":3171,"score":3172},"### Is your feature request related to a problem? Please describe.\n\nWhen setting the config for `title`, as an example, \"My Site\", and setting the markdown file frontmatter title to \"My Inner Page\", the results would be that the title bar of the browser shows \"My Inner Page | My Site\" - this is working as expected. Alternatively, leaving out the frontmatter title the browser bar will favor the h1 or subsequent heading tags and render that in the browser bar, this is expected as well I assume...\r\n\r\nHowever, what if we want to _just_ show the evergreen title set in config, like for just a homepage or any page that might live \"outside\" of the normal browser title bar breadcrumbs?\n\n### Describe the solution you'd like\n\nIs there a way to have the empty string or false value of the frontmatter title property kick in as no string and the heading tags ignored to disable generating any additional title bar data?\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\nI am using a custom theme so maybe this problem is not revelant when using the default theme?\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],1197,"closed","[Request/Question] Removing duplicate titles in browser bar","2023-01-21T14:28:29Z","https://github.com/vuejs/vitepress/issues/1197",0.6528127,{"description":3174,"labels":3175,"number":3176,"owner":3146,"repository":3147,"state":3168,"title":3177,"updated_at":3178,"url":3179,"score":3180},"### Is your feature request related to a problem? Please describe.\n\nN/A\n\n### Describe the solution you'd like\n\nAllow custom titles of containers to be manipulated with Markdown, such as **bold**, _italics_, or hyperlinks.\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],765,"Markdown formatting in custom container titles","2023-01-21T14:34:10Z","https://github.com/vuejs/vitepress/issues/765",0.68598306,{"description":3182,"labels":3183,"number":3184,"owner":3146,"repository":3147,"state":3168,"title":3185,"updated_at":3186,"url":3187,"score":3188},"### Is your feature request related to a problem? Please describe.\n\nSometimes we want to use HTML in site title, for example, styled version label:\r\n\r\n\r\n\r\nBut it currently escaped as `OI Runner++ <span class=\"VPBadge tip\">v1.0.0</span>`\n\n### Describe the solution you'd like\n\nDon't escape HTML for `siteTitle`, like `hero` in Home layout.\r\n\r\nSince site config is determined at build time, there is no need to consider XSS issues.\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],4307,"Allow to use HTML in `siteTitle` of default theme","2024-11-02T04:43:30Z","https://github.com/vuejs/vitepress/issues/4307",0.69347996,{"description":3190,"labels":3191,"number":3192,"owner":3146,"repository":3147,"state":3168,"title":3193,"updated_at":3194,"url":3195,"score":3196},"### Is your feature request related to a problem? Please describe.\r\n\r\nCode block title requires a code group. I like to put for example a file name as the title.\r\n\r\n### Describe the solution you'd like\r\n\r\nAllow specifying titles for code blocks outside of code groups, using the existing syntax.\r\n\r\n```\r\n```js [main.js]\r\nconsole.log(\"Hello World\")\r\n````\r\n\r\n(do code blocks not work here?)\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nI saw support for single code block titles being mentioned in the comments of an old issue discussing the implementation of the feature for code groups, but as far as I can tell, it never made it.\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.",[],4027,"Code block title without code group","2024-07-16T04:42:13Z","https://github.com/vuejs/vitepress/issues/4027",0.70671326,{"description":3198,"labels":3199,"number":3200,"owner":3146,"repository":3147,"state":3168,"title":3201,"updated_at":3202,"url":3203,"score":3204},"**Is your feature request related to a problem? Please describe.**\r\nThe title of the docs cannot be customized, I have an idea that you can throw APIs about setting the title in `config.js` or some other ways, e.g. I want to set the title to \"xxx - xxx\" instead of \"xxx | xxx\", although I can use `document.title` to modify, but the default is still \"xxx | xxx\" when rendering. Moreover, when there is a `md` file as the home page of the document, the document title will be `h1` title as the title of the home page, e.g. document `h1` is `Installation`, and then the title will be set `Installation | xxx`.\r\n\r\n**Describe the solution you'd like**\r\nThrow an API in `config.js` file, set the title of the home page and other pages according to the `route` through template characters. \r\nFor example, when the route is `/`, the title can be set `${ site.title} - ${ site.description} `, when the route is `/xxx`, the title can be set `${ page.title} - ${ site.title} - ${ site.description }`. Maybe you can also refer to the following configuration structure:\r\n```js\r\n// .vitepress/config.js\r\n...\r\ndocsTitle:{\r\n // Match route “/”\r\n \"/\" : \"${ site.title} - ${ site.description}\",\r\n // Match route “/about” , if a specific route is set \r\n \"/about\" : \"About me\",\r\n // Match route “/xxx” , “ * ” means Wildcard\r\n \"/*\" : \"${ page.title} - ${ site.title} - ${ site.description }\"\r\n}\r\n...\r\n```\r\n \r\n**Describe alternatives you've considered**\r\nCurrently I am using `document.title` to change the docs title (on vuepress 1.5.0) .\r\n",[],23,"Is it possible to throw API to customize the docs title?","2023-01-21T16:25:40Z","https://github.com/vuejs/vitepress/issues/23",0.70723367,{"description":3206,"labels":3207,"number":3208,"owner":3146,"repository":3147,"state":3168,"title":3209,"updated_at":3210,"url":3211,"score":3212},"### Is your feature request related to a problem? Please describe.\n\nThe text goes behind the header when JS is turned off:\r\n\r\n\n\n### Describe the solution you'd like\n\nThis styling should be done using vanilla CSS\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],2679,"Avoid JS for theming header","2023-08-11T00:04:35Z","https://github.com/vuejs/vitepress/issues/2679",0.7178744,{"description":3214,"labels":3215,"number":3217,"owner":3146,"repository":3147,"state":3168,"title":3218,"updated_at":3219,"url":3220,"score":3221},"### Is your feature request related to a problem? Please describe.\n\nIn VuePress it was possible to set default titles for TIP, INFO, WARNING, DANGER, DETAILS in config but in VitePress it doesn't work anymore.\n\n### Describe the solution you'd like\n\nAdd something like this in a config:\r\n```js\r\nthemeConfig: {\r\n\tcontainer: {\r\n\t\ttip: 'Tip',\r\n\t\tinfo: 'Info',\r\n\t\twarning: \"Warning\",\r\n\t\tdanger: 'Danger',\r\n\t\tdetails: \"Details\"\r\n\t},\r\n}\r\n```\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[3216],{"name":3157,"color":3158},1947,"Add i18n support for default Custom Container titles","2023-08-11T00:04:11Z","https://github.com/vuejs/vitepress/issues/1947",0.7202824,{"description":3223,"labels":3224,"number":3228,"owner":3146,"repository":3147,"state":3168,"title":3229,"updated_at":3230,"url":3231,"score":3232},"### Is your feature request related to a problem? Please describe.\n\n[Prev Next Links](https://vitepress.dev/reference/default-theme-prev-next-links) can only customize using Frontmatter in each markdown file\n\n### Describe the solution you'd like\n\nI think there must be someone else who thinks like me: **I don't want Prev Next Links**\r\n\r\nusing `custom.css` or customize in each markdown file is too hack and hope it can be edit in either global config\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[3225],{"name":3226,"color":3227},"theme","0754FB",2079,"Add support for custom Prev Next Links in themeConfig","2023-06-18T00:04:58Z","https://github.com/vuejs/vitepress/issues/2079",0.72470814,["Reactive",3234],{},["Set"],["ShallowReactive",3237],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fvVdOg_cNf-td2le6yJtn7UVy78ZxRipZu1igDLa-5_E":-1},"/vuejs/vitepress/1195"]