• Stars
    star
    404
  • Rank 106,897 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A customizable Next.js and Tailwind blog starter. Designed by the Bejamas agency.

Netlify Next.js Blog Template designed by Bejamas

Deploy to Netlify Button

A customizable blog starter using:

  • Next.js v12
  • Tailwind v3.0
  • Built-in MDX v1 support
  • Includes modern design with dark & light themes

Preview of blog theme. Author named Jay Doe and blog's name is "Next.js Blog Theme" with one blog post

Take a gander at the demo.

Click here to watch the template walkthrough!

Table of Contents:

Getting Started


You can get started with this project in two ways: locally or using the setup wizard.

Setting Up Locally

If you're doing it locally, start with clicking the use this template button on GitHub. This will create a new repository with this template's files on your GitHub account. Once that is done, clone your new repository and navigate to it in your terminal.

From there, you can install the project's dependencies by running:

yarn install

Finally, you can run your project locally with:

yarn run dev

Open your browser and visit http://localhost:3000, your project should be running!

Using the Setup Wizard

Preview of Setup Wizard showing the initial page of a setup form

Through the setup wizard, you can create your blog in a few clicks and deploy to Netlify.

Configuring the blog

The config is based on environment variables to make it easy to integrate with any Jamstack platform, like Netlify.

Here are the variables you can edit:

Variable Description Options
BLOG_NAME the name of your blog, displayed below the avatar
BLOG_TITLE the main header (h1) on the home page
BLOG_FOOTER_TEXT the text in the footer
BLOG_THEME the theme to pass to Tailwind default
BLOG_FONT_HEADINGS the font-family for all HTML headings, from h1 to h6 sans-serif (default), serif, monospace
BLOG_FONT_PARAGRAPHS the font-family for all other HTML elements sans-serif (default), serif, monospace

All of the env variables can be configured through the Wizard or through setting the project's environment variables. You can do this in your Netlify dashaboard (Site settings/Build & deploy/Environment/Environment variables).

bejamas_env-vars_short.mp4

[alt: video walkthrough of editing env vars]

If setting an environment variable isn't your cup of tea, the defaults can be changed in utils/global-data.js. You can also remove the variables and hard code blog information where these variables are used in the code base.

Adding new posts

All posts are stored in /posts directory. To make a new post, create a new file with the .mdx extension.

Since the posts are written in MDX format you can pass props and components. That means you can use React components inside your posts to make them more interactive. Learn more about how to do so in the MDX docs on content.

nextjs-bejamas-blog_new-post.mp4

[alt: video walkthrough of adding a new blog post]

Testing

Included Default Testing

We’ve included some tooling that helps us maintain these templates. This template currently uses:

If your team is not interested in this tooling, you can remove them with ease!

Removing Renovate

In order to keep our project up-to-date with dependencies we use a tool called Renovate. If you’re not interested in this tooling, delete the renovate.json file and commit that onto your main branch.

Removing Cypress

For our testing, we use Cypress for end-to-end testing. This makes sure that we can validate that our templates are rendering and displaying as we’d expect. By default, we have Cypress not generate deploy links if our tests don’t pass. If you’d like to keep Cypress and still generate the deploy links, go into your netlify.toml and delete the plugin configuration lines:

[[plugins]]
  package = "netlify-plugin-cypress"
-  [plugins.inputs.postBuild]
-    enable = true
-
-  [plugins.inputs]
-    enable = false

If you’d like to remove the netlify-plugin-cypress build plugin entirely, you’d need to delete the entire block above instead. And then make sure sure to remove the package from the dependencies using:

npm uninstall -D netlify-plugin-cypress

And lastly if you’d like to remove Cypress entirely, delete the entire cypress folder and the cypress.config.ts file. Then remove the dependency using:

npm uninstall cypress

More Repositories

1

gatsby-starter-netlify-cms

Example gatsby + netlify cms project
JavaScript
2,030
star
2

victor-hugo

Victor Hugo is a Hugo boilerplate for creating truly epic websites!
JavaScript
1,532
star
3

one-click-hugo-cms

Hugo template with Netlify CMS
SCSS
424
star
4

kpop-stack

Create a Remix app with Netlify, Tailwind, TypeScript and more!
TypeScript
231
star
5

jekyll-netlify-cms

A starter template for Jekyll and netlify CMS
HTML
138
star
6

next-netlify-starter

A one-click starter project for Next and Netlify
JavaScript
103
star
7

kaldi-hugo-cms-template

**Deprecated. Check out one-click-hugo-cms instead.**
CSS
93
star
8

gatsby-ecommerce-theme

A Gatsby-based starter theme with e-commerce styled components
JavaScript
90
star
9

astro-toolbox

Netlify ❤️ Astro: a simple template to give you the code you need to use Netlify features with Astro.
Astro
66
star
10

astro-quickstart

A bare-bones Astro template to get you deployed to Netlify fast!
Astro
38
star
11

nextjs-toolbox

Netlify ❤️ Next.js: A sample to give you the code you need to use Netlify features with Next.js.
JavaScript
34
star
12

hexo-cms-example

An example hexo/netlify CMS integration
CSS
29
star
13

next-platform-starter

Modern starter based on Next.js 14 (App Router), Tailwind, daisyUI, and Netlify Core Primitives
JavaScript
29
star
14

nuxt-toolbox

Netlify ❤️ Nuxt.js: a simple template to give you the code you need to use Netlify features with Nuxt.
JavaScript
25
star
15

astro-platform-starter

A modern starter based on Astro.js, Tailwind, daisyUI, and Netlify Core Primitives (Edge Functions, Image CDN, Blob Store).
Astro
22
star
16

next-starter-jamstack

A Next.js starter for the JAMstack
JavaScript
21
star
17

hugo-quickstart

A bare-bones Hugo template to get you deployed to Netlify fast!
HTML
20
star
18

angular-quickstart

A bare-bones Angular template to get you deployed to Netlify fast!
TypeScript
19
star
19

astro-sanity-starter

Netlify Astro and Sanity starter with visual editing.
TypeScript
17
star
20

roots-cms-example

An example roots/netlify CMS integration
CSS
13
star
21

solid-quickstart

A Solid Quickstart template that will get you started with everything you need to build a Solid project
TypeScript
10
star
22

jekyll-base

Fresh Jekyll install from running "jekyll new ..."
SCSS
3
star
23

mkdocs-base

Fresh Cactus install from "mkdocs new ..."
3
star
24

roots-base

Fresh Roots install from "roots new ..."
Stylus
1
star
25

hexo-base

Fresh Hexo install from "hexo init ..."
Stylus
1
star
26

hugo-base

Fresh Hugo Install from "hugo new site ..."
HTML
1
star