vitepress
vitepress copied to clipboard
Empty Layout option
Is your feature request related to a problem? Please describe.
I want to create a landing page for a documentation and I dont any layout option. How can I create a landing that points to a Vue component directly?
Describe the solution you'd like
---
layout: none
---
<Landing />
<script setup>
import Landing from "./components/Landing.vue"
</script>
Describe alternatives you've considered
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Read the Contributing Guidelines.
- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
layout: page
?
I dont want header too. layout: page
brings header to top.
I dont want header too.
layout: page
brings header to top.
Ah, okay! We should probably add some option to hide nav and footer as well (PRs are welcome). For now you can do something like this inside your Landing
component:
<script setup>
import { onMounted, onUnmounted } from 'vue'
onMounted(() => {
document.body.classList.add('no-nav')
})
onUnmounted(() => {
document.body.classList.remove('no-nav')
})
</script>
<style>
.no-nav .VPNav {
display: none;
}
</style>
I understand strict layout options in inner docs but landing should be very customizable. Just for landing this feature request is kinda needful.