Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New feature] export VPHomeContent to provide content-adaptive layout #3954

Closed
4 tasks done
peterroe opened this issue Jun 11, 2024 · 0 comments
Closed
4 tasks done
Labels
contribution welcome The team would welcome a contribution from the community for this issue

Comments

@peterroe
Copy link
Contributor

peterroe commented Jun 11, 2024

Is your feature request related to a problem? Please describe.

Conveniently use content-adaptive layout in components on the home page

Describe the solution you'd like

.vitepress/theme/index.ts:

import HomePage from './component/HomePage'

export default {
  Layout: () => {
    return h(Theme.Layout, null, {
      'home-features-after': () => h(HomePage),
    })
  },

HomePage.vue:

<script setup lang="ts">
import{ VPHomeContent } from 'vitepress/theme'
</script>

<template>
	<VPHomeContent>
		<!-- my custom content -->
	</VPHomeContent>
</template>

Describe alternatives you've considered

No response

Additional context

No response

Validations

@brc-dd brc-dd added the contribution welcome The team would welcome a contribution from the community for this issue label Jun 11, 2024
@brc-dd brc-dd closed this as completed in 8aa6ccb Jun 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution welcome The team would welcome a contribution from the community for this issue
Projects
None yet
Development

No branches or pull requests

2 participants