Giter VIP home page Giter VIP logo

nextjs-notion-blog-starter's Introduction

A preview of my revamped blogfolio

Nextjs Notion Blog Starter

  • Default demo - Deployed from main branch
  • Blog setup - I wrote an article on how to use this starter to start your blog

✨ Features

  • ✅ Setup takes only a few minutes (single file config) 💪

  • ✅ Newsletter subscription via Convertkit API

  • ✅ Simple analytics with Umami

  • ✅ Automatic OG social images with Tailwind template

  • ✅ Automatic pretty URLs

  • ✅ Excellent page speed

  • ✅ Optimized for Next.js and Vercel

🛠 Build with

📕 Project Overview

  • layouts/* - The different layouts used on each page.
  • components/* - Components used throughout the site.
  • components/blocks/* - Custom blocks made for Notion rendering.
  • utils/* - Short for "utilities", a collection of helpful utilities or code for external services.
  • pages/api/* - API routes powering /og-image dynamic OG image and /subscribe-convertkit newsletter subscription.
  • pages/blog/* - Static pre-rendered blog pages that fetch information from the Notion API.
  • pages/* - All other static pages.
  • public/* - Static assets including images, fonts, and videos.
  • styles/* - global styles and Tailwind.
  • siteData.ts - a simple file containing global data about the site.

🏃‍♂️ Running Locally

git clone https://github.com/tuanphungcz/nextjs-notion-blog-starter
cd nextjs-notion-blog-starter
pnpm install
pnpm run dev

Create a .env file similar to .env.example and include the appropriate keys.

🚀 Deploy to vercel

Deploy with Vercel

NOTION_SECRET=
BLOG_DATABASE_ID=

# ConvertKit is optional
NEXT_PUBLIC_CONVERTKIT_FORM_ID=
NEXT_PUBLIC_CONVERTKIT_API_KEY=

# Umami is optional
NEXT_PUBLIC_UMAMI_ID=
NEXT_PUBLIC_UMAMI_URL=

💁‍♀️ How to use

  • Blog setup - I wrote an article on how to use this starter to start your blog

📝 Credit & inspiration

This blog starter was inspired by all of these awesome open-sources

nextjs-notion-blog-starter's People

Contributors

tuanphungcz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nextjs-notion-blog-starter's Issues

Image not Render

I want to make some of the blog post with Image in it. Like Step By step Tutorial type of content. I found that image not showing up in the blog post after I publish . I am using Blog Starter Template( older version ). Is there any way to fix? Thank you.

Issues with Incremental Static Regeneration (ISR) Not Triggering as Expected on Vercel

Issue Description

We are experiencing issues with the Incremental Static Regeneration (ISR) feature in our Next.js application hosted on Vercel. Despite setting the revalidate option in getStaticProps, the pages do not seem to be regenerating at the specified intervals.

Details

  • Framework: Next.js
  • Hosting: Vercel
  • Function: getStaticProps with revalidate set to 600 seconds (10 minutes)
  • Expected Behavior: The pages should regenerate every 10 minutes when accessed after the set interval.
  • Current Behavior: Pages remain static and do not update as expected, even when accessed after the 10-minute interval.

Steps to Reproduce

  1. Set up a Next.js application with getStaticProps implemented.
  2. Deploy the application to Vercel.
  3. Access the page to trigger the initial static generation.
  4. Modify the source content (e.g., update data in a CMS or database).
  5. Access the page after the revalidate period has elapsed.
  6. Observe that the changes are not reflected in the regenerated page.

Additional Information

  • No errors are shown in the Vercel function logs.
  • Environment variables and API keys are correctly configured.
  • The issue persists across multiple deployments and even after clearing the cache.

Expected Resolution

  • Clarification on whether there is a known issue with ISR on Vercel that might be affecting this functionality.
  • Any potential workarounds or settings that might need to be adjusted to ensure that ISR works as expected.
  • Assistance in debugging this issue to determine if the configuration might be incorrect or if there are other underlying problems.

Conclusion
This issue is critical as it affects the dynamic nature of our site, which relies on timely content updates. We appreciate any guidance or support that can be provided to resolve this issue promptly.

Vercel deployment

I'm looking forward to setting this up as my open notebook deployed on vercel.
For that I would need to hide keep my secrets locally while also having them on vercel.
This doesn't seem to be explained in the docs.

You should be able to set up a Deploy button
https://vercel.com/docs/deploy-button
with the correct API keys field and get a super simple deployment setup for new users

I've went ahead and made a deploy button already :
Deploy with Vercel

I would recommend you include it in the readme along with the "Run locally" section. I would open a PR but I'm on mobile at the moment

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.