Skip to content

Clarification: Mix Vuepress with vue SPA #2399

Closed
@davidgiga1993

Description

@davidgiga1993

I'm currently using vuepress as a reulgar static blog system but I plan to extend the page with additional pages which require pages with dynamic routes (e.g. /page/;id). The content for the page should be loaded via ajax from a backend (just like in a reulgar vue SPA).

So far I've tried adding the routes in enhanceApp but as already mentioned in #160 this won't work since the generated output doesn't include these files.

To make something like this work my expectation would be the following:

  1. Vuepress generates a fallback.html which has the same content as the other html pages
  2. The webserver should then present fallback.html to the user if no exact match was found in the filesystem (this would be a non vuepress related configuration)
  3. The fallback page uses the router just like when serving the page in vuepress dev docs mode

Is it currently possible to do something like this or is there another way to mix vuepress with "regular" vue on a single page?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions