N2Web turns your Notion HTML export into a fully functional static website

Overview

Notion2Web

N2Web turns your Notion HTML export into a fully functional static website.

Artboard

What is Notion?

Notion is an online tool. But I can't tell you what it really is. It combines a content-management-system, a project-management-tool in a single no-code application builder. It is extremely versatile and in the end, it's what you make with it.

What is Notion2Web?

N2Web (this program here) takes the Notion HTML export and turns it into an own website. The HTML export is really well done, but it lacks on some features (more about below).

the compact feature list of N2Web

  • โฑ๏ธ  Set up in minutes - no programming knowledge required. Simple drag and drop files into the "contents" folder and you're good to go.
  • โšก  Super fast (loads 10x faster than a shared Notion page)
  • ๐ŸŽ›๏ธ  Editable menus and navigation
  • ๐ŸŽฎ  Self hosting gives you control
  • ๐Ÿ›‚  technically GDPR compliant right away (if you host in Europe)
  • ๐Ÿ“  Themeable - 4 themes already installed
  • ๐Ÿ‘ฉโ€๐Ÿ’ป  Hackable - easy code, simple structure
  • ๐Ÿ”Ž  Inbuilt search, which shows the relevance of a search result and calculates the importantcy of the search term to page.

Why shouldn't I use the inbuilt "share to web function" in Notion?

First of all: you can! The share-to-web function in Notion is great. But it also has some problems, which N2Web tries to solve:

  • Data privacy issues/GDPR: Notion is a company, based in the US. Companies from the EU are not allowes to use US services right away. In fact, if a company wants to use Notion in a 100% legally secure way, they will have hard time to achieve that (cookie consent, privacy information).
    • โ†’ N2Web solves this because you'll host the application yourself. Also vanilla N2Web doesn't create a cookie and don't include external ressources like fonts or something.
  • Styling: If you use a shared page from Notion, you have to stick with their design. While Notion it self looks reasonable, it wont fit into you companies or personal corporate identity necessarily.
    • โ†’ N2Web is 100% themeable. You can change nearly everything with little knowledge of CSS and HTML.
  • Versionizing: Sometimes you may don't want to share every single change to the weg directly. Notion publishs changes instantly. While this is most of the time a nice feature, sometimes you simply want to decide yourself when you publish something.
    • โ†’ With N2Web you decide when you update the app content.
  • Navigation & Logos: You wont be able to add more Links, a Logo and Buttons to the top-level Navigation of Notion.
    • โ†’ With N2Web you can set up a main Navigation and add a logo.

Why shouldn't I simply use the raw HTML-Export of Notion?

The HTML export is really well made, but it lacks on some features:

  • No Navigation
    • No back button
    • no breadcrumbs
  • no search function
  • no simple way to change the look-and-feel

How do I use Notion2Web?

  • Download the latest release.
  • Unzip the Archive
  • Go to your Notion page which you want to publish
  • Klick on "..."-Button in the top right corner
  • Select "Export"
  • Select "HTML" and "include subpages"
  • Unzip the downloaded Archive
  • Copy the contents of the unzipped Notion export into the "Contents" folder of the Notion2Web folder
  • Upload the whole Notion2Web folder to your Webserver (PHP has to be enabled on you server)
  • โ†’ thats it, the Notion export is now available on you website (when its root directory is pointing into uploaded folder)

Dokumentation & Demo

I've set up a more complete documentation as demo here: https://notion2web.lehmann.wtf/

Customization

Feel free to customize it. You'll find sophisticated informations in documentation.

Docker

You can run this software in Docker. I included Dockerfiles for Intel and ARM based chips. Also, there's a public Docker image https://hub.docker.com/r/vanderlars/notion2web. If you use this image, then you have to mount the folder with your Notion HTML export into /content.

You might also like...
Small library providing some functional programming tools for PHP, based on Rambda

Functional library for PHP. Features: set of useful functions helpful in functional programming all functions are automatically curried every array ca

Simple libary for functional programing paradigm with arrays.
Simple libary for functional programing paradigm with arrays.

rodrigodornelles/php-array-lib simple libary for functional programing paradigm with arrays Features Test driven development style (TDD) PHP version c

WARNING! This software is currently non-functional. - A system which makes installing Jexactyl far, far easier.
WARNING! This software is currently non-functional. - A system which makes installing Jexactyl far, far easier.

Jexactyl Assistant A system which makes installing Jexactyl far, far easier. WARNING ๐Ÿšง This software is currently in heavy alpha testing and WILL NOT

Sitepackage for TYPO3 CMS that adheres to the recommended standards, maps all conceivable functional areas and contains examples for common use cases.

