11ty starter: uses md and notion as data sources

Overview

eleventy_notion_starter

11ty starter: uses md and notion as data sources. Based on https://github.com/siakaramalegos/11ty-sia-blog.

Used to power http://geekosaur.com.

General Info / Getting Started

This uses md files + notion as CMS. Besides blog posts, it also uses notion for "notes" and "books". Note that the default field for DBs on notion is Name, and I renamed it to Title in all DBs, since I think it makes more sense. For all databases, you need to share them with the API user that is created when you get API access.

Images: Any pictures will be optimized. External images (like IMGUR) are going to be downloaded and versioned if you run build:local. Notion images not. Reason: every time you fetch the page, Notion will provide a new link, that is only live for 1 hour, and I don't wanna mess with that now and risk versioning duplicates. Since they are on Notion, I consider them saved. IMGUR is download to avoid the risk of it being deleted.

Also, if you use (blur) some text as the image caption, it will use the blur shortcode instead of the regular figure shortcode.

Links/Embeds/Shortcodes: Addind a link as bookmark or embed is going to use the anyEmbed shortcode. That will use the appropriate embed for youtube, twitter, etc, and the unfurl shortcode if there's nothing specific for that domain.

Regular posts

For regular posts, create a database like this

Description: used for twitter card/social sharing.

Lead: post lead, appears under the title.

Published + Date published: post is published if published is true and current date is > date published - so you can schedule posts.

Thumbnail: used for twitter card/social sharing.

Tweet/Reddit: If 'tweet' url (full url) is present, it changes the footer of the post, with a link to it. You can update your footer to also include Reddit (this is a TODO on the post template for me)

Notes: notes for you. Not used on the actual blog.

Notes

Notes I use for short posts, and they are rendered in it's entirety on the "Notes" page. They are automatically published - no draft status or future date. The url is Notion's page ID. See it live here: https://geekosaur.com/notes/. The reason: this is similar to a Tweet, but that I don't want to lose, and also want the ability to tag, so I can find it later on. Not supposed to be a long post, just a quick share.

Create a database like that:

Created and Edited are fields controlled by Notion - you just need to add them from the list.

Embed: used for the anyEmbed shortcode;

Images: will post the images, and use the first as thumbnail - TODO is to actually generate a gallery with the images.

Format: not used yet. Defaults to text. Idea would be so have filters, and icons to identify the type of post (text/video/gallery), like Tumblr.

Tags/Tweet/Reddit: same as for posts.

Books

Books is a page with all books read, separated by year. See it live here: https://geekosaur.com/books-per-year/

For me, I export data from Goodreads, and then have a script to update my Notion Database. I do that for 2 reasons: being able to export to the blog; being able to have my own notes and extra data, and reorganize how I see fit.

Fields you need: Title, Status (should be read for finished books), Type (should be book), Date Read, My Rating, Link, Review. Link is the Goodreads URL, and Review is a link to your own review. Type I use because I also track manga and comics, and I don't want them to show on the same page.

Files

  • _11ty: contains filters and shortcodes;
  • _cache: cached images (external images), posts, webmentions and books. For now, I've disabled cache for posts and notes because of the 'image' thing mentioned above. Other than that, npm start always uses the cached version, npm run build:local will update them, npm run build (prod build) will get new info but not update cache files
  • _data: files for the external data. Go there to add your Notion Database IDs, and make any changes you'd like. Also your webmention token from Webmention.io
    • To use webmentions for twitter/reddit/mastodon, go to webmention.io and https://brid.gy/
    • Also update metadata.json with your info
    • Note: There's a method used by notion_posts and notes to search Reddit and update Notion with the URL. They are automatically published by IFTTT. I need to make it work for Twitter too, but need some time to get to it. (Feel free to open a PR if you wanna add Twitter API support for getting the tweet url)
  • _includes: layouts, etc

Other Notes

  • There are things I'm still slowly improving, but feel free to open an issue to discuss improvements or a PR to fix any issues you find :). I'll update this starter occasionally as I make changes on my own blog.

Learning Resources

Still new to Eleventy? Try out these learning resources:

Also, get familiar with the 11ty docs!

Once you understand the fundamentals a bit more, dive into data with Architecting data in Eleventy. Then you can start building some more complex features like:

You might also like...

Node starter kit for semantic-search. Uses Mighty Inference Server with Qdrant vector search.

Node starter kit for semantic-search.  Uses Mighty Inference Server with Qdrant vector search.

Mighty Starter This project provides a complete and working semantic search application, using Mighty Inference Server, Qdrant Vector Search, and an e

Oct 18, 2022

NFT Game Starter Project: https://github.com/buildspace/buildspace-nft-game-starter

Running React on Repl.it React is a popular JavaScript library for building user interfaces. Vite is a blazing fast frontend build tool that includes

Feb 11, 2022

