Giter Site home page Giter Site logo

ainc-gatsby-sanity's Introduction

ainc-gatsby-sanity

A portfolio using structured content and a static site builder.

Deployed from sanity.io/create.

What you have

Quick start

  1. Clone this repository from your GitHub account
  2. yarn install in the project root folder on local
  3. yarn run dev to start the Studio and frontend locally **
  4. yarn run build to build to production locally ** Note: You may have better success opening two separate terminals to and running yarn run dev in both /studio and /web

Notes

  • Having troucble with yarn install? Verified Node versions: 14.xx, 17.xx

Workflow to create new documents for production

Steps

Import/Export Documentation

  • Use local machine to create document on your personal tagged dataset (Commit for reference on how to switch to change tags)

  • Export from your tagged dataset, then import into the dev dataset using either --missing or --replace flags (Documentation)

  • In the dev dataset, then add content to your new document in the Sanity Dashboard

  • Then export from the dev dataset, and import into the production dataset using the --missing skip flag (adds any missing data, skips any data with same Id's)

  • Possible have to do sanity graphql deploy to update the GraphQL (After adding code in `/documents))

  • Yay you're done... hopefully (Refer to the commands below)

    • Note: these commands will only transfer the content of the documents, you will still need to add the document code to the studio/douments folder

Confirmed command sequence once a schema is made in your tagged dataset

These 2 commands will export from your tagged dataset into the dev dataset

  • sanity dataset export dev --tag [tagName] ./tagged.tar.gz (Export from tagged dataset)
  • sanity dataset import ./tagged.tar.gz dev --missing skip (Import into dev dataset) this will add all missing data and skip any data with the same id

After this step, you would populate the content in sanity

Then, these 2 commands will import your data from dev to production

  • sanity dataset export dev ./dev.tar.gz (Export from dev dataset) Create a backup of production dataset (Possible GitHub action)
  • sanity dataset export production ./production.tar.gz (Export from production dataset)

Import from dev into production

  • sanity dataset import ./dev.tar.gz production --missing skip (Import into production dataset)



Sanity Workflow

Sanity runs into issues with overwriting work when trying to update schemas simultaneously on different branches. The ideal workflow for updating schema is as follows:

  1. Plan out all necessary schema for development.

  2. Add schema and push to the main branch on Github before any changes are made by other users.

  3. Other users should pull your schema changes before adding any new schema.

  4. Continue development on the front-end accessing the already committed schema.

The entire goal is to eliminate concurrent development of Sanity schema since they will overwrite each other.

Other potential solutions:

  • Sanity migration command

ainc-gatsby-sanity's People

Contributors

clconr avatar colincarver10 avatar colinsmith3 avatar ethangambles avatar lkramen avatar megansizemore avatar raney24 avatar sisay-su avatar tranthle avatar willgarman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ainc-gatsby-sanity's Issues

Core Values Section

Core Values section images aren't being displayed. Could be because of a z-index problem with the bg and filter, or something else entirely.

This commit has the most relevant code.

Finishing touches for /learn page.

The bottom portion of the page needs some margin and to match the live site with the Proven Success section.

The image in between sections is unnecessary, that can be moved down into the bottom section.

(Investigate) Fix x-scroll on various pages

Press page
Homepage (podcase section)
About page
Workspace
...and maybe more

On the homepage, this was fixed by making sure all Sections with row were placed inside of a container

Create /careers page

https://www.awesomeinc.org/careers

Connect to Sanity document so jobs can be easily edited/posted

Will probably have to be able to add a custom title then text, some jobs have different fields than others
Also need a button/slider to select whether the job is active (posted) or not

Edit: Sanitys block type is probably a much better solution

Podcast page isn't generating

.createPage is not allowing the site to build on Netlify.

error message: error UNHANDLED REJECTION Couldn't find temp query result for "/podcast".

Build link

Duplicate by uncommenting this code and running netlify build locally.

Create 5A banner

Sanity query to get upcoming 5A and maybe the title and other info

Fix navbar

Replicate awesomeinc.org

  • Add hover effect
  • Add links to all pages
  • Mobile, hamburger menu needs to be styled
  • Remove reduntant item in dropdowns
  • Move hamburger beside logo
  • Mobile - make dropdowns links

Nice to have:

  • Animation on mouse hover

Create Podcast page

Create a page similar to the /blog page for our podcast. This can live at /podcast.

Refer to this commit for reference on how this is being imported.

In short, we used gatsby-source-rss-feed to import the podcasts from Anchor (at this URL: https://anchor.fm/s/81dfae4/podcast/rss)

I don't know what data we get from Anchor, so it may not match the /blog exactly.

Since it likely won't be the exact same, we can create a new component.

Create dynamic page titles

Page titles should be included in each page. It would be nice to have these be dynamic using the Layout.js component. Do you think that is the best way to do that? This will allow us to code the page titles, or we can pass page title from a sanity document, etc.

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.