Git Product home page Git Product logo

the-publisher-framework's Introduction

Blion is a blog template that uses NextJS as a front-end and Notion as its CMS via the official API. This is also the repository for my blog twan.dev, so you can check it out running in production.

Getting Started

Please reference this article written by the author if you want to get started quickly. It contains the Notion database template link and the required steps to get up and running with your blog.

First, run the development server:

npm run dev
# or
yarn dev

Second, update the values inside of the site.config.js file to customize your blog.

Open http://localhost:3000 with your browser to see the result.

Image support

The official Notion API doesn't support images yet, and this is why we coded our own solution. You can alter the postImageSource to include the domains you want to use for inline images.

How to work with the image support?

  1. Paste the URL of the image as a separate line inside of your Notion document.
  2. For example, if we have the following URL https://images.unsplash.com/photo-1580927752452-89d86da3fa0a?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80, make sure that you add the images.unsplash.com domain to the site.config.js postImageSource like ['images.unsplash.com'].
...
/*
Currently, it's not possible to fetch the images from the notion API.
So until then, you can make use of the postImageSource.

If you add this url as a link to your post, it will always get rendered as an image.
*/
postImageSource: [
    'res.cloudinary.com',
    'dl.dropboxusercontent.com',
    // add the domain here
    'images.unsplash.com',
],

Now all URLs that match the domains inside of postImageSource will get rendered as an image.

the-publisher-framework's People

Contributors

dependabot[bot] avatar sven10hove avatar twankruiswijk 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.