Dự án này đã lâu không có cập nhật mới nên không còn hiển thị trên trang chủ, danh mục hay kết quả tìm kiếm — dữ liệu vẫn được giữ nguyên và trang này vẫn xem được bình thường.
Quay lại Trending
RepositoryJavaScriptUSHoa Kỳ
kmelve

kmelve/eleventy-sanity-blog-boilerplate

Minimal blog with 11ty and Sanity

56sao
15fork
0issue
0lượt xem

Eleventy and Sanity Blog Boilerplate

Minimal blog with Eleventy and Sanity.

This is a monorepo with a pre-configured Sanity Studio (/studio) and a very basic setup of Eleventy (/web).

Quick start

  1. npm install in the project root folder on local
  2. npm run sanity-init to reconfigure the studio with a new or existing project
  3. npm run dev to start the Studio and 11ty in watch mode
    • Sanity Studio runs on localhost:3333
    • 11ty outputs the static files in _site
  4. npm run build to build to production locally

Deploy on Netlify

You can host both the studio and the 11ty blog on Netlify as two apps. Log in to your Netlify account and add them as two separate apps with the following settings:

Studio

  • Repository: <your repository>
  • Base directory: studio
  • Build command: npm run build && cp ./netlify.toml dist
  • Publish directory: studio/dist

You have to add CORS-settings for the studio deployed on Netlify.

Web

  • Repository: <your repository>
  • Base directory: web
  • Build command: npm run build-web
  • Publish directory: web/_site

Deploy on now

The now.json has configuration for deploying both the frontend and the studio on one now deployment. The web frontend can be browsed from the root of your now domain. The Studio can be accessed on https://<your-domain>.now.sh/studio.

  1. Add a "basePath": "/studio" to sanity.json:

    "project": {
        "name": "sanity-tutorial-blog",
        "basePath": "/studio"
      },
    
  2. You have to add CORS-settings for the studio deployed on now.

CORS-settings for the Studio

Go to your projects API-settings on manage.sanity.io => Settings => API => CORS origins => Click "Add" => Add domain for the now deployment + Allow credentials.

or

> cd studio
> sanity cors add https://<your-domain>.now.sh`

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryNunjucks
5t3ph/moderncss-dot-dev

Posts from the series "Modern CSS Solutions to Old CSS Problems"

151
Aug 31, 2025
RepositoryNunjucks
5t3ph/htmlrecipes

A collection of quick copy HTML snippets for a variety of common scenarios.

139
Jan 27, 2023
RepositoryJavaScript
vercel/next.js

The React Framework

143.3k
Oct 25, 2026
RepositoryJavaScript
vercel/next.js

The React Framework

143.3k
Oct 25, 2026
RepositoryJavaScript
11ty/buildawesome

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.

20.0k
Oct 16, 2026
RepositoryJavaScript
google/eleventy-high-performance-blog

A high performance blog template for the 11ty static site generator.

4.0k
Jun 18, 2024
RepositoryJavaScript
gregives/Twelvety

An Eleventy starter project built to be fast

296
Oct 31, 2023
RepositoryJavaScript
precondition/keymapdb

Online database of keymaps for programmable keyboards, with a focus on QMK ergonomic keyboards.

191
Oct 21, 2026
RepositoryJavaScript
ianrose/deventy

A minimal 11ty starting point for building static websites with modern tools.

175
Jun 1, 2026