You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a pinned flag to the YAML at the top of a post's markdown file
---
title: Some post
author: Doogie
date: 2019-09-09T20:00:00Z
hero_image: "/src/assets/content/images/mandel-fractal.jpg"
pinned: true // <====== THIS
---
Here comes the posts *markdown* ...
I already tried adding this. But somehow I cannot query it the page-query of Blog.vue. Error message: "Error: Cannot query field "pinned" on type "Blog". How can I add "metadata" fields to posts?
The text was updated successfully, but these errors were encountered:
Ok, meanwhile I found out that Gridsome has its built-in GraphQL schema for a "Post". So this needs some more digging around ... maybe create a Gridsome plugin? I am not sure what's the right path to take. I'd be glad for any hint or suggestion...
Summary
I would like to pin posts to the top of my blog.
Implementation suggestion
Add a pinned flag to the YAML at the top of a post's markdown file
I already tried adding this. But somehow I cannot query it the page-query of Blog.vue. Error message: "Error: Cannot query field "pinned" on type "Blog". How can I add "metadata" fields to posts?
The text was updated successfully, but these errors were encountered: