Code Monkey home page Code Monkey logo

gatsby-starter-sensenet-blog's Introduction

sn-blog-gatsby

This example demonstrates how to create an app with sensenet and Gatsby using sensenet source plugin. It's a good starter for building a blog sourcing data from sensenet.

Quick start

gatsby new sensenet-starter https://github.com/SenseNet/gatsby-starter-sensenet-blog

Start developing. Navigate into your new site’s directory and start it up.

cd sensenet-starter
gatsby develop

Features

  • A simple blog built with sensenet
  • Uses typescript
  • Uses gatsby-plugin-material-ui for styling
  • Uses prismjs for code highlighting
  • Uses date-fns for date formatting
  • Uses gatsby-plugin-mdx to process mdx
  • Uses gatsby-plugin-image for image rendering

Configuration

You have to add urls of your sensenet repository and identity server to configuration.js:

exports.repositoryUrl = '<YOUR REPOSITORY URL>'

exports.configuration = {
  clientId: process.env.GATSBY_REACT_APP_CLIENT_ID || '',
  clientSecret: process.env.GATSBY_REACT_APP_CLIENT_SECRET || '',
  identityServerUrl: '<YOUR IDENTITY SERVER URL>',
}

GATSBY_REACT_APP_CLIENT_ID and GATSBY_REACT_APP_CLIENT_SECRET environmental variables should be defined.

You can easily store them in .env files by doing the following:

// In your .env file
GATSBY_REACT_APP_CLIENT_ID=<YOUR CLIENT ID>
GATSBY_REACT_APP_CLIENT_SECRET=<YOUR SECRET>

Where can you get the missing information?

There are two ways to get your client_id and client_secret: You can find them on your snaas user profile or on the admin-ui logged-in to the repository as well. Also here can be found the repository url and url of the identity server.

Deployment

See the official connecting to sensenet guide.

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.