Skip to content

Commit

Permalink
Don't register User as a global component
Browse files Browse the repository at this point in the history
  • Loading branch information
feihong committed Oct 15, 2024
1 parent 336a3a1 commit 048ccae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// You can directly import Vue files in the theme entry
// VitePress is pre-configured with @vitejs/plugin-vue.
import Layout from './Layout.vue'
import Users from './Users.vue'

export default {
Layout,
enhanceApp({ app }) {
app.component('Users', Users)
enhanceApp({ app, router, siteData }) {
// ...
}
}
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ features:
details: Melange builds on top of decades of type system research, compiler engineering and tooling development to provide a polished developer experience. Companies like Ahrefs use Melange daily to deploy web applications for their users.

---
<script setup>
import Users from '.vitepress/theme/Users.vue'
</script>

<Users />

0 comments on commit 048ccae

Please sign in to comment.