You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like to create an n2y plugin that will over-ride the default behavior for the link_to_page block such that each time it occurs, the content of the page that's linked to is inserted into in place of the block.
Steps to complete:
Read through the README
Install the code locally and ensure all of the tests are passing
Read about the plugin system code, and in the readme, and browse through the existing plugins in the codebase
Following our git and PR SOP, including creating logical commits with good commit messages, and create a PR that creates a new plugin that performs as discussed. If you have any questions about details in that SOP, please ask me.
Update the existing plugin end-to-end test (including updating the associated notion page's content---see the end to end test docstrings) to include a link_to_page block and assert that the content is expanded.
Handle the case where the plugin doesn't have permission to access the linked page; in this case, log a warning including a link to the notion block where it occurred (grep for logger.warning for examples).
Update the end-to-end test to cover the case where we don't have permissions.
If a link goes to a database, just log a warning and ignore it. Be sure to include a link to the notion block where the warning occurred.
The text was updated successfully, but these errors were encountered:
In Notion there are a few types of links. One of them, called a
link_to_page
block: https://developers.notion.com/reference/block#link-to-page-blocksThe default behavior of n2y is to just display a warning if one of these is used:
n2y/n2y/blocks.py
Lines 518 to 519 in 76c802d
We'd like to create an n2y plugin that will over-ride the default behavior for the
link_to_page
block such that each time it occurs, the content of the page that's linked to is inserted into in place of the block.Steps to complete:
Read through the README
Install the code locally and ensure all of the tests are passing
Read about the plugin system code, and in the readme, and browse through the existing plugins in the codebase
Following our git and PR SOP, including creating logical commits with good commit messages, and create a PR that creates a new plugin that performs as discussed. If you have any questions about details in that SOP, please ask me.
Update the existing plugin end-to-end test (including updating the associated notion page's content---see the end to end test docstrings) to include a
link_to_page
block and assert that the content is expanded.Handle the case where the plugin doesn't have permission to access the linked page; in this case, log a warning including a link to the notion block where it occurred (grep for
logger.warning
for examples).Update the end-to-end test to cover the case where we don't have permissions.
If a link goes to a database, just log a warning and ignore it. Be sure to include a link to the notion block where the warning occurred.
The text was updated successfully, but these errors were encountered: