Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 2.76 KB

README.md

File metadata and controls

63 lines (40 loc) · 2.76 KB

NotionSharp - Notion API client for C#

Notion is an app to write things. It has the most simple "wysiwyg" editor i have ever seen. Add photo, video, tables and more in one drag/drop or one click. For devs it features code blocks with highlightning.
The app works both offline and online, is multi user and historize all your changes making it easy to revert them.
The app is also available in the Microsoft Store for Windows and on mobile phones to peacefully write your contents offline.

This is an unofficial Notion APIv3 library and website template. You can, for example, get notion pages as a RSS feed. You can also use it as a simple CMS (Content Management System).

NuGet
Nuget

publish to nuget

notion-img

Use Cases

Spawn a Website displaying the pages built with Notion in a few seconds. See below 'kubernetes'.

Get a RSS representation of all root pages of the main space.
This also transforms notion data to HTML:

    var rssFeed = await session.GetSyndicationFeed();

Get a RSS representation from the sub-pages of a page:

    var space = userContent.RecordMap.Space.First().Value;
    var firstPage = userContent.RecordMap.Block[space.Pages[0]];
    var subPages = firstPage.Content;

    var feedPublicBlog = await session.GetSyndicationFeed(subPages);
    feedPublicBlog.Title = new TextSyndicationContent(firstPage.Title);

Spawn a website displaying Notion pages in a few minutes

Setup your Notion pages and get your credentials

Create some content

Create a page at the root of Notion.so (the root page), then add subpages to this page with a title and an icon.
For each subpage, check "shared". Don't check "Shared" on the root page. Only shared pages will be displayed by our example, so you can prepare private pages in advance without publishing them.

When you encounter CmsPageTitle below in this setup, replace it with the exact title of your root page.

Documentation

Sponsors

Big Thanks to those sponsors for supporting this project and keeping it free.

Alt