TYPO3 CMS Sitepackage This sitepackage sticks as closely as possible to the recommended standard and maps all conceivable functional areas. There are

Generates a static website of metal music events in Leipzig

About EN: This projects generates a static website of metal music events in Leipzig (Ger). DE: Dieses Projekt erstellt einen Webkalender zu diversen M

Thirdweb-wp - A community WordPress plugin for thirdweb. Turn your WordPress website into Web3 instantly and easily with thirdweb. ๐Ÿ’ป๐ŸŒ

Thirdweb WP ๐Ÿ“ข Nominate (@WarenGonzaga) as GitHub Star. If you appreciate his hardwork and dedication to open source. A community WordPress plugin for

PHP Project - Export your profile to vCard file

KamVCard PHP v1.00 Easy to have your own vCard file, fill in the form and hit the "Export" button UPDATE : Now you can add your picture too ! Preview

The simplest way to create a dynamic sitemap for your self-coded website which you have made by using PHP/HTML/CSS/Js etc... Scripts.

Sitemap_index.xml The simplest way to create a dynamic sitemap for your self-coded website which you have made by using PHP/HTML/CSS/Js etc... Scripts

Online Food Delivery Website created using HTML, CSS, PHP and MySQL which delivers food at your doorstep on Cash-On-Delivery.

Food-Delivery-Website Online Food Delivery Website created using HTML, CSS, PHP and MySQL which delivers food at your doorstep on Cash-On-Delivery. Th

Comments
  • Use this for creating membership/payments/course

    Use this for creating membership/payments/course

    Hi,

    Superb job with this repo and doing this probably the simplest and easiest way possible. Thank you for that.

    I was wondering how

    a) Can we add payment gateway (e.g. pay to access the notion doc)? For an online course b) Can we deploy this to Hostinger?

    opened by pooriaarab 3
  • failed to open dir

    failed to open dir

    Hi Lars,

    Thanks for your nice project. I was trying to set it up on PHP docker and it looks fine I was just getting the noAccessMessage fine, but when I unlocked it I got the following:

    `


    Warning: scandir(content): failed to open dir: No such file or directory in /var/www/html/app/functions.php on line 69

    Warning: scandir(): (errno 2): No such file or directory in /var/www/html/app/functions.php on line 69

    Warning: Invalid argument supplied for foreach() in /var/www/html/app/functions.php on line 70

    Notice: Undefined offset: 1 in /var/www/html/index.php on line 86

    Notice: Trying to get property 'path' of non-object in /var/www/html/index.php on line 88

    Notice: Trying to get property 'fileName' of non-object in /var/www/html/index.php on line 88

    Fatal error: Uncaught TypeError: Argument 1 passed to str_contains() must be of the type string, null given, called in /var/www/html/app/functions.php on line 45 and defined in /var/www/html/app/functions.php:8 Stack trace: #0 /var/www/html/app/functions.php(45): str_contains(NULL, '.html') #1 /var/www/html/index.php(88): N2webFolderItem->__construct(NULL, NULL, 1, true) #2 {main} thrown in /var/www/html/app/functions.php on line 8
    `

    My content folder is inside the app folder. I have tried also to place it on the root but then I get the following:

    `


    Fatal error: Uncaught Error: Call to undefined function str_starts_with() in /var/www/html/app/functions.php:71 Stack trace: #0 /var/www/html/index.php(68): N2webFolderItem->__construct('content', 'content', 0) #1 {main} thrown in /var/www/html/app/functions.php on line 71
    `

    I hope this belongs here, it is my first time reporting an issue. Best regards

    opened by magotalora 0
  • error Attempt to read property

    error Attempt to read property "objectType" on null

    I made a full export of notion in html format, unpacked the archive on the server, launched it through docker docker run -d --name notion -p 127.0.0.1:88:80 -v /storage/notion:/var/www/html/content vanderlars/notion2web

    got an error at the beginning

    [Thu Apr 07 12:09:10.965203 2022] [proxy_fcgi:error] [pid 69:tid 140148406744832] [client 127.0.0.1:58942] AH01071: Got error 'PHP message: PHP Warning:  include(/var/www/html/app/functions.php): Failed to open stream: Permission denied in /var/www/html/index.php on line 8PHP message: PHP Warning:  include(): Failed opening 'app/functions.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/index.php on line 8PHP message: PHP Fatal error:  Uncaught Error: Class "N2webFolderItem" not found in /var/www/html/index.php:11\nStack trace:\n#0 {main}\n  thrown in /var/www/html/index.php on line 11'
    

    fixed app/functions.php file - chmod 644 app/functions.php

    check curl -I -XGET 127.0.0.1:88

    but now i get another error

    NOTICE: PHP message: PHP Warning:  Undefined array key 5 in /var/www/html/app/functions.php on line 234
    NOTICE: PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234
    NOTICE: PHP message: PHP Fatal error:  Uncaught  --> Smarty: unable to write file /var/www/html/app/smarty/compile/wrt624ed639549d59_81059506 <--
      thrown in /var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php on line 60
    [php-fpm:access] 127.0.0.1 -  07/Apr/2022:12:16:00 +0000 "GET /index.php" 500 /var/www/html/index.php 56644.495 512268 41.29%
    [Thu Apr 07 12:16:57.348323 2022] [proxy_fcgi:error] [pid 69:tid 140148373174016] [client 127.0.0.1:58962] AH01071: Got error 'Undefined array key 1 in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Undefined array key 32 in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Undefined array key 2 in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Undefined array key 1 in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Undefined array key 1 in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Undefined array key 1 in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Undefined array key 5 in /var/www/html/app/functions.php on line 234PHP message: PHP Warning:  Attempt to read property "objectType" on null in /var/www/html/app/functions.php on line 234PHP message: PHP Fatal error:  Uncaught  --> Smarty: unable to write file /var/www/html/app/smarty/compile/wrt624ed639549d59_81059506 <-- \n  thrown in /var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php on line 60'
    127.0.0.1 - - [07/Apr/2022:12:16:00 +0000] "GET / HTTP/1.1" 500 185 "-" "curl/7.64.0"
    

    Can you tell me how to fix it or am I doing something wrong?

    opened by luisgarcia1010 5
