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

chore($plugin-blog): do not fallback layout in plugin #1209

Closed
wants to merge 1 commit into from

Conversation

meteorlxy
Copy link
Member

Summary

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

Two reasons for this PR:

  • It's not reasonable to fallback the layout in the frontmatter to Page. Page usually means those layouts with <Content/> component, but the Tags and Categories are extra pages that added in the plugin-blog with not content.
  • We've already fallback layout in LayoutDistributor:
    if (this.$page.path) {
    if (getLayoutAsyncComponent(this.$page.frontmatter.layout)) {
    return this.$page.frontmatter.layout
    }
    return 'Layout'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant