Change Cover
Reposition
🚀
Static Motion
Make your static site from Notion.so with the help of Netlify and Travis CI.
Installation
How do I install this… No! You do not need to install it on your machine.
All you need is a Github account.
Get Started
1.
Fork this project.
2.
Turn on Travis CI for your forked repository.
3.
Get your access token at Netlify and set the following environment variables on Travis CI's setting page:
ACCESS_TOKEN: fill your Netlify access token.
(Remember to secure it!)
SITE_ID: The "API ID" of your Netlify site.
index: The URL of your index page on Notion.so.
title_sep: Your title separator. No space around!
description: Your site description. "Remember to quote your string!"
base_url: Your site URL.
twitter: Your twitter ID. Declare an empty string if you do not want it.
build_mobile: Will build a mobile version of your entire site at /m/ if this option present.
apple_touch_icon: the URL of your apple-touch-icon.png hosted externally.
favicon: the URL of your favicon.ico hosted externally.
anchor: Enable anchor detection if this option presents. All urls starts with https://www.notion.so with # somewhere in the url will be rewritten to your relative path.
4.
Bang! Wait a few minutes and your site will be up!
5.
Wanna have Google Analytics and Disqus? Check out our configuration page!
Updating Your Site
You can set up cron jobs in your Travis CI project. However, if you wish to update your site immediately, please manually rebuild your project in Travis CI.
⚠️ Committing directly to your Github repository to trigger Travis CI rebuild is highly discouraged.
Upgrading Your Static Motion
Simply merge this repository with your repository.
Debugging
As Notion.so makes changes to their templates, Static Motion may break at any time.
Before you go, make sure you have:
Python 3.6,
the latest Google Chrome,
a working chromedriver.
Once you are ready, clone this repo and cd into it. Install the dependency:
pip install -r requirements.txt
Shell
Then run the static site generator.
python motion.py
Shell
❤️ Send a pull request if you think you fixed the problem!
Known Issues
Embedded elements might not work.
Embedded tweets are not working.
Fonts in code blocks may flicker slightly.
Pages with the same base url but with different hash cannot coexist in the same site.
Toggles might not work
Proudly built with Notion.so and 🚀 Static Motion.