Coder Social home page Coder Social logo

cosmicjs / simple-react-blog Goto Github PK

View Code? Open in Web Editor NEW
121.0 9.0 55.0 111 KB

A simple blog website powered by Next.js and Cosmic.

Home Page: https://www.cosmicjs.com/marketplace/templates/simple-nextjs-blog

JavaScript 2.92% CSS 1.81% TypeScript 95.27%
react blog cosmicjs cms api headless-cms

simple-react-blog's Introduction

Simple React Blog

simple-nextjs-blog

NOTE: this repo is now a mirror of the Simple Next.js Blog

React + Next.js + Cosmic

This blog uses Next.js to create a React blog. It uses Next.js 13 and the new app organization structure which takes advantage of React Server Components. It connects to the Cosmic API via the Cosmic JavaScript SDK.

Getting Started

  1. Log in to Cosmic and install the Simple Next.js Blog template.
  2. Run the following commands to install the code locally.
git clone https://github.com/cosmicjs/simple-nextjs-blog
cd simple-nextjs-blog

Environment Variables

  1. Create an .env.local file to gain API access to your Cosmic Bucket. To do this, run:
cp .env.example .env.local
  1. Find your API access keys at Bucket Settings > API Access after logging into your Cosmic dashboard and add them to the .env.local file. It should look something like this:
NEXT_PUBLIC_COSMIC_BUCKET_SLUG=your-bucket-slug
NEXT_PUBLIC_COSMIC_READ_KEY=your-bucket-read-key

Run in development

Install all dependencies and run in development mode.

yarn
yarn dev

Open http://localhost:3000.

Deploy to Vercel

Use the following button to deploy to Vercel. You will need to add API accesss keys as environment variables. Find these in Bucket Settings > API Access.

simple-react-blog's People

Contributors

kemiljk avatar tonyspiro 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  avatar  avatar  avatar  avatar  avatar

simple-react-blog's Issues

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.