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

Incorporate Docs in Fuse Search #84

Closed
marcodeluca opened this issue Feb 22, 2020 · 1 comment
Closed

Incorporate Docs in Fuse Search #84

marcodeluca opened this issue Feb 22, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@marcodeluca
Copy link

marcodeluca commented Feb 22, 2020

Thanks for the starter, using it as an intro to gridsome and tailwind. Quick question, any suggestions on how to incorporate multiple content types into a single search? For example:

const { collection } = store.getContentType('Post', 'Documentation');

But then there would have to be I guess some more complex joining after that... it's all new to me so if there's an easy way to do this I'd love to see an example.

Thanks!

@drehimself
Copy link
Owner

Hmm, I thought it would be that simple but since Documentation is a different type than Post (Posts use the source-filesystem plugin, Docs use the vue-remark plugin), I'm not sure how to grab the docs in the gridsome.server.js file

gridsome.server.js

const { collection } = store.getContentType('Post'); // grabs posts, works

 // doesn't work for vue-remark types, not sure how to grab docs
const { collectionDocs } = store.getContentType('Documentation');

If you're reading this and you know, please let me know. Or better yet, send a PR!

@drehimself drehimself changed the title Quick question... Incorporate Docs in Fuse Search Feb 24, 2020
@drehimself drehimself added the help wanted Extra attention is needed label Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants