0001 How I build this

Posted on Thu, Oct 14, 2021 notablog

shut up to

Alexander's Garden

Being an adventurer at the frontiers of tools for thought.

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.

Congratulations! Your website is ready now!

Blog Management Interface

This is the documentation of Notion table template

Untitled

Column NameProperty TypeDescription
titleTitleThe page title.
tagsMulti-SelectTopics related to the page.
publishCheckboxDetermine if a page should be rendered.
inMenuCheckboxDetermine if a page should appear in the navigation bar.
inListCheckboxDetermine if a page should appear in the article list.
templateSelectSpecify which template to use for the page. Available template names depend on the theme you use.
urlTextA 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.
descriptionTextShort intro of the page. Styles are working.
dateDateUser customizable date, convenient for importing posts from other platforms or adjusting the order of posts.

API Reference

Introduction

Notablog is a command-line tool that works on a notablog-starter to generate sites. notablog-starter contains user config and customizable themes, and is used to store cached data and generated site. The design is inspired by hexo, a popular static site generator.

Folder Structure of notablog-starter

notablog-starter ├── config.json ├── public ├── cache └── themes ├── pure └── pure-ejs

Theme

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

Folder Structure

<name> ├── layouts ├── assets └── manifest.json

Template Language

It is highly recommended to take a look at the default theme "pure-ejs" if you want to make your own!