Skip to content

Custom 404 page with custom theme - Cannot resolve Layout.vue file in .vuepress/theme #1178

@deraw

Description

@deraw
  • I confirm that this is a issue rather than a question.

Bug report

Version ^0.14.5

Steps to reproduce

Create a 404.vue page in a Vuepress repo located in .vuepress/theme/layouts/.

What is expected?

The layout should be used when rendering a not found page.

What is actually happening?

The default layout is used.

Other relevant information

In the documentation, it's specified that we can create a local theme. After, it's said that we can have a 404.vue page in layouts folder. But Vuepress just don't use it.
It's even worse if I put the Layout.vue in /layouts, I get the folowwing error: Error: [vuepress] Cannot resolve Layout.vue file in .vuepress/theme.

Is there a workaround? How do I customize the 404 page?

  • Your OS:
  • Node.js version:
  • Browser version:
  • Is this a global or local install?
  • Which package manager did you use for the install?

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