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

Expose meta content for filters #13

Closed
HaoZeke opened this issue Nov 17, 2018 · 2 comments
Closed

Expose meta content for filters #13

HaoZeke opened this issue Nov 17, 2018 · 2 comments

Comments

@HaoZeke
Copy link

HaoZeke commented Nov 17, 2018

Problem

Currently, orga does not support variable graphql queries since only internal is exposed.

Details

For remark this is valid:

allMarkdownRemark(
      filter: { frontmatter: { category: { in: ["Pandas"] } } }
    ) {
      totalCount
      edges {
        node {
          frontmatter {
            title
            category
            date
          }
        }
      }
    }
}

However, the only option for filtering orga is allOrga ( filter: { internal: {content: { regex: "/CATEGORY:/"}}} )

Since currently query CategoryPage($category: String) { ( filter: { internal: {content: { regex: "/CATEGORY:/" regex: $category }}} ) also does not work.

Suggestion

If the meta object could be exposed to be similar to the remark frontmatter object, it would be greatly appreciated.

@xiaoxinghu
Copy link
Collaborator

The gatsby-transformer-orga package received a pretty big overhaul. New features are added. Please head over to the doc page for details. That resolves your issue by putting all metadata into a meta property. I think you will like it. 😉

@HaoZeke
Copy link
Author

HaoZeke commented Dec 25, 2018

Thanks so much! Works perfectly now, will be transitioning to pure org mode and writing it up!!

@HaoZeke HaoZeke closed this as completed Dec 25, 2018
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

No branches or pull requests

2 participants