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

accessing field with markdownRemark #13

Closed
brendanmc6 opened this issue Oct 8, 2018 · 3 comments
Closed

accessing field with markdownRemark #13

brendanmc6 opened this issue Oct 8, 2018 · 3 comments

Comments

@brendanmc6
Copy link
Collaborator

brendanmc6 commented Oct 8, 2018

First I want to thank you so much for this wonderful package, airtable plus gatsby has been a game changer. Having people like you out there working on these tools makes it a real joy to be a new developer!

Sorry that I don't know if this is a question, bug, or feature request, I'll try to keep it short:
When I follow your docs and map a column to "text/markdown", I am able to traverse markdownRemark and find the content. However, I can't identify which record the content come from i.e. query it in any meaningful way.

I can render the content column to html right in my components using unified.js, and it works great, but I'm trying to implement some of gatsby-transformer-remark's lovely plugins which seem to be intended for static .md files...

Is there something I am overlooking here? Thanks!

@jbolda
Copy link
Owner

jbolda commented Oct 9, 2018

Thank you so much for the kind words!

To be honest, I haven't dug into markdown with Airtable yet. I have only used it sourced from the filesystem, but I would imagine most plugins should work. Would you be able to give a snippet of code to help me understand? Even better, I don't have a working example using markdown yet, so a PR adding that would be amazing! I don't believe you would require unified though 🤔

@brendanmc6
Copy link
Collaborator Author

@jbolda I believe I got it figured out-- I was incorrectly using allMarkdownRemark to traverse the data and didn't realize the converted markdown nodes were right there in the allAirtable tree. I will be sending a PR soon with a working example of an airtable-markdown-driven documentation site, and a step by step tutorial to go along with it!

@jbolda
Copy link
Owner

jbolda commented Oct 11, 2018

Awesome! Feel free to reach out if you have any questions putting the example together! I'll likely want to copy your Airtable base into my account so TravisCI can build it and help catch code errors.

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