Code Monkey home page Code Monkey logo

static-motion's Introduction

πŸš€ Static Motion [DISCONTINUED]

Make your static site from Notion.so with the help of Netlify and Travis CI.

Build Status

Demo:

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: See conf.py for example.
    • 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 presents.
    • 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 starting 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. Want to have Google Analytics and Disqus? See customization.

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 make changes to their template, this utility 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

Then run the static site generator.

python motion.py

Known Issue

  • 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.

static-motion's People

Contributors

alanzchen avatar rowankid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.