pcarion / gatsby-source-notionso Goto Github PK
View Code? Open in Web Editor NEWA Gatsby source plugin for sourcing data into your Gatsby application using Notion.so as a backend.
License: BSD 3-Clause "New" or "Revised" License
A Gatsby source plugin for sourcing data into your Gatsby application using Notion.so as a backend.
License: BSD 3-Clause "New" or "Revised" License
Export the page icon (emoji) that you can set in notion as a property of the page (pageIcon)
From notion we get:
format: { page_icon: '๐' },
Hey @pcarion
Thank for all your work!
I was really curious to give it a try but looks like I've found a blocker :/
ERROR #85923 GRAPHQL
There was an error in your GraphQL query:
Cannot query field "imageNodes" on type "NotionPageBlog".
File: src/templates/page.js:46:7
This is the error your referenced on your FAQ, but I am not sure how to fix it.
I added an image to my root page, but looks like it didn't make any change.
Any tip to debug this issue?
Thanks
This would be the first non-empty text block (as a string, no formatting)
The API needs the pageId, but it is tricky to extract from the URL.
Let's have the URL be the parameter to identify the page and have the code extract the pageId.
error log is:
There was an error in your GraphQL query:
Cannot query field "allNotionPageAssetBlog" on type "Query".
If you don't expect "allNotionPageAssetBlog" to exist on the type "Query" it is most likely a typo.
However, if you expect "allNotionPageAssetBlog" to exist there are a couple of solutions to common problems:
- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "allNotionPageAssetBlog" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")
It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "Query":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions
File: ../theme-notion/src/templates/page.js:51:5
blocks are currently hard to parse for rendering. Would be nice to have an agnostic API to render those blocks
The fix is to ignore for now 'toggle' blocks
A toggle block is defined like that:
{ role: 'reader',
value:
{ id: '91629d65-f538-4f2e-9c7b-c40a8320861c',
version: 42,
type: 'toggle',
properties: { title: [ [ 'toggle list?' ] ] },
content:
[ 'dd651889-8ba1-48ef-a26b-d69d484243b0',
'c70c17b9-8d74-4c66-8000-c89a50f1088a' ],
but.. the block ids are not part of the blocks returned with the page.
I'd like html file from blocks data. How can I do that? Is there a way to convert to html from block data? Thanks.
To test the example websites with a npm link doesn't work as the files of the examples are being processed twice.
A multi repo project structure should solve that issue.
Hello, is this already possible? This plugin seems pretty useful. I pulled some data from some public pages and it worked wonderfully. However, databases and their sub-blocks don't get parsed into results as far as I can tell.
debug: true
).Hello,
thanks a lot for the effort you put into this plugin.
I stumbled upon what I think is a little bug with images, these are the steps to reproduce the issue:
yarn start
Invariant Violation: Encountered an error trying to infer a GraphQL type for: localFile__ _NODE. There is no corresponding node with the id field matching: "4b8e0ad5-41c1-5781-bff6-ee4 c4deeed6b".
It seems the cache for Gatsby nodes is stepping in and is messing up with node ids. If I clean the cache between runs I don't get the error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.