Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

notablog

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notablog

Generate a minimal blog from Notion.so.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
684
increased by2.86%
Maintainers
1
Weekly downloads
 
Created
Source

notablog

Generate a minimal blog from Notion.so.

:construction: This is under construction, there may be breaking changes every day! :construction:

Getting Started

  1. Duplicate my BlogTable template on Notion.
  2. Make the table you've duplicated public.
  3. Clone the notablog-starter repository and install packages.
    git clone https://github.com/dragonman225/notablog-starter.git
    cd notablog-starter && npm install
    
  4. Open config.json. Change url field to the URL of the table you've duplicated.
  5. Issue command npm run generate. Generated static assets are in public folder. You can move that folder to your hosting location.

Customize the Blog

Below folder paths are relative to the notablog-starter you have cloned.

  • To edit CSS styles, look for files in public/css. (Notice : This folder may be moved in the future.)

  • To edit layouts, look for files in layout. These are Squirrelly templates.

    • Variables a user can use in index.html template :

      GraphQL-style overview :

      {
        siteMetadata {
          title
        }
        index {
          posts {
            pageID
            title
            tags {
              value
              color
            }
            icon
            description
            createdTime
            lastEditedTime
          }
        }
      }
      

      Details :

      PropertyTypeDescription
      siteMetadata.titlestringTitle of the blog.
      index.postsPost[]Post metadata array.

      A Post object :

      PropertyTypeDescription
      pageIDstringNotion's page ID. Used as the file name of a post.
      titlestringTitle of a post.
      tagsTag[]Tags of a post.
      iconstringIcon of a post.
      descriptionstringDescription of a post. This is a HTML string since Notion support styles here.
      createdTimestringCreated date of the post in YYYY.MM.DD format.

      A Tag object :

      PropertyTypeDescription
      valuestringName of the tag.
      colorstringColor of the tag with prefix tag-. e.g. tag-green, tag-red.
    • Variables a user can use in post.html template :

      GraphQL-style overview :

      {
        siteMetadata {
          title
        }
        post {
          pageID
          title
          tags {
            value
            color
          }
          icon
          description
          createdTime
          lastEditedTime
        }
        content
      }
      

      Details :

      PropertyTypeDescription
      siteMetadata.titlestringTitle of the blog.
      postPostSee above Post object.
      contentstringHTML string of the page, including title.

Keywords

FAQs

Package last updated on 27 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc