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

[Bug report] PascalCase layouts cannot be used camelCase nor hyphen-delimited #1391

Closed
1 task done
meteorlxy opened this issue Mar 3, 2019 · 1 comment
Closed
1 task done
Assignees
Labels
has PR Has a related PR topic: config Relates to VuePress config

Comments

@meteorlxy
Copy link
Member

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

Bug report

Version

1.0.0-alpha.42

Steps to reproduce

  1. Create a layout Hello:
+-- .vuepress
    +-- theme
        +-- layouts
            +-- Hello.vue
            +-- Layout.vue
  1. Set layout in the frontmatter:
---
layout: hello
---

What is expected?

Render layout Hello.vue.

What is actually happening?

Render layout Layout.vue.

Other relevant information

The expected behavior is how 0.x behaves. So this could be a breaking change if not fixed.

Some relevant information about this issue:

  • 1.x does not register all the layout components autoly, but 0.x does. 1.x only register layout components in routes beforeEnter hook (see Unknown Custom Element - <v-#####> #1173 (comment)).
  • 1.x will check if the layout exists accoding to the exact layout name, i.e. LayoutName is only matched with LayoutName but not layoutName nor layout-name
@shigma shigma added the topic: config Relates to VuePress config label Mar 3, 2019
@shigma shigma self-assigned this Mar 4, 2019
@shigma shigma added the has PR Has a related PR label Mar 5, 2019
@ulivz ulivz closed this as completed in 3e91eba Mar 9, 2019
@ulivz
Copy link
Member

ulivz commented Mar 9, 2019

Available at 1.0.0-alpha.43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR Has a related PR topic: config Relates to VuePress config
Projects
None yet
Development

No branches or pull requests

3 participants