diff --git a/docs/guide/asset-handling.md b/docs/guide/asset-handling.md index 20969f9c..dd6105a4 100644 --- a/docs/guide/asset-handling.md +++ b/docs/guide/asset-handling.md @@ -16,7 +16,7 @@ All **static** path references, including absolute paths, should be based on you ## Public Files -Sometimes you may need to provide static assets that are not directly referenced in any of your Markdown or theme components (for example, favicons and PWA icons). The `public` directory under project root can be used as an escape hatch to provide static assets that either are never referenced in source code (e.g. `robots.txt`), or must retain the exact same file name (without hashing). +Sometimes you may need to provide static assets that are not directly referenced in any of your Markdown or theme components (for example, favicons and PWA icons). The `public` directory under project root (`docs` folder if you're running `vitepress build docs`) can be used as an escape hatch to provide static assets that either are never referenced in source code (e.g. `robots.txt`), or must retain the exact same file name (without hashing). Assets placed in `public` will be copied to the root of the dist directory as-is. diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index 852a36bf..e5d15f18 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -15,12 +15,12 @@ The essential file for configuring a VitePress site is `.vitepress/config.js`, w ```js export default { - title: 'Hello VitePress', + title: 'VitePress', description: 'Just playing around.' } ``` -In the above example, the site will have the title of `VitePress`, and `Just playing around` as description meta tag. +In the above example, the site will have the title of `VitePress`, and `Just playing around.` as the description meta tag. Learn everything about VitePress features at [Theme: Introduction](./theme-introduction) to find how to configure specific features with in this config file. diff --git a/docs/guide/markdown.md b/docs/guide/markdown.md index 846b867f..39716fef 100644 --- a/docs/guide/markdown.md +++ b/docs/guide/markdown.md @@ -364,12 +364,12 @@ It also supports [line highlighting](#line-highlighting-in-code-blocks): The value of `@` corresponds to the source root. By default it's the VitePress project root, unless `srcDir` is configured. ::: -You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/codebasics#_folding) to only include the corresponding part of the code file. You can provide a custom region name after a `#` following the filepath (`snippet` by default): +You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/codebasics#_folding) to only include the corresponding part of the code file. You can provide a custom region name after a `#` following the filepath: **Input** ```md -<<< @/snippets/snippet-with-region.js{1} +<<< @/snippets/snippet-with-region.js#snippet{1} ``` **Code file** diff --git a/docs/guide/theme-sidebar.md b/docs/guide/theme-sidebar.md index 3a2c853d..1433c05d 100644 --- a/docs/guide/theme-sidebar.md +++ b/docs/guide/theme-sidebar.md @@ -68,7 +68,7 @@ export default { ## Multiple Sidebars -You may show different sidebar depending on the page path. For example, as shown on this site, you might want to create a separate sections of content in your documentation like "Guide" page and `Config` page. +You may show different sidebar depending on the page path. For example, as shown on this site, you might want to create a separate sections of content in your documentation like "Guide" page and "Config" page. To do so, first organize your pages into directories for each desired section: @@ -92,27 +92,31 @@ export default { sidebar: { // This sidebar gets displayed when user is // under `guide` directory. - '/guide/': { - text: 'Guide', - items: [ - // This shows `/guide/index.md` page. - { text: 'Index', link: '/guide/' }, // /guide/index.md - { text: 'One', link: '/guide/one' }, // /guide/one.md - { text: 'Two', link: '/guide/two' } // /guide/two.md - ] - }, + '/guide/': [ + { + text: 'Guide', + items: [ + // This shows `/guide/index.md` page. + { text: 'Index', link: '/guide/' }, // /guide/index.md + { text: 'One', link: '/guide/one' }, // /guide/one.md + { text: 'Two', link: '/guide/two' } // /guide/two.md + ] + } + ], // This sidebar gets displayed when user is // under `config` directory. - '/config/': { - text: 'Config', - items: [ - // This shows `/guide/index.md` page. - { text: 'Index', link: '/config/' }, // /config/index.mdasdfasdfasdfasdfaf - { text: 'Three', link: '/config/three' }, // /config/three.md - { text: 'Four', link: '/config/four' } // /config/four.md - ] - } + '/config/': [ + { + text: 'Config', + items: [ + // This shows `/guide/index.md` page. + { text: 'Index', link: '/config/' }, // /config/index.md + { text: 'Three', link: '/config/three' }, // /config/three.md + { text: 'Four', link: '/config/four' } // /config/four.md + ] + } + ] } } } diff --git a/src/client/theme-default/components/VPButton.vue b/src/client/theme-default/components/VPButton.vue index d6c5d246..e1d3408a 100644 --- a/src/client/theme-default/components/VPButton.vue +++ b/src/client/theme-default/components/VPButton.vue @@ -1,5 +1,6 @@ diff --git a/src/client/theme-default/components/VPNav.vue b/src/client/theme-default/components/VPNav.vue index 9897e1a6..6e0c61a8 100644 --- a/src/client/theme-default/components/VPNav.vue +++ b/src/client/theme-default/components/VPNav.vue @@ -33,8 +33,13 @@ provide('close-screen', closeScreen) } .VPNav.no-sidebar { - backdrop-filter: saturate(50%) blur(8px); -webkit-backdrop-filter: saturate(50%) blur(8px); + backdrop-filter: saturate(50%) blur(8px); + background: rgba(255, 255, 255, 0.7); + } + + .dark .VPNav.no-sidebar { + background: rgba(36, 36, 36, 0.7); } @supports not (backdrop-filter: saturate(50%) blur(8px)) { diff --git a/src/client/theme-default/components/VPNavBar.vue b/src/client/theme-default/components/VPNavBar.vue index 4e27b1f6..9077419a 100644 --- a/src/client/theme-default/components/VPNavBar.vue +++ b/src/client/theme-default/components/VPNavBar.vue @@ -65,8 +65,13 @@ const { hasSidebar } = useSidebar() } .VPNavBar.has-sidebar .content { - backdrop-filter: saturate(50%) blur(8px); -webkit-backdrop-filter: saturate(50%) blur(8px); + backdrop-filter: saturate(50%) blur(8px); + background: rgba(255, 255, 255, 0.7); + } + + .dark .VPNavBar.has-sidebar .content { + background: rgba(36, 36, 36, 0.7); } @supports not (backdrop-filter: saturate(50%) blur(8px)) { diff --git a/src/client/theme-default/components/VPNavBarTitle.vue b/src/client/theme-default/components/VPNavBarTitle.vue index c09c06dc..86557939 100644 --- a/src/client/theme-default/components/VPNavBarTitle.vue +++ b/src/client/theme-default/components/VPNavBarTitle.vue @@ -8,7 +8,7 @@ const { hasSidebar } = useSidebar()