Skip to content

LYF Website content management system using Sanity.io

Notifications You must be signed in to change notification settings

TACL-LYF/lyf-website-cms

Repository files navigation

LYF Website CMS

The LYF Website uses Sanity.io to store content.

Getting Started

  1. Download the repo to your computer: git clone git@github.com:TACL-LYF/lyf-website-cms.git
  2. Add the Sanity CLI using npm install -g @sanity/cli or yarn add global @sanity/cli
  3. Run yarn install in order to download all the required packages
  4. In lyf-website-cms, you can run yarn run dev to see a locally running version of Sanity Studio
  5. Run sanity login to get the right push credentials
  • Login using the LYF Technology email and password option
  1. Use yarn run deploy to publish your changes.
  • This will run a combination of sanity deploy which deploys the changes and sanity graphql deploy which deploys the GraphQL changes

Sanity has a more comprehensive getting started guide if you want to learn more!

Basic Structure

Sanity is built around schemas that define the kinds of content we support. Once we define a schema, we agree on what fields we can add and what fields will exist when we pull that content from the server. We define schemas for documents that store content. We can even define some fields to be re-used in multiple documents by creating objects.

  • config/: Stores the configuration files for Sanity. Not super necessary for us to manage
  • plugins/: Managed by Sanity. We can download additional plugins via Sanity's plugin system
  • schemas/: The all-important folder that stores all of our supported schemas!
  • static/: Sanity hosts a site for us to add content, and if we want assets in a known file path (for example: favicons) we can store them here
  • deskStructure.ts: Sanity lets us define how we want to disply and organize documents. This file defines what we want that structure to look like
  • package.json: Found in all npm packages. Defines a bunch of properties of the package including what other packages we depend on.
  • sanity.json: Sanity's configuration file

About

LYF Website content management system using Sanity.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published