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

Querying ONLY the excerpt and rendering seams impossible >no content found ? #2229

Closed
CaptainFalcon92 opened this issue Aug 16, 2023 · 0 comments · Fixed by #2246
Closed

Comments

@CaptainFalcon92
Copy link

Hello people,

I've been trying to display a title and the excerpt of my documents (posts),
while using .only(['title', 'excerpt']).

Yes, i know about <!-- more -->

Screenshot 2023-08-16 030307

Rendering works when using no .only and using <ContentRenderer :value="post" :excerpt="true">
But what's the point of loading a whole document when one only need the excerpt part and the server can serve it ?

Asking for exceprt only works network-wise, but i cannot have it to render.
I tried a combination of all these :

<ContentRenderer :value="post" :excerpt="true">
<ContentRenderer :value="post.excerpt">
<ContentRenderer :value="post.excerpt" :excerpt="true">
<ContentRenderer :value="{ body: post.excerpt }">

Screenshot 2023-08-16 030542

.
.
.

None work. I always get the #empty slot showing instead.

Screenshot 2023-08-16 030801

It most likely is lack of understanding from my side although i find the documentation very shallow when it comes to this.

.
.
.

Screenshot 2023-08-16 031101

As i comment the line.. It works. Despite the required properties to be identical.
Is :excerpt=true only relying on the body and ignoring the fact the excerpt is already extracted as its own property ?

Screenshot 2023-08-16 031025

.
.
.

If someone would know how i can get my excerpt rendering, or simply ask nuxt/content to stupidly render some markdown i have on hand, please help

Have a good day, all the best

CF

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 a pull request may close this issue.

1 participant