Releases(v1.2.1)
  • v1.2.1(Mar 22, 2022)

  • v1.2(Mar 20, 2022)

    In this release I add three new Feature:

    hide pages:

    You can now hide pages from the navigation. They will still appear in the pages it self, but will be excluded from the navigation. Look at the new setting $hide_from_navigation_with_prefix in the config.

    Hide number prefixes

    If you want to order your pages in the navigation you might use numbers as prefixes. With the new setting $remove_beginning_numbers you'll be able to remove them from the pages and the navigation.

    Restrict access to the page

    You can now exclude users from the page. There are several new options for that. It is no user-login feature, but its a simple way to control which user can see the contents and which not.

    Dokumentation updated: notion2web.lehmann.wtf

    Source code(tar.gz)
    Source code(zip)
  • v1.1(Feb 22, 2022)

    • The default themes of Notion2Web are now mobile friendly and responsive.
    • Fixed a small issue with external documents and links
    • Added a Dockerfile for Intel and for ARM chips, so that you can run N2Web on Docker, Docker-Swarm, Kubernetes and such
    Source code(tar.gz)
    Source code(zip)
  • v1.0(Feb 20, 2022)

    The first stable release:

    • Copy & paste a Notion export into /contents and it works right away
    • Navigation & breadcrumbs generation
    • search function which rates the search results
    • 4 simple themes
    Source code(tar.gz)
    Source code(zip)
Owner
Lars Lehmann
Co-Founder of Stadt.Land.Netz. I use Node.JS, PHP, Svelte, Bash, Kubernetes and Xojo.
Lars Lehmann
This is an experiment to export all RFCs from the PHP wiki into Git, including the change history for each RFC (along with the date and author of each change). This is not meant to replace the wiki.

PHP Requests for Comments (RFCs) About This repository is an experiment to export all RFCs from the PHP wiki into Git, including the change history fo

Ben Ramsey 34 Jun 20, 2022
A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2

Simple Import / Export tool A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2. Table data

EcomDev B.V. 51 Dec 5, 2022
Yclas Self Hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few seconds.

Yclas 4.4.0. Description Yclas self-hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few

Yclas 299 May 29, 2022
Talkino allows you to integrate multi social messengers and contact into your website and enable your users to contact you using multi social messengers' accounts.

Talkino Welcome to our GitHub Repository Talkino is a click to chat plugin to show your agentsโ€™ multiple social messengers, phone and emails on the ch

Traxconn 2 Sep 21, 2022
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.

Laravel Blog Have you worked with Wordpress? Developers call this package wordpress-like laravel blog. Give our package a Star to support us โญ ?? Inst

Binshops 279 Dec 28, 2022
Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics (functional) API that doesn't cause vendor lock-in.

Metrics Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics API that doesn't cau

Benjamin Eberlei 311 Nov 20, 2022
A collection of type-safe functional data structures

lamphpda A collection of type-safe functional data structures Aim The aim of this library is to provide a collection of functional data structures in

Marco Perone 99 Nov 11, 2022
A simple functional programming library for PHP

bingo-functional A simple functional programming library for PHP. Requirement(s) PHP 7 or higher Rationale PHP, a language not commonly associated wit

Lochemem Bruno Michael 52 Sep 28, 2022