Skip to content

My personal website built using Astro + sanity CMS and hosted on CF pages

Notifications You must be signed in to change notification settings

ickynavigator/portfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

627 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portfolio Sanity Client

My personal portfolio website built with Astro project. It uses Sanity as the CMS (data store). The project is statically generated and deployed to Cloudflare Pages.

Getting Started

🤫 Environment Variables

Fill up the .dev.vars file with the variables in the .env.example

Key Description
WEBSITE_URL URL of the website. Defaults to https://obifortune.com
PUBLIC_SANITY_VISUAL_EDITING_ENABLED Enable visual editing in the studio. Defaults to false
SANITY_API_READ_TOKEN Read token for the sanity project
PUBLIC_POSTHOG_API_KEY API key for Posthog
PUBLIC_POSTHOG_API_HOST Host for Posthog events. Defaults to https://us.i.posthog.com
PUBLIC_POSTHOG_UI_HOST UI Host for Posthog events. Defaults to https://us.posthog.com
WAKATIME_API_KEY API key for the wakatime API
LASTFM_API_KEY Last.fm API key
LASTFM_USER Last.fm username
PUBLIC_PARTY_URL PartyKit location. Defaults to http://localhost:1999

🧞 Commands

All commands are run from the root of the project, from a terminal with pnpm run:

Command Action
dev Starts local dev server at localhost:4321
build Build your production site to ./dist/, will generate app types and check astro setup
preview Deploy a local preview of the build with wrangler
typegen Generate all user types
cf-typegen Generate types from bindings and module rules in configuration
sa-dev Starts sanity dev server at localhost:3333
sa-deploy Deploy sanity schema to the cloud
sa-typegen Extract sanity schema info and generate types
lint Run eslint on the project
lint:fix Run eslint on the project and resolve auto-fixable issues
typecheck Run tsc to check for type errors
Setting up Sanity

Setting up the sanity project

You need to create a sanity project to work with this portfolio. This can be done by running this in the root of the app

pnpm create sanity@latest

This will prompt you to do a few things

  1. Login to your sanity
  2. Create a new project
  3. Don't add configuration files (this has already been done for you)
  4. Select clean project with no predefined schemas. You can delete the newly created sanity changes
  5. Go to the Sanity dashboard and select your project to view your project ID and other details

About

My personal website built using Astro + sanity CMS and hosted on CF pages

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •