My personal portfolio website
[Site][site] | [Studio][studio] |
---|---|
![Site][site-preview] | ![Sanity Studio][studio-preview] |
Follow this guide to get this site runnning locally:
git clone https://github.com/Evavic44/victoreke.com.git
cd victoreke.com
npm install
.env.example
to .env.local
The minimal env
variables required to boot this project locally includes:
Project Id
Dataset
API Version
Access Token
These variables come from Sanity. To get them, you need to setup your own Sanity instance. Follow the steps below to do this:
Run the command below in a terminal to create a new Sanity project:
npm create sanity@latest -- --template clean --create-project "John Doe" --dataset production
Enter
and follow the prompt to create one.Enter
key to select the default path.Once completed open up the studio directory.
cd john-doe
code .
sanity.config.ts
file in the root directory and copy the projectId
. Now you can close the studio file.Open up the cloned repository and do the following:
NEXT_PUBLIC_SANITY_PROJECT_ID
to the project id you copied earlierNEXT_PUBLIC_SANITY_DATASET
to production
or the dataset name you used.NEXT_PUBLIC_SANITY_API_VERSION
to your current date in YYYY-MM-DD format or leave as isNEXT_PUBLIC_SANITY_ACCESS_TOKEN
.[!Warning] If you don't want to use a token, comment it out in the env.api.ts file or else it will throw errors.
npm run dev
and you can visit http://localhost:3000 to see the project live.By default the UI will be blank. To start adding data to the site, visit your studio at http://localhost:3000/studio to create your own documents.
If you expereinced any issues or enquiries, please raise an issue to discuss it.
Need more guidiance, check out this tutorial that provides a step-by-step guide to setting up Sanity studio for your portfolio site.
npm run build
File(s) | Description |
---|---|
sanity.config.ts |
Config file for Sanity Studio |
sanity.client.ts |
Config file for Sanity CLI |
studio |
Where Sanity Studio is mounted |
schemas |
Where Sanity Studio gets its content types from |
sanity.query.ts |
Groq query for Sanity Schema data |
This portfolio is MIT-licensed so you are free to use it as an inspiration or you can just copy the whole thing (excluding my personal content of course), I don't really mind. Just make sure you link back to victoreke.com on the footer section as attribution to the original source.