docs: fix sidebar overflow at mid-width viewports and add a favicon (#2426)
This commit is contained in:
parent
7635115d01
commit
43c13c5fd5
2 changed files with 28 additions and 1 deletions
|
|
@ -30,6 +30,8 @@ export default defineConfig({
|
|||
title: 'MCP TypeScript SDK',
|
||||
description: 'The TypeScript SDK implementation of the Model Context Protocol specification.',
|
||||
base: '/v2/',
|
||||
// VitePress does not base-prefix head hrefs, so /v2/ is spelled out here.
|
||||
head: [['link', { rel: 'icon', type: 'image/svg+xml', href: '/v2/favicon.svg' }]],
|
||||
srcExclude: ['v1/**', '_meta/**', 'behavior-surface-pins.md'],
|
||||
sitemap: { hostname: `${siteUrl}/` },
|
||||
markdown: {
|
||||
|
|
|
|||
|
|
@ -13,9 +13,16 @@
|
|||
* which forces horizontal scrolling on most of our ~100-column code blocks.
|
||||
* Let the layout breathe and the column grow so typical snippets fit;
|
||||
* genuinely long lines still scroll inside their own block.
|
||||
*
|
||||
* Clamped to the viewport because the default theme's `(min-width: 1440px)`
|
||||
* rules size the sidebar and nav title as
|
||||
* `calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + ...)`, which goes
|
||||
* negative on viewports narrower than the max width: the sidebar collapses
|
||||
* and the site title spills over the search bar. With the clamp, those rules
|
||||
* resolve to their stock sub-1440px values on narrower viewports instead.
|
||||
*/
|
||||
:root {
|
||||
--vp-layout-max-width: 1680px;
|
||||
--vp-layout-max-width: min(100vw, 1680px);
|
||||
}
|
||||
|
||||
/* !important: the default rule is a scoped component style ([data-v-…]), which
|
||||
|
|
|
|||
Loading…
Reference in a new issue