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

Configure for multi-page applications #57

Closed
gagayang opened this issue Jul 27, 2020 · 5 comments
Closed

Configure for multi-page applications #57

gagayang opened this issue Jul 27, 2020 · 5 comments

Comments

@gagayang
Copy link

尤大:
请问如何配置一个多页面的、使用不同layout 布局的应用呢??

@kiaking
Copy link
Member

kiaking commented Sep 3, 2020

@antfu Please help me out here (with the language 😅 )

@antfu
Copy link
Member

antfu commented Sep 3, 2020

Translation:

Evan:
How to configure a multi-page application that uses different layouts? ?

@antfu antfu changed the title 如何实现一个多页面的应用呢?? Configure for multi-page applications Sep 3, 2020
@kiaking
Copy link
Member

kiaking commented Sep 3, 2020

Thanks antfu for the translation!

So the answer is currently, you can not. Well we can do pretty much anything in .vitepress/theme/Layout.vue so we could just add condition depending on the SiteData to do this I guess?

Since VitePress is opinionated version of VuePress (at least at the moment), not sure if we want to support this in for example config. Let's keep this issue open for maybe a week or so to gather more feedbacks.

@bowencool
Copy link

bowencool commented Nov 19, 2021

Adding html entry doesn't work

// docs/vite.config.js
export default defineConfig({
  // ...
  build: {
    rollupOptions: {
      input: {
        // main: resolve(__dirname, 'index.html'),
        demos: resolve(__dirname, 'demos.html'),
      },
    },
  },
});

image

@yyx990803
Copy link
Member

  1. 写自定义的 theme

  2. default theme 里用 frontmatter

---
customLayout: true
---

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants