Skip to content

Setup & Configuration

Feng Kaiyu edited this page May 22, 2022 · 9 revisions

Minimal Setup

Please note that Nexon is compatible with Starter Kit.

It would be a good start to read Starter Kit's README first (Instead of Starter Kit, just fork from this repo).

  1. Fork/clone this repo
  2. Change a few values in site.config.ts
  3. yarn install
  4. yarn dev to test locally (optional)
  5. yarn deploy to deploy to Vercel

If you deploy this template manually to Vercel, then you can skip steps 3-5.

Keep Updated

Sync from the Nexon's main branch from time to time (or set up an auto pull action).

Optional Settings

In this section, the wiki will explain to you every optional config and the way to use them.

Google Analytics Support

Just set NEXT_PUBLIC_GA_ID in your Vercel settings.

Giscus Comment Support

  1. Take a few minutes to walk through this configuration helper
  2. Copy the fields generated into site.config.ts.

Override CreatedTime / LastEditedTime

Let's say you use the property Publish to indicate when the post is published. Maybe because you imported some posts from your old blog so metadata on the Notion page won't reflect to real publish date anymore. Or you just want to have full control.

However, when generating an RSS feed, the system will default use metadata on the Notion page. So you can override it by specifying OverrideCreatedTime: "Publish" in site.config.ts.

How to change the number of columns on the gallery view? #17

The max number of columns of gallery view is defined in notion.css:

@media (min-width: 640px) {
  .notion-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(calc(720px / $NUMBER), 1fr)); /* $NUMBER = [1, 2, 3, 4 ...] */
  }
}

$NUMBER indicates the number of columns. You may change the number you want.