Starter-gatsby-blog - Gatsby starter for a Contentful project from the community.

Starter-gatsby-blog - Gatsby starter for a Contentful project from the community.

Contentful Gatsby Starter Blog Create a Gatsby blog powered by Contentful. Static sites are scalable, secure and have very little required maintenance

Jan 29, 2022

Node-cli-starter - Basic starter kit for building Node CLI applications with TypeScript.

node-cli-starter Minimal starter kit for building Node CLI applications with TypeScript. Getting Started To get started clone repo locally and run npm

May 17, 2022

GitHub starter project link: https://github.com/buildspace/waveportal-starter-project

Running React on Repl.it React is a popular JavaScript library for building user interfaces. Vite is a blazing fast frontend build tool that includes

Jun 5, 2022

There can be more than Notion and Miro. Affine is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

There can be more than Notion and Miro. Affine is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

AFFiNE.PRO The Next-Gen Knowledge Base to Replace Notion & Miro. Planning, Sorting and Creating all Together. Open-source, Privacy-First, and Free to

Jan 9, 2023

Download Notion pages as markdown and image files, preserving hierarchy and enabling workflow properties. Works with Docusaurus.

Download Notion pages as markdown and image files, preserving hierarchy and enabling workflow properties. Works with Docusaurus.

notion-pull notion-pull lets you use Notion as your editor for markdown-based static site generators like Docusaurus. Using Notion instead of raw mark

Jan 7, 2023

A minimal norui portfolio example built with NextJS and powered by Notion 🚀.

A minimal norui portfolio example built with NextJS and powered by Notion 🚀.

Minimal Norui A minimal norui portfolio example built with NextJS and powered by Notion 🚀 . Links Demo Site Documentation Minimal Norui Notion Databa

Nov 13, 2022

A CLI to write journal for you and save it to a Notion database!

A CLI to write journal for you and save it to a Notion database!

Journal CLI NPM Link A CLI to write journal for you and save it to a Notion database! Demo Installation Run npm i -g journal-notion-cli to install the

Oct 7, 2022
Owner
Thiago Margarida
Thiago Margarida
Python based web application to import, connect and analyze manufacturing data from multiple data sources.

Analysis Platform Analysis Platform is an open source web application to import, connect and visualize factory IoT data. It helps to collect, link and

Analysis Platform +DN7 7 Dec 1, 2022
A set of connectors to describe, parse and process the data sources provided by websites and social networks

HUDI-PACKAGE-CONNECTORS What is this repository for? A set of connectors to describe, parse and process the data sources provided by websites and soci

HUDI 8 Aug 5, 2022
Script to synchronize between a Notion database and Google Calendar both ways. Uses Google App Script.

Yet Another Two Way Notion-Google Calendar Sync Script A script to sync events between Google calendar and a Notion database. Features! Google App Scr

kat 41 Jan 7, 2023
Notion-powered blog starter with Nextjs and Tailwind

Nextjs Notion Blog Starter Default demo - Deployed from main branch Blog setup - I wrote an article on how to use this starter to start your blog My p

Tuan Phung 94 Dec 29, 2022
Notion-powered blog starter with Nextjs and Tailwind

Nextjs Notion Blog Starter Default demo - Deployed from main branch Blog setup - I wrote an article on how to use this starter to start your blog My p

Tuan Phung 63 Oct 11, 2022
Minimal, SEO-focused website starter kit powered by Notion, GitHub, and Vercel.

wr8 wr8 lets you create a website in Notion with better SEO. It is a customized version of nextjs-notion-starter-kit, based on NotionX. Introduction T

Verfasor 7 Dec 22, 2022
In this project, I built a simple HTML list of To-Do tasks. Using webpack to bundle JS functionality and other sources.

To-do-list App A simple To-do-list app using DOM manipulation. Built With HTML/CSS JavaScript Webpack Jest Live Demo Live Demo Getting Started Get a c

Andy Menutti 10 Nov 5, 2022
typescript-to-jsonschema generates JSON Schema files from your Typescript sources.

fast-typescript-to-jsonschema English | įŽ€äŊ“中文 a tool generate json schema from typescript. Feature compile Typescript to get all type information conve

yunfly 21 Nov 28, 2022
Here are the sources for the wdi5 workshop at UI5con 2022.

wdi5 workshop at UI5con 2022 Here are the sources for the wdi5 workshop at UI5con 2022. prerequisites please have this installed on your 'puter: Node

UI5 Community 6 Oct 19, 2022
A starter template that uses Phaser 3, TypeScript, Electron and Rollup and Vite for bundling.

Phaser TypeScript Electron starter template This is a ??ī¸ Phaser 3 starter with ⌨ī¸ TypeScript and ⚛ī¸ Electron, ?? Rollup and Vite. ?? ?? HOT RELOAD ON

null 11 Nov 25, 2022