-
Notifications
You must be signed in to change notification settings - Fork 29
Category page update #7
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
Conversation
… node and replaced '_id' with 'id'
…tegory template to display a list of posts for the given category
… work properly with posts that have multiple categories
|
Thanks! Gridsome |
|
Thanks @hjvedvik! I pulled down the 0.5 version yesterday. I should be updating this PR in the next couple days. I have another branch for the tags page as well. Would you prefer me to open a separate PR for tags or combine it with this one? |
|
Great! You can probably just create the tag template in this PR too :) |
|
@hjvedvik - when you have a chance, please take a look at my most recent commit. The graphql query works in the graphql "playground," and the featuredMedia endpoint works in the template, as long as I don't use any of its properties. For example, in the v-for loop, node.featuredMedia returns the object, with its properties, as expected. However, when I try to print the url of the featured image, node.featuredMedia.url, which works in the graphql playground, it results in an error in the template: EDIT: I've figured this out and pushed another commit. I'll add the Tags template to this PR shortly. |
…e: Wordpress api returns null for featuredMedia, if there's no featured image in a post. Vue was throwing an error if it came across a post with that null value
|
@hjvedvik This is ready for your review. I'd like to work on sidebar and footer components, etc. Would you be philosophically opposed to my including a UI library like uikit or bulma? Or do you intend to keep this starter kit to the bare essentials? If it's the latter, I'll continue just writing the essential CSS. |
|
Awesome! I'll take a look at this tomorrow :) I think @tomtev has plans for a basic design for this starter. We want to keep the default core starters as simple as possible. But feel free to create another more advanced starter for WordPress if you want to. We are going to have a starter library on the website sometime soon where it could be listed :) |
|
Sorry for the delay on this. I think the PR looks good now :) |
This pull request includes the following changes:
1 - I edited the graphql queries to reflect changes in the schema - the "fields" node has been deprecated, and the use of '_id' has also been deprecated in favor of using 'id'.
2 - On the Post template, I've included a link to the categories for each post, between the title and the content.
3 - On the Category template, I've added a title, and a list of posts similar to the Home list, but filtered for the selected category, using a computed property.