Git Product home page Git Product logo

scout-tosi-dot-com's Introduction

AgencyKit-11ty-Starter

Leverage the combined efficiency and power of 11ty as your SSG and Notion-as-a-CMS, powered by NotionCMS.

Define all of your website routes in your Notion database structure as you add content.

So this structure:

NotionCMS database structure automatically defines your site's routes

generates these routes:

[
  '/about',
  '/team',
  '/team/jacob',
  '/team/mordecai',
  '/pricing',
  '/posts',
  '/posts/how-to-use-notion-cms',
  '/posts/how-to-build-a-blog-with-notion'
]

Each of these paths automatically generate a page with the content on it in 11ty.

If the path has children, e.g. team and posts here, that path automatically generates a collection with the child pages in it. So the team collection will have jacob and mordecai pages and the post collection will have the posts.

This holds for any number of levels and is extremely powerful when it comes to building large website hierarchies and using the data in your collection however you need. Oh, did I mention that this happens automatically with no config?

No configuration besides setting 2 variables in .env is required to get started, but this is also a great jumping off point for more advanced workflows using NotionCMS plugins and custom 11ty templating and pagination.

Usage

  1. Install the packages. npm install (or equivalent).

  2. Set up your Notion database ID and API key in .env.

    NOTION_API=your_secret_here
    NOTION_DB_ID=your_db_id_here
    

    If you've never used Notion API before, you have to set up an integration and get an API key (steps here).

    Then you have to set up a NotionCMS-compatible database to hold your content (you can copy this one to start) and get to writing.

    Don't forget to set draftMode true if you haven't published anything. See full list of NotionCMS options here.

  3. Run 11ty. npm run serve

Features

  • Build large sites from Notion data with a single command
  • Automatic collections straight from Notion
  • All (non-draft) pages in Notion built by default thanks to 11ty pagination
  • Tag based collections [coming soon]
  • Very fast builds thanks to NotionCMS caching
  • Notion image caching
  • Supercharged SEO thanks to NotionCMS SEO core plugin and extendable to your exact SEO needs. Plus, if you're using 11ty for SSG, you're ahead of the pack already!

This is just an overview of why 11ty + NotionCMS is so powerful.

For full list of 11ty features:

11ty

NotionCMS

Minimal styling thanks to modern normalize and Sakura.

scout-tosi-dot-com's People

Contributors

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