styxlab / gatsby-theme-try-ghost

A Gatsby theme to build flaring fast blogs from headless Ghost CMS
MIT License
136 stars 56 forks source link

Use ghostPost canonical url if available. #269

Closed chancharles closed 3 years ago

chancharles commented 3 years ago

A simple change to use canonical URL from a ghost post if it's available. On a separate commit, add a new siteConfig option gatsbyNodeQuery to override the default one.

chancharles commented 3 years ago

Thanks for looking into this.

For #2, my use case is to retrieve only posts and pages that have certain tags. What do you think would be the best way to achieve that?

An alternative is to let users define a filter to run through the graphql result after the fact. I am open to suggestions.

Charles

On Sat, May 29, 2021 at 3:30 PM Joost Jansky @.***> wrote:

@.**** requested changes on this pull request.

1.

I am fine with the change on canonical urls. 2.

I have reservations about allowing to change the node query. This opens the door for a lot of support requests. Furthermore, why do you need this, wouldn't it be better to add another feature instead of allowing to change the query?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/styxlab/gatsby-theme-try-ghost/pull/269#pullrequestreview-671769037, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOXGSZU6ZUJNTMC7E5XBLTQE6EJANCNFSM45YN6KMA .

-- —

Travel blog: https://www.gorestrepeat.com

chancharles commented 3 years ago

I just realize that there are other places where allGhostPost is used. To add filtering to each one of them is difficult..

Maybe I should tackle at the source (gatsby-source-try-ghost) to provide a filter as a configuration to limit what can be returned from allGhostPost.

chancharles commented 3 years ago

I have removed the Node Query commit so we can proceed with this PR if you are okay. Thanks! I will open a separate issue to discuss the Node Query idea/alternative.

styxlab commented 3 years ago

Thanks!