How to disable prose components on a specific page? #2210
Unanswered
goodpixels
asked this question in
Q&A
Replies: 1 comment
-
UPDATE: I kind of managed to get it working by checking route meta, but I don't like this approach, as it's quite flaky. Can anyone recommend a better way please? Inside
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for the great plugin and a highly responsive community!
I'm working on a blog and I've encountered the following scenario: on the blog category listing page I want to render the excerpt as a regular paragraph, but on the single post page I want to render it in large font.
I've created a custom Excerpt component (as mentioned here), and it works great.
However, I would only want to use it when rendering content via the single post page (
/pages/blog/[...slug].vue
), and when the same content is rendered on the blog category page (/pages/blog/index.vue
), the excerpt should be rendered as a plain paragraph tag.Here's my code:
/components/content/Excerpt.vue
/pages/blog/index.vue
/components/ArticleSnippet.vue
/content/blog/test-article.md
Any idea how I can disable the Excerpt component on the blog category page?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions