Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:25:30 +08:00
commit cc481ebf7e
18 changed files with 3271 additions and 0 deletions

63
templates/11ty/config.yml Normal file
View File

@@ -0,0 +1,63 @@
# Sveltia CMS Configuration for 11ty (Eleventy)
# Place this file in: admin/config.yml
backend:
name: github
repo: owner/repo # Change to your GitHub repository
branch: main
base_url: https://your-worker.workers.dev # Your Cloudflare Workers OAuth proxy URL
# Media storage
media_folder: src/assets/images
public_folder: /assets/images
# Optional: Image optimization
media_libraries:
default:
config:
max_file_size: 5242880
slugify_filename: true
transformations:
raster_image:
format: webp
quality: 85
width: 2048
height: 2048
# Collections
collections:
# Blog Posts
- name: blog
label: Blog Posts
folder: src/posts
create: true
slug: '{{slug}}'
fields:
- label: Title
name: title
widget: string
- label: Description
name: description
widget: text
required: false
- label: Date
name: date
widget: datetime
date_format: 'YYYY-MM-DD'
time_format: false
- label: Tags
name: tags
widget: list
required: false
- label: Featured Image
name: image
widget: image
required: false
- label: Body
name: body
widget: markdown

12
templates/11ty/index.html Normal file
View File

@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
</head>
<body>
<!-- Sveltia CMS -->
<script src="https://unpkg.com/@sveltia/cms@0.113.3/dist/sveltia-cms.js" type="module"></script>
</body>
</html>