jcity / builderio-nextjs-isr-seo-starter

This is a basic setup for using Builder.io with NextJS with ISR capabilities and some SEO improvements, like Robots.txt files and Sitemaps

Home Page:https://metalkenron.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Builder.IO & NextJs starter with ISR & SEO optimization

This project aims to be an starting project for every initiative around Builder.io and Next.js that requires ISR capabilities and SEO optimizations like having a dynamic sitemap.xml and few other tricks.

If you want to see a Live site using this starter go to Kenzilab.com

Features

  • Typescript support ❤️
  • ISR for every Page generated.
  • Sitemap.xml generated in SSR connected with Builder.io
  • NextSeo package added.
  • Robots.txt
  • Perfect Lighthouse Score 100 / 100 / 100 / 100 by default.

Initial setup

  • Clone this repo
  • Run npm i command
  • Create your environment variables file. Create a .env file in the root with the following values.
    • NEXT_PUBLIC_BUILDER_PUBLIC_KEY - This is obtained through the Builder.io admin panel.
    • REVALIDATE_SECRET - This is a custom generated key for granting access to the revalidate endpoint. Use your favorite password generator or use your own one.
  • Go to Builder.io and create the first page (https://www.builder.io/c/docs/create-page)
  • Enable Builder.io Webhook for pages (https://www.builder.io/c/docs/webhooks) make sure you point it to /api/revalidate?secret={REVALIDATE_SECRET}
  • Adjust the values you want to use for SEO. You can edit them in /src/config/seo

Starting the server (Locally)

It is as easy as running npm run dev and open a web browser in http://localhost:3000

Deploy on Vercel

I recommend use Vercel. This repo also has Vercel Analytics npm dependency so it is included out of the box.

Deploy with Vercel

You will have to configure the environment variables in the admin panel. Name them as they are in the .env file.

Deploy elsewhere

I refer you to official NextJs documentation (https://nextjs.org/docs/deployment)

Although there are many choices out there I recommend explore Cloudflare Pages. It is easy, powerful, costless and very straight forward.

Websites using this project

If you want to list here your project you can open a PR with your url.

About

This is a basic setup for using Builder.io with NextJS with ISR capabilities and some SEO improvements, like Robots.txt files and Sitemaps

https://metalkenron.vercel.app

License:GNU General Public License v3.0


Languages

Language:TypeScript 98.2%Language:JavaScript 1.8%