Skip to content

feat(blog) add component as layout option for Tags/Categories #1139

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

Closed

Conversation

darrenjennings
Copy link

Summary
It seems that typically you'd have custom theme for the blog plugin but it would be nice to define a layout component from the .vuepress/components directory similar to how you can specify layout in frontmatter normally.

This allows the plugin to use tags and categories without the need for a custom theme.

Example usage here: https://github.com/darrenjennings/guuu.io/blob/feat/service-worker/docs/.vuepress/components/Tag.vue where I'm using the default theme and creating custom components that hook into and extend @vuepress/theme-default/layouts/Layout

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

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome (although this was a server side change.)
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

I am new to this codebase so I am unsure this was the best way to tackle this issue.

* it seems that typically you'd have custom theme for blog plugin
but it would be nice to define a layout component from the
.vuepress/components registered components similar to how frontmatter can
use these as layouts in normal scenarios.
@ulivz ulivz force-pushed the master branch 5 times, most recently from 316e022 to 1284944 Compare January 29, 2019 11:47
@ulivz
Copy link
Member

ulivz commented Jun 4, 2019

Thanks for the work, but we have reimplemented the blog plugin.

See: #36 (comment)

@ulivz ulivz closed this Jun 4, 2019
@darrenjennings darrenjennings deleted the feat/blog-component-layout branch June 24, 2020 04:11
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.

2 participants