{{ 1 + 1 }}
{{ i }}
` tag, which will lead to hydration mismatch because `
` does not allow block elements to be placed inside it.
+:::
+
+### Using Components In Headers
# text <Tag/>
| ` # text \`<Tag/>\`
| `<Tag/>
` will be displayed as-is; only the HTML that is **not** wrapped will be parsed by Vue.
+
+::: tip
+The output HTML is accomplished by [markdown-it](https://github.com/markdown-it/markdown-it), while the parsed headers are handled by VitePress (and used for both the sidebar and document title).
+:::
+
+## Using CSS Pre-processors
+
+VitePress has [built-in support](https://vitejs.dev/guide/features.html#css-pre-processors) for CSS pre-processors: `.scss`, `.sass`, `.less`, `.styl` and `.stylus` files. There is no need to install Vite-specific plugins for them, but the corresponding pre-processor itself must be installed:
+
+```
+# .scss and .sass
+npm install -D sass
+
+# .less
+npm install -D less
+
+# .styl and .stylus
+npm install -D stylus
+```
+
+Then you can use the following in Markdown and theme components:
+
+``` vue
+
+```
+
+## Script & Style Hoisting
+
+Sometimes you may need to apply some JavaScript or CSS only to the current page. In those cases, you can directly write root-level `
+
+## Built-In Components
+
+VitePress provides Built-In Vue Components like `ClientOnly` and `OutboundLink`, check out the [Global Component Guide](./global-component.md) for more information.
+
+**Also see:**
+
+- [Using Components In Headers](#using-components-in-headers)
\ No newline at end of file
diff --git a/package.json b/package.json
index ae1c0850..ef5118b4 100644
--- a/package.json
+++ b/package.json
@@ -87,7 +87,7 @@
"polka": "^0.5.2",
"prismjs": "^1.23.0",
"sirv": "^1.0.11",
- "vite": "^2.0.0-beta.70",
+ "vite": "^2.0.5",
"vue": "^3.0.5"
},
"devDependencies": {
diff --git a/src/client/theme-default/components/NavBar.vue b/src/client/theme-default/components/NavBar.vue
index cdcf84f8..2a5f52ec 100644
--- a/src/client/theme-default/components/NavBar.vue
+++ b/src/client/theme-default/components/NavBar.vue
@@ -36,7 +36,7 @@ defineEmit(['toggle'])
border-bottom: 1px solid var(--c-divider);
padding: 0.7rem 1.5rem 0.7rem 4rem;
height: var(--header-height);
- background-color: inherit;
+ background-color: var(--c-bg);
}
@media (min-width: 720px) {
diff --git a/yarn.lock b/yarn.lock
index 4cc35a04..83a26957 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2265,10 +2265,10 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1"
is-symbol "^1.0.2"
-esbuild@^0.8.34:
- version "0.8.42"
- resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.42.tgz#26101cf17fe4c4602c7c767e3177cf0c538073ac"
- integrity sha512-zUtj5RMqROCCCH0vV/a7cd8YQg8I0GWBhV3A3PklWRT+oM/YwVbnrtFnITzE1otGdnXplWHWdZ4OcYiV0PN+JQ==
+esbuild@^0.8.52:
+ version "0.8.54"
+ resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.54.tgz#2f32ff80e95c69a0f25b799d76a27c05e2857cdf"
+ integrity sha512-DJH38OiTgXJxFb/EhHrCrY8eGmtdkTtWymHpN9IYN9AF+4jykT0dQArr7wzFejpVbaB0TMIq2+vfNRWr3LXpvw==
escape-html@^1.0.3:
version "1.0.3"
@@ -6090,12 +6090,12 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"
-vite@^2.0.0-beta.70:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.0.tgz#156f35eadaa7947629aa8a24eb23129b07116ee3"
- integrity sha512-rNli5g0DaQ6+btlRqkmaR06neWaJGApmt40gocqrYDNi2XoEXYQgKiHSWzMeUgc1Cdva2HduqazaE+RaKjBpdQ==
+vite@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.5.tgz#ac46857a3fa8686d077921e61bd48a986931df1d"
+ integrity sha512-QTgEDbq1WsTtr6j+++ewjhBFEk6c8v0xz4fb/OWJQKNYU8ZZtphOshwOqAlnarSstPBtWCBR0tsugXx6ajfoUg==
dependencies:
- esbuild "^0.8.34"
+ esbuild "^0.8.52"
postcss "^8.2.1"
resolve "^1.19.0"
rollup "^2.38.5"