Repo template for Sanity + Eleventy projects at Self Aware
- Templates are authored in the
templatesdirectory using any template language supported by eleventy (Nunjucks by default) - Eleventy global data files live in
data. - Styles are authored using Tailwind and the entry point lives in
styles. We always leverage Tailwind utilities before resorting to adding custom styles. - JavaScript lives in
scripts - Place any static files in the
publicfolder - Netlify serverless functions are authored in
api - Place any eleventy related utilities in
lib - Sanity Studio lives in the
studiodirectory
# Install Yarn
npm i -g yarn
# Install project dependencies using yarn
yarn
# Install Sanity Studio dependencies using yarn
cd studio && yarnTo set up with Sanity, you will need to set your Sanity projectId and dataset in two places:
# Start Netlify dev server
yarn dev
# Start Sanity dev server
cd studio && yarn start# Build front-end for production
yarn buildDeploy the front-end using Netlify
# Deploy Sanity Studio
cd studio && yarn deployThe following sites are powered by sane-eleventy:
Thanks to sane-shopify for the name inspiration 🙂
MIT