All Projects → dragonman225 → Notablog

dragonman225 / Notablog

Licence: mit
Generate a minimalistic blog from a Notion table. [WIP]

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Notablog

Statiq.web
Statiq Web is a flexible static site generator written in .NET.
Stars: ✭ 1,358 (+667.23%)
Mutual labels:  blog, static-site-generator, blog-engine
Middleman Blog
Middleman : Blog Engine Extension
Stars: ✭ 317 (+79.1%)
Mutual labels:  blog, static-site-generator, blog-engine
Verless
A simple and lightweight Static Site Generator.
Stars: ✭ 276 (+55.93%)
Mutual labels:  blog, static-site-generator, blog-engine
Nim websitecreator
Nim fullstack website framework - deploy a website within minutes
Stars: ✭ 124 (-29.94%)
Mutual labels:  blog, blog-engine
Jekyll
🌐 Jekyll is a blog-aware static site generator in Ruby
Stars: ✭ 43,803 (+24647.46%)
Mutual labels:  static-site-generator, blog-engine
Plume
Federated blogging application, thanks to ActivityPub (now on https://git.joinplu.me/ — this is just a mirror)
Stars: ✭ 1,615 (+812.43%)
Mutual labels:  blog, blog-engine
Sunengine
SunEngine – site engine with blog, forum and articles sections features support.
Stars: ✭ 130 (-26.55%)
Mutual labels:  blog, blog-engine
Hyde
A Python Static Website Generator
Stars: ✭ 1,599 (+803.39%)
Mutual labels:  static-site-generator, blog-engine
Dropplets
Welcome to an easier way to blog - A minimalist markdown blogging platform.
Stars: ✭ 1,616 (+812.99%)
Mutual labels:  blog, blog-engine
Sciblog
A blog made with django designed like a scientific paper written in Latex.
Stars: ✭ 145 (-18.08%)
Mutual labels:  blog, blog-engine
Eleventy Starter Boilerplate
🚀 Eleventy Starter is production-ready with SEO-friendly for quickly starting a blog. ⚡ Built with Eleventy, ESLint, Prettier, Webpack, PostCSS, Tailwind CSS and Netlify CMS (optional).
Stars: ✭ 139 (-21.47%)
Mutual labels:  blog, static-site-generator
Blog
My Blog & Blog System
Stars: ✭ 148 (-16.38%)
Mutual labels:  blog, blog-engine
Tableless
O site do Tableless em Hugo. Mais leve, impossível.
Stars: ✭ 107 (-39.55%)
Mutual labels:  blog, static-site-generator
Weblorg
Static Site Generator for Emacs
Stars: ✭ 103 (-41.81%)
Mutual labels:  blog, static-site-generator
Sio.core
✔ [ SIOC ] Swastika I/O Core is an all in one platform (e.g CMS, eCommerce, Forum, Q&A, CRM...) ASP.NET Core / Dotnet Core System based on SIOH Framework.
Stars: ✭ 121 (-31.64%)
Mutual labels:  blog, blog-engine
Nabo
Nabo (納博) - dead simple blog engine
Stars: ✭ 103 (-41.81%)
Mutual labels:  blog, blog-engine
Blogotext
A little more than a lightweight SQLite Blog-Engine.
Stars: ✭ 129 (-27.12%)
Mutual labels:  blog, blog-engine
Serendipity
A PHP blog software
Stars: ✭ 151 (-14.69%)
Mutual labels:  blog, blog-engine
Ryosuke Gatsby Blog
Static PWA React-powered portfolio and blog built with GatsbyJS
Stars: ✭ 90 (-49.15%)
Mutual labels:  blog, static-site-generator
Elastiquill
Modern blog engine running on Elasticsearch
Stars: ✭ 98 (-44.63%)
Mutual labels:  blog, blog-engine

Notablog

version license

Generate a minimalistic blog from a Notion.so table.

Below are some screenshots of my blog. 🙂

Mobile Desktop
Management Interface on Notion.so

🚧 This is under construction, there may be breaking changes often ! 🚧

Table of Contents

Getting Started

Make sure you have Node.js v12.0.0 or higher. Check with command node -v.

For existing users who want to upgrade from v0.3.x, please go through all below steps (do a clean install), except that you can continue to use your Notion table.

  1. Install Notablog.

    npm i -g notablog
    
  2. Clone the notablog-starter repository.

    git clone https://github.com/dragonman225/notablog-starter.git
    
  3. Duplicate this Notion table template.

  4. Make the table you've duplicated public and copy its URL for the next step.

  5. Go into notablog-starter/ directory, open config.json. Replace the value of url with the URL of the table you've duplicated.

  6. Inside notablog-starter/ directory, run command:

    notablog generate .
    
  7. After it finishes, go to notablog-starter/public/ directory, open index.html with a browser to preview your site.

  • Optionally, you could change the previewBrowser field in config.json to the path of a browser executable you have on your computer and issue the following command anywhere to preview.

    notablog preview <path_to_the_notablog-starter>
    

Congratulations! Your website is ready now!

  • You can copy files in notablog-starter/public/ directory to a server or upload them to any static hosting service to share your content with the world.

  • Whenever you want to update your site, go into notablog-starter/ directory and issue command notablog generate ., or issue the command from outside notablog-starter/ with the pattern notablog generate <path_to_the_notablog-starter>.

  • Some options for static hosting services:

  • Some options for self-hosting:

Blog Management Interface

This is the documentation of Notion table template

Column Name Property Type Description
title Title The page title.
tags Multi-Select Topics related to the page.
publish Checkbox Determine if a page should be rendered.
inMenu Checkbox Determine if a page should appear in the navigation bar.
inList Checkbox Determine if a page should appear in the article list.
template Select Specify which template to use for the page. Available template names depend on the theme you use.
url Text A string to be used as the filename and the URL of the generated page. It should not contain / and \. If it's empty, the id of the page is used.
description Text Short intro of the page. Styles are working.
date Date User customizable date, convenient for importing posts from other platforms or adjusting the order of posts.
  • Hack: Check publish but leave inMenu and inList unchecked to make a page seem like hidden because people can only view it when they know its URL.

API Reference (Outdated)

Introduction

notablog itself is designed to be installed as a dependency, and invoked from NPM script. This way we can separate application code and user assets so that it's less confusing for a user. To make things even more simple, I have prepared notablog-starter, so a user doesn't have to setup folder structure manually. The concept is inspired by a popular project hexo.

With the design, a user only sees notablog-starter when using, therefore the following documentation will be in the context of notablog-starter.

Simplified Folder Structure

notablog-starter
├── config.json
├── public
├── source
│   └── notion_cache
└── themes
    └── pure
  • config.json - Site config.

    Field Type Description
    url string The URL of a Notion table compatible with Notablog.
    theme string The theme to use. It should be one of the folder names in themes/.
  • public/ - Contains generated static assets of the blog.

  • source/notion_cache/ - Cached JSON files of Notion pages. They are used when a user runs npm run generate, if a page contains no changes, the generator reads data from these cached files.

  • themes/ - Store themes.

Theme

A theme contains layout templates, CSS files, fonts, and other assets that shapes the style and look of a blog.

Folder Structure

<name>
├── layout
└── assets
  • <name> - Theme folder name, also the name to be used in notablog-starter/config.json.
  • layout/ - Contains page templates. It is required to have at least one index layout (index.html) and one post layout (post.html). You can have more templates, and a user can use those bonus templates by specifying the template's filename in template field on Notion.
  • assets/ - Other assets. Anything in this folder will be copied to notablog-starter/public/ when running npm run generate.

Template Language

  • Currently, I use Squirrelly.js as template engine.

  • Template index.html gets the following structure of data :

    {
      	siteMeta {
      		icon // Emoji or URL
      		iconHTML // Rendered HTML
      		cover // URL
      		title // String
      		description // Raw array, do not use
      		descriptionPlain // Rendered plain text, no style
      		descriptionHTML // Rendered HTML, with style
      		pages { // An array of page
      			id // Notion's page id
      			icon // Emoji or URL
      			iconHTML // Rendered HTML
      			cover // URL
      			title // String
      			tags // An array, [{ color: string, value: string }]
      			publish // Boolean, `true` if publish is checked.
      			inMenu // Boolean, `true` if inMenu is checked.
      			inList // Boolean, `true` if inList is checked.
      			template // Template name
      			url // URL of the page relative to site root
      			description // Raw array, do not use
      			descriptionPlain // Rendered plain text, no style
      			descriptionHTML // Rendered HTML, with style
      			date // Raw string, e.g. 2019-08-09
      			dateString // Formatted, e.g. Fri, Aug 9, 2019
      			createdTime // Unix timestamp
      			lastEditedTime // Unix timestamp
      		}
      	}
    }
    
  • Template post.html or others gets the following structure of data :

    {
      	siteMeta // The same as "siteMeta" in index.html
      	post {
      		...post // All properties of a page in "siteMeta.pages"
      		contentHTML // HTML of post body
      	}
    }
    

It is highly recommended to take a look at notablog-theme-pure if you want to make your own !

Notes

Code Structure

Generated by dependency-cruiser NPM package.

Project Status

See https://dragonman225.js.org/notablog-stat.html

Git

master is the working branch, latest release is v0.4.1, which is at branch v0.4.1.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].