edgepress 2026.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -0
- package/config.yml +146 -0
- package/content/pages/home/en.md +84 -0
- package/content/pages/home/zh-cn.md +84 -0
- package/content/pages/plugin-development/en.md +108 -0
- package/content/pages/plugin-development/zh-cn.md +108 -0
- package/content/pages/privacy-policy/en.md +73 -0
- package/content/pages/privacy-policy/zh-cn.md +73 -0
- package/content/pages/project-introduction/en.md +88 -0
- package/content/pages/project-introduction/zh-cn.md +88 -0
- package/content/pages/quick-start/en.md +147 -0
- package/content/pages/quick-start/zh-cn.md +147 -0
- package/content/pages/theme-development/en.md +106 -0
- package/content/pages/theme-development/zh-cn.md +106 -0
- package/content/posts/2026-09-23-edgepress-on-the-edge/en.md +169 -0
- package/content/posts/2026-09-23-edgepress-on-the-edge/zh-cn.md +169 -0
- package/content/posts/2026-09-24-edgepress-release-2026-9-1/en.md +30 -0
- package/content/posts/2026-09-24-edgepress-release-2026-9-1/zh-cn.md +30 -0
- package/content/posts/2026-09-25-edgepress-release-2026-9-2/en.md +28 -0
- package/content/posts/2026-09-25-edgepress-release-2026-9-2/zh-cn.md +28 -0
- package/content/posts/2026-09-25-edgepress-release-2026-9-3/en.md +39 -0
- package/content/posts/2026-09-25-edgepress-release-2026-9-3/zh-cn.md +39 -0
- package/edgepress.config.mjs +18 -0
- package/languages/base/en.json +55 -0
- package/languages/packs/zh-CN.json +55 -0
- package/package.json +59 -0
- package/plugins/consent/index.js +40 -0
- package/project-compatibility.json +48 -0
- package/src/assets.js +181 -0
- package/src/build.js +277 -0
- package/src/cli.js +344 -0
- package/src/concurrency.js +26 -0
- package/src/config.js +396 -0
- package/src/content.js +160 -0
- package/src/generators.js +263 -0
- package/src/i18n.js +64 -0
- package/src/maintenance.js +122 -0
- package/src/markdown.js +65 -0
- package/src/page-blocks.js +350 -0
- package/src/page-check.js +416 -0
- package/src/plugin-api.js +75 -0
- package/src/preview.js +167 -0
- package/src/report-visuals.js +480 -0
- package/src/theme.js +161 -0
- package/src/worker.js +139 -0
- package/static/.gitkeep +0 -0
- package/static/edgepress/language-select.js +5 -0
- package/static/edgepress/plugins/advertising/google-adsense.js +26 -0
- package/static/edgepress/plugins/captcha/cloudflare-turnstile.js +28 -0
- package/static/edgepress/plugins/captcha/google-recaptcha.js +27 -0
- package/static/edgepress/plugins/captcha/hcaptcha.js +27 -0
- package/static/edgepress/plugins/consent/manager.js +180 -0
- package/static/edgepress/plugins/statistics/baidu-tongji.js +8 -0
- package/static/edgepress/plugins/statistics/cloudflare-web-analytics.js +9 -0
- package/static/edgepress/plugins/statistics/google-analytics.js +13 -0
- package/static/edgepress/plugins/tracking/google-tag-manager.js +10 -0
- package/static/edgepress/plugins/tracking/meta-pixel.js +18 -0
- package/static/edgepress/search.js +84 -0
- package/static/edgepress-markdown-guide.svg +21 -0
- package/templates/gitignore +6 -0
- package/templates/site-readme.md +20 -0
- package/themes/atelier/assets/style.css +120 -0
- package/themes/atelier/layouts/layout.html +17 -0
- package/themes/atelier/layouts/partials/footer.html +4 -0
- package/themes/atelier/layouts/partials/head.html +17 -0
- package/themes/atelier/layouts/partials/header.html +5 -0
- package/themes/atelier/theme.json +6 -0
- package/themes/default/assets/style.css +157 -0
- package/themes/default/layouts/layout.html +12 -0
- package/themes/default/layouts/partials/footer.html +4 -0
- package/themes/default/layouts/partials/head.html +19 -0
- package/themes/default/layouts/partials/header.html +5 -0
- package/themes/default/theme.json +6 -0
- package/themes/signal/assets/style.css +113 -0
- package/themes/signal/layouts/layout.html +12 -0
- package/themes/signal/layouts/partials/footer.html +4 -0
- package/themes/signal/layouts/partials/head.html +17 -0
- package/themes/signal/layouts/partials/header.html +5 -0
- package/themes/signal/theme.json +6 -0
- package/wrangler.jsonc +13 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 隐私政策
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
slug: privacy-policy
|
|
5
|
+
description: 本 EdgePress 网站当前的数据处理方式、同意管理、已配置集成和发布前信息。
|
|
6
|
+
blocks:
|
|
7
|
+
- columns: 1
|
|
8
|
+
cells:
|
|
9
|
+
-
|
|
10
|
+
- type: section
|
|
11
|
+
title: 网站运营者
|
|
12
|
+
tone: soft
|
|
13
|
+
blocks:
|
|
14
|
+
- type: privacy-controller
|
|
15
|
+
nameLabel: 个人信息处理者
|
|
16
|
+
contactLabel: 隐私联系
|
|
17
|
+
missingTitle: 发布前需要补充信息
|
|
18
|
+
missingText: 当前 config.yml 尚未填写真实运营者名称和隐私联系方式,site.url 仍为 example.com。正式发布前请替换这些值。
|
|
19
|
+
- columns: 2
|
|
20
|
+
cells:
|
|
21
|
+
-
|
|
22
|
+
- type: section
|
|
23
|
+
title: 此起始站点当前的功能
|
|
24
|
+
blocks:
|
|
25
|
+
- type: text
|
|
26
|
+
paragraphs:
|
|
27
|
+
- 此源项目生成公开页面、文章、搜索数据、站点地图和 Atom 订阅。它不包含访客账户系统、评论功能或联系表单。
|
|
28
|
+
- Worker 提供可选的 /api/v1/ 后端代理。只有部署者配置 Service Binding,或同时设置 BACKEND_URL 和 BACKEND_TOKEN 密钥后,代理才会转发请求。此起始站点不会将页面内容提交到该接口。
|
|
29
|
+
- 托管和内容分发服务商可能为运行网站而处理连接和请求数据。运营者应在发布前确认实际服务商,说明适用条款和数据保留期限。
|
|
30
|
+
-
|
|
31
|
+
- type: section
|
|
32
|
+
title: 可选浏览器服务
|
|
33
|
+
blocks:
|
|
34
|
+
- type: text
|
|
35
|
+
text: 当前配置的跟踪、统计、广告和人机验证服务列表均为空。运营者添加服务后,下方列表会根据所配置的供应商、用途和保留期限自动生成。
|
|
36
|
+
- type: privacy-services
|
|
37
|
+
emptyText: 此源项目当前没有配置可选的第三方浏览器服务。
|
|
38
|
+
- columns: 1
|
|
39
|
+
cells:
|
|
40
|
+
-
|
|
41
|
+
- type: section
|
|
42
|
+
title: 同意偏好
|
|
43
|
+
tone: accent
|
|
44
|
+
blocks:
|
|
45
|
+
- type: text
|
|
46
|
+
paragraphs:
|
|
47
|
+
- 浏览器集成只有在访客接受已配置服务后才会加载。存在可保存的选择时,同意界面会将第一方偏好存储在本地浏览器中;它不是服务器端审计日志。
|
|
48
|
+
- 访客可以重新打开“隐私设置”更改选择。撤回之前已启用的服务后,页面会重新载入,以停止该集成继续运行。
|
|
49
|
+
- type: privacy-consent
|
|
50
|
+
storageLabel: 浏览器存储键
|
|
51
|
+
expiryLabel: 偏好过期时间
|
|
52
|
+
versionLabel: 同意配置版本
|
|
53
|
+
expiryText: "保存后 {days} 天"
|
|
54
|
+
- columns: 1
|
|
55
|
+
cells:
|
|
56
|
+
-
|
|
57
|
+
- type: section
|
|
58
|
+
title: 供应商与法律信息
|
|
59
|
+
blocks:
|
|
60
|
+
- type: text
|
|
61
|
+
paragraphs:
|
|
62
|
+
- 启用供应商前,运营者应记录供应商接收的信息、处理目的、接收方、适用保留期限和跨境传输情况。浏览器配置中只能填写公开站点标识;CAPTCHA 密钥必须保存在可信服务器中,并由服务器验证每个响应令牌。
|
|
63
|
+
- 此起始配置无法确定实际部署的运营者所在地、法律依据、数据保留义务或适用的个人权利。请根据实际网站完成政策,必要时咨询合格的专业人员。
|
|
64
|
+
- type: link-list
|
|
65
|
+
title: 主要法律资料
|
|
66
|
+
items:
|
|
67
|
+
- label: EUR-Lex GDPR 正文
|
|
68
|
+
url: https://eur-lex.europa.eu/eli/reg/2016/679
|
|
69
|
+
- label: 英国 ICO 隐私告知指引
|
|
70
|
+
url: https://ico.org.uk/for-organisations/advice-for-small-organisations/getting-started-with-gdpr/data-protection-self-assessment/what-information-you-must-supply-under-the-gdpr/
|
|
71
|
+
- label: 中国个人信息保护法
|
|
72
|
+
url: https://www.miit.gov.cn/jgsj/zfs/fl/art/2022/art_515a4b20c12f430eab54bb4f56d89f56.html
|
|
73
|
+
---
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Project introduction
|
|
3
|
+
lang: en
|
|
4
|
+
slug: project-introduction
|
|
5
|
+
description: EdgePress architecture, release policy, feature maturity, and supported runtime baseline.
|
|
6
|
+
blocks:
|
|
7
|
+
- columns: 1
|
|
8
|
+
cells:
|
|
9
|
+
-
|
|
10
|
+
- type: hero
|
|
11
|
+
eyebrow: Project overview
|
|
12
|
+
title: A static site builder with editable pages and Markdown articles.
|
|
13
|
+
text: EdgePress separates content, presentation, trusted build-time plugins, and Worker request handling so each part has a clear place to change.
|
|
14
|
+
- columns: 1
|
|
15
|
+
cells:
|
|
16
|
+
-
|
|
17
|
+
- type: feature-grid
|
|
18
|
+
title: Project boundaries
|
|
19
|
+
items:
|
|
20
|
+
- title: Pages
|
|
21
|
+
text: Each localized page stores its ordered row layout, column count, element types, and element content in Markdown front matter.
|
|
22
|
+
- title: Posts
|
|
23
|
+
text: Each article is a Markdown document rendered with the built-in sanitizing pipeline.
|
|
24
|
+
- title: Themes
|
|
25
|
+
text: HTML layouts, shared partials, and hard-coded CSS palettes control site presentation.
|
|
26
|
+
- columns: 1
|
|
27
|
+
cells:
|
|
28
|
+
-
|
|
29
|
+
- type: section
|
|
30
|
+
title: Supported baseline
|
|
31
|
+
tone: soft
|
|
32
|
+
blocks:
|
|
33
|
+
- type: data-table
|
|
34
|
+
title: Runtime and capability status for this release
|
|
35
|
+
headers:
|
|
36
|
+
- Area
|
|
37
|
+
- Baseline
|
|
38
|
+
- Status
|
|
39
|
+
rows:
|
|
40
|
+
- - Build CLI
|
|
41
|
+
- Node.js 22.12 or newer
|
|
42
|
+
- Stable
|
|
43
|
+
- - Worker runtime
|
|
44
|
+
- Module Worker with Request, Response, and Web APIs
|
|
45
|
+
- Stable
|
|
46
|
+
- - Static publishing
|
|
47
|
+
- Workers Static Assets through Wrangler
|
|
48
|
+
- Stable
|
|
49
|
+
- - Node.js APIs in Worker
|
|
50
|
+
- Not required by src/worker.js
|
|
51
|
+
- Stable
|
|
52
|
+
- - Plugin API
|
|
53
|
+
- Major version 1
|
|
54
|
+
- Experimental
|
|
55
|
+
- - Page block builder
|
|
56
|
+
- Ordered rows, 1 to 4 columns, validated elements
|
|
57
|
+
- Experimental
|
|
58
|
+
- - Backend forwarding
|
|
59
|
+
- Optional Service Binding or URL plus Worker token
|
|
60
|
+
- Experimental
|
|
61
|
+
- type: text
|
|
62
|
+
text: The compatibility manifest is project-compatibility.json. The Worker compatibility date is pinned in wrangler.jsonc. Static page delivery does not require nodejs_compat.
|
|
63
|
+
- columns: 1
|
|
64
|
+
cells:
|
|
65
|
+
-
|
|
66
|
+
- type: section
|
|
67
|
+
title: Release and feature lifecycle
|
|
68
|
+
blocks:
|
|
69
|
+
- type: data-table
|
|
70
|
+
title: Feature stages
|
|
71
|
+
headers:
|
|
72
|
+
- Stage
|
|
73
|
+
- Meaning
|
|
74
|
+
rows:
|
|
75
|
+
- - Experimental
|
|
76
|
+
- Usable, with configuration or behavior that may change in a minor release.
|
|
77
|
+
- - Stable
|
|
78
|
+
- Follows semantic versioning; breaking changes require a major release.
|
|
79
|
+
- - Deprecated
|
|
80
|
+
- Remains available for at least two minor releases and is removed in a major release, except for urgent security issues.
|
|
81
|
+
- - Removed
|
|
82
|
+
- No longer shipped; the compatibility manifest records the removal release.
|
|
83
|
+
- type: text
|
|
84
|
+
paragraphs:
|
|
85
|
+
- "Monthly releases use the year.month.request format. This release is 2026.9.1: the first requested release update for September 2026."
|
|
86
|
+
- Ship a minor release when the monthly review is ready, and use patch releases for defects, security fixes, and dependency updates. Support the previous major release with security fixes for 12 months after a new major line begins.
|
|
87
|
+
- Before a release, update project-compatibility.json and this feature matrix together. Run edgepress doctor to review the local Node.js version, Worker entry, and configured compatibility date.
|
|
88
|
+
---
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 项目介绍
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
slug: project-introduction
|
|
5
|
+
description: EdgePress 的架构、发布政策、功能成熟度和支持的运行环境基线。
|
|
6
|
+
blocks:
|
|
7
|
+
- columns: 1
|
|
8
|
+
cells:
|
|
9
|
+
-
|
|
10
|
+
- type: hero
|
|
11
|
+
eyebrow: 项目概览
|
|
12
|
+
title: 页面可编辑、文章用 Markdown 的静态网站构建器。
|
|
13
|
+
text: EdgePress 将内容、展示、可信构建插件和 Worker 请求处理分开放置,让每个部分都有清晰的修改位置。
|
|
14
|
+
- columns: 1
|
|
15
|
+
cells:
|
|
16
|
+
-
|
|
17
|
+
- type: feature-grid
|
|
18
|
+
title: 项目边界
|
|
19
|
+
items:
|
|
20
|
+
- title: Pages 页面
|
|
21
|
+
text: 每个本地化页面都在 Markdown 前置数据中保存有序行布局、栏数、元素类型和元素内容。
|
|
22
|
+
- title: Posts 文章
|
|
23
|
+
text: 每篇文章都是 Markdown 文档,并由内置安全渲染流程输出。
|
|
24
|
+
- title: Themes 主题
|
|
25
|
+
text: HTML 布局、共享局部模板和主题内硬编码的 CSS 配色负责网站展示。
|
|
26
|
+
- columns: 1
|
|
27
|
+
cells:
|
|
28
|
+
-
|
|
29
|
+
- type: section
|
|
30
|
+
title: 支持基线
|
|
31
|
+
tone: soft
|
|
32
|
+
blocks:
|
|
33
|
+
- type: data-table
|
|
34
|
+
title: 本版本的运行环境与功能状态
|
|
35
|
+
headers:
|
|
36
|
+
- 范围
|
|
37
|
+
- 基线
|
|
38
|
+
- 状态
|
|
39
|
+
rows:
|
|
40
|
+
- - 构建命令行
|
|
41
|
+
- Node.js 22.12 或更新版本
|
|
42
|
+
- 稳定
|
|
43
|
+
- - Worker 运行环境
|
|
44
|
+
- 使用 Request、Response 和 Web API 的 Module Worker
|
|
45
|
+
- 稳定
|
|
46
|
+
- - 静态发布
|
|
47
|
+
- 通过 Wrangler 发布 Workers Static Assets
|
|
48
|
+
- 稳定
|
|
49
|
+
- - Worker 中的 Node.js API
|
|
50
|
+
- src/worker.js 不需要 Node.js API
|
|
51
|
+
- 稳定
|
|
52
|
+
- - 插件 API
|
|
53
|
+
- 主版本 1
|
|
54
|
+
- 实验性
|
|
55
|
+
- - 页面元素构建器
|
|
56
|
+
- 有序行、1 至 4 栏、经过验证的元素
|
|
57
|
+
- 实验性
|
|
58
|
+
- - 后端转发
|
|
59
|
+
- 可选 Service Binding 或 URL 加 Worker 密钥
|
|
60
|
+
- 实验性
|
|
61
|
+
- type: text
|
|
62
|
+
text: 兼容性清单位于 project-compatibility.json。Worker 兼容日期固定在 wrangler.jsonc 中。静态页面服务不需要 nodejs_compat。
|
|
63
|
+
- columns: 1
|
|
64
|
+
cells:
|
|
65
|
+
-
|
|
66
|
+
- type: section
|
|
67
|
+
title: 发布与功能生命周期
|
|
68
|
+
blocks:
|
|
69
|
+
- type: data-table
|
|
70
|
+
title: 功能阶段
|
|
71
|
+
headers:
|
|
72
|
+
- 阶段
|
|
73
|
+
- 含义
|
|
74
|
+
rows:
|
|
75
|
+
- - 实验性
|
|
76
|
+
- 可以使用,但配置或行为可能在次版本发布时调整。
|
|
77
|
+
- - 稳定
|
|
78
|
+
- 遵循语义化版本;破坏性变更需要主版本更新。
|
|
79
|
+
- - 弃用
|
|
80
|
+
- 通常至少保留两个次版本后再于主版本移除,紧急安全问题除外。
|
|
81
|
+
- - 移除
|
|
82
|
+
- 不再随项目发布;兼容性清单记录移除版本。
|
|
83
|
+
- type: text
|
|
84
|
+
paragraphs:
|
|
85
|
+
- 月度版本使用“年.月.请求序号”格式。本次版本为 2026.9.1,即 2026 年 9 月针对本次需求的第一次更新。
|
|
86
|
+
- 月度审核就绪后发布次版本;缺陷、安全修复和依赖更新使用修订版本。新主版本发布后,前一主版本继续获得 12 个月的安全修复支持。
|
|
87
|
+
- 发布前应同步更新 project-compatibility.json 和此功能清单。运行 edgepress doctor 可检查本机 Node.js 版本、Worker 入口和兼容日期。
|
|
88
|
+
---
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Quick start
|
|
3
|
+
lang: en
|
|
4
|
+
slug: quick-start
|
|
5
|
+
description: Install EdgePress, create Markdown posts, edit page elements, build the site, and preview it locally.
|
|
6
|
+
blocks:
|
|
7
|
+
- columns: 1
|
|
8
|
+
cells:
|
|
9
|
+
-
|
|
10
|
+
- type: hero
|
|
11
|
+
eyebrow: Start here
|
|
12
|
+
title: Set up the project and open the live preview.
|
|
13
|
+
text: Use the edgepress command after installing project dependencies. Local preview rebuilds changed source files and refreshes the accessibility and agent-friendliness report.
|
|
14
|
+
- columns: 1
|
|
15
|
+
cells:
|
|
16
|
+
-
|
|
17
|
+
- type: section
|
|
18
|
+
title: Requirements and first commands
|
|
19
|
+
tone: soft
|
|
20
|
+
blocks:
|
|
21
|
+
- type: data-table
|
|
22
|
+
title: Supported baseline
|
|
23
|
+
headers:
|
|
24
|
+
- Requirement
|
|
25
|
+
- Minimum
|
|
26
|
+
rows:
|
|
27
|
+
- - Node.js
|
|
28
|
+
- "22.12"
|
|
29
|
+
- - npm
|
|
30
|
+
- Current supported release
|
|
31
|
+
- - Cloudflare account
|
|
32
|
+
- Only needed to deploy
|
|
33
|
+
- type: code
|
|
34
|
+
title: Install dependencies and run EdgePress
|
|
35
|
+
language: sh
|
|
36
|
+
code: |
|
|
37
|
+
npm ci
|
|
38
|
+
edgepress build
|
|
39
|
+
edgepress server
|
|
40
|
+
- columns: 2
|
|
41
|
+
cells:
|
|
42
|
+
-
|
|
43
|
+
- type: section
|
|
44
|
+
title: Create content
|
|
45
|
+
blocks:
|
|
46
|
+
- type: steps
|
|
47
|
+
items:
|
|
48
|
+
- title: Create an article
|
|
49
|
+
text: Posts use Markdown and are written in content/posts/<post-id>/en.md or a localized file such as zh-cn.md.
|
|
50
|
+
command: edgepress new "A project update"
|
|
51
|
+
- title: Create a page folder
|
|
52
|
+
text: Add content/pages/<page-id>/en.md. Each configured locale gets its own lowercase locale filename.
|
|
53
|
+
- title: Set the language
|
|
54
|
+
text: Match the front matter lang value to the filename and enable optional locales in edgepress.config.mjs.
|
|
55
|
+
-
|
|
56
|
+
- type: section
|
|
57
|
+
title: Edit a page layout
|
|
58
|
+
blocks:
|
|
59
|
+
- type: text
|
|
60
|
+
paragraphs:
|
|
61
|
+
- Pages have no Markdown article body. Put the page layout in the blocks front matter of each localized page file.
|
|
62
|
+
- At the top of each row, choose columns from 1 to 4. Add one cells entry for each column. Inside a cell, add an element type, then its content fields.
|
|
63
|
+
- Supported content elements include hero, section, text, heading, display-text, media-text, links, lists, steps, code, tables, notices, latest-posts, and configured privacy or integration widgets.
|
|
64
|
+
- type: notice
|
|
65
|
+
title: Accessibility for video
|
|
66
|
+
text: A media-text video element requires a captions WebVTT file, a language code, a track label, and an accessible media label. Use locally hosted files when possible.
|
|
67
|
+
tone: info
|
|
68
|
+
- columns: 1
|
|
69
|
+
cells:
|
|
70
|
+
-
|
|
71
|
+
- type: section
|
|
72
|
+
title: Configure and preview
|
|
73
|
+
blocks:
|
|
74
|
+
- type: text
|
|
75
|
+
paragraphs:
|
|
76
|
+
- Edit site title, description, canonical URL, agent SEO, site navigation, footer text, and privacy controller details in config.yml. Theme colors live in theme CSS.
|
|
77
|
+
- Change the selected theme with edgepress theme list and edgepress theme use <theme-name>. Theme paths are stored in edgepress.config.mjs.
|
|
78
|
+
- Install a theme package with edgepress theme install <npm-package> or start with a blank theme using edgepress theme create <name>.
|
|
79
|
+
- edgepress server starts a local Wrangler server, watches source files, rebuilds changed pages, reloads the browser, and rewrites tools/page-check.md and tools/page-check.json.
|
|
80
|
+
- type: code
|
|
81
|
+
title: Build, inspect, and deploy
|
|
82
|
+
language: sh
|
|
83
|
+
code: |
|
|
84
|
+
edgepress check
|
|
85
|
+
edgepress doctor
|
|
86
|
+
edgepress deploy
|
|
87
|
+
- type: text
|
|
88
|
+
text: Compatibility checks read the Node.js baseline, Worker entry, and compatibility date from project-compatibility.json and wrangler.jsonc. Check the generated report before deploying.
|
|
89
|
+
- type: section
|
|
90
|
+
title: Publish the source on GitHub
|
|
91
|
+
blocks:
|
|
92
|
+
- type: text
|
|
93
|
+
paragraphs:
|
|
94
|
+
- Create an empty repository on GitHub, then push the EdgePress source. In the Cloudflare dashboard, create a Worker and connect that repository with Workers Builds. Choose main as the production branch. Set a unique Worker name in wrangler.jsonc before deployment.
|
|
95
|
+
- The build and deploy scripts in package.json are detected by Workers Builds. It runs npm run build to generate dist/, then npm run deploy to publish the Worker. dist/ stays out of Git. Cloudflare manages the build authorization for this connection.
|
|
96
|
+
- type: code
|
|
97
|
+
title: Upload the source repository
|
|
98
|
+
language: sh
|
|
99
|
+
code: |
|
|
100
|
+
git init
|
|
101
|
+
git add .
|
|
102
|
+
git commit -m "Initial EdgePress site"
|
|
103
|
+
git branch -M main
|
|
104
|
+
git remote add origin https://github.com/<owner>/<repository>.git
|
|
105
|
+
git push -u origin main
|
|
106
|
+
- type: text
|
|
107
|
+
text: For a local deployment, authenticate with npx wrangler login, then run edgepress deploy. The command generates dist/ and deploys the Worker using wrangler.jsonc.
|
|
108
|
+
- type: link-list
|
|
109
|
+
title: Deployment references
|
|
110
|
+
items:
|
|
111
|
+
- label: Connect GitHub to Cloudflare Workers Builds
|
|
112
|
+
url: https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/github-integration/
|
|
113
|
+
- label: Configure Workers Builds commands
|
|
114
|
+
url: https://developers.cloudflare.com/workers/ci-cd/builds/configuration/
|
|
115
|
+
- type: section
|
|
116
|
+
title: Generate files for OpenResty or Nginx
|
|
117
|
+
blocks:
|
|
118
|
+
- type: text
|
|
119
|
+
paragraphs:
|
|
120
|
+
- edgepress build and edgepress generate use the same generator and write the static site to dist/. Run edgepress generate, then upload the contents of dist/ to the server's document root. Do not upload the dist/ directory as a nested folder unless that is the URL path you want.
|
|
121
|
+
- OpenResty uses Nginx configuration syntax for static files. Set root to the uploaded directory; try_files checks the exact path, directory index, and .html route. The generated 403.html and 404.html files can be used for error responses.
|
|
122
|
+
- type: code
|
|
123
|
+
title: Minimal Nginx or OpenResty site
|
|
124
|
+
language: nginx
|
|
125
|
+
code: |
|
|
126
|
+
server {
|
|
127
|
+
listen 80;
|
|
128
|
+
server_name example.org;
|
|
129
|
+
root /var/www/edgepress;
|
|
130
|
+
index index.html;
|
|
131
|
+
|
|
132
|
+
location / {
|
|
133
|
+
try_files $uri $uri/ $uri.html =404;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
error_page 403 /403.html;
|
|
137
|
+
error_page 404 /404.html;
|
|
138
|
+
}
|
|
139
|
+
- type: code
|
|
140
|
+
title: Generate the upload directory
|
|
141
|
+
language: sh
|
|
142
|
+
code: edgepress generate
|
|
143
|
+
- type: notice
|
|
144
|
+
title: Worker-only integrations
|
|
145
|
+
text: Static hosting does not run src/worker.js. The built-in /api/ proxy and Cloudflare service bindings require an EdgePress Worker deployment; otherwise configure an equivalent server-side route on your host. Keep backend tokens out of browser settings.
|
|
146
|
+
tone: warning
|
|
147
|
+
---
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 快速入门
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
slug: quick-start
|
|
5
|
+
description: 安装 EdgePress、创建 Markdown 文章、编辑页面元素、本地构建并打开实时预览。
|
|
6
|
+
blocks:
|
|
7
|
+
- columns: 1
|
|
8
|
+
cells:
|
|
9
|
+
-
|
|
10
|
+
- type: hero
|
|
11
|
+
eyebrow: 从这里开始
|
|
12
|
+
title: 配置项目并打开实时预览。
|
|
13
|
+
text: 安装项目依赖后使用 edgepress 命令。本地预览会在源文件变更后自动构建,并刷新无障碍化和 agent 友好度报告。
|
|
14
|
+
- columns: 1
|
|
15
|
+
cells:
|
|
16
|
+
-
|
|
17
|
+
- type: section
|
|
18
|
+
title: 环境要求与初始命令
|
|
19
|
+
tone: soft
|
|
20
|
+
blocks:
|
|
21
|
+
- type: data-table
|
|
22
|
+
title: 支持基线
|
|
23
|
+
headers:
|
|
24
|
+
- 要求
|
|
25
|
+
- 最低版本
|
|
26
|
+
rows:
|
|
27
|
+
- - Node.js
|
|
28
|
+
- "22.12"
|
|
29
|
+
- - npm
|
|
30
|
+
- 当前受支持版本
|
|
31
|
+
- - Cloudflare 账户
|
|
32
|
+
- 仅部署时需要
|
|
33
|
+
- type: code
|
|
34
|
+
title: 安装依赖并运行 EdgePress
|
|
35
|
+
language: sh
|
|
36
|
+
code: |
|
|
37
|
+
npm ci
|
|
38
|
+
edgepress build
|
|
39
|
+
edgepress server
|
|
40
|
+
- columns: 2
|
|
41
|
+
cells:
|
|
42
|
+
-
|
|
43
|
+
- type: section
|
|
44
|
+
title: 创建内容
|
|
45
|
+
blocks:
|
|
46
|
+
- type: steps
|
|
47
|
+
items:
|
|
48
|
+
- title: 创建文章
|
|
49
|
+
text: 文章使用 Markdown,保存在 content/posts/<post-id>/en.md 或 zh-cn.md 等本地化文件中。
|
|
50
|
+
command: edgepress new "A project update"
|
|
51
|
+
- title: 创建页面目录
|
|
52
|
+
text: 新建 content/pages/<page-id>/en.md。每种已配置语言都有一个小写语言文件名。
|
|
53
|
+
- title: 设置语言
|
|
54
|
+
text: front matter 的 lang 值需与文件名匹配;在 edgepress.config.mjs 中启用可选语言。
|
|
55
|
+
-
|
|
56
|
+
- type: section
|
|
57
|
+
title: 编辑页面布局
|
|
58
|
+
blocks:
|
|
59
|
+
- type: text
|
|
60
|
+
paragraphs:
|
|
61
|
+
- 页面没有 Markdown 文章正文。请将布局写在每个本地化页面文件的 blocks 前置数据中。
|
|
62
|
+
- 每行先选择 1 至 4 栏,并为每栏添加一个 cells 项。然后在栏内选择元素类型,再填写该元素的内容字段。
|
|
63
|
+
- 可用元素包括 hero、section、text、heading、display-text、media-text、链接、列表、步骤、代码、表格、提示、最新文章,以及已配置的隐私或集成组件。
|
|
64
|
+
- type: notice
|
|
65
|
+
title: 视频无障碍要求
|
|
66
|
+
text: media-text 视频元素需要 WebVTT 字幕文件、语言代码、字幕轨道名称和可访问的媒体描述。尽量使用本地托管的视频文件。
|
|
67
|
+
tone: info
|
|
68
|
+
- columns: 1
|
|
69
|
+
cells:
|
|
70
|
+
-
|
|
71
|
+
- type: section
|
|
72
|
+
title: 配置与预览
|
|
73
|
+
blocks:
|
|
74
|
+
- type: text
|
|
75
|
+
paragraphs:
|
|
76
|
+
- 在 config.yml 中编辑站点标题、简介、规范 URL、agent SEO、导航、页脚文字和隐私运营者信息。主题配色保存在各自主题的 CSS 中。
|
|
77
|
+
- 使用 edgepress theme list 查看主题,使用 edgepress theme use <主题名称> 切换主题。主题路径保存在 edgepress.config.mjs 中。
|
|
78
|
+
- 使用 edgepress theme install <npm-package> 安装主题包,或使用 edgepress theme create <名称> 创建空白主题。
|
|
79
|
+
- edgepress server 会启动本地 Wrangler 服务、监视源文件、重新构建变更页面、刷新浏览器,并更新 tools/page-check.md 和 tools/page-check.json。
|
|
80
|
+
- type: code
|
|
81
|
+
title: 构建、检查和部署
|
|
82
|
+
language: sh
|
|
83
|
+
code: |
|
|
84
|
+
edgepress check
|
|
85
|
+
edgepress doctor
|
|
86
|
+
edgepress deploy
|
|
87
|
+
- type: text
|
|
88
|
+
text: 兼容性检查会读取 project-compatibility.json 和 wrangler.jsonc 中的 Node.js 基线、Worker 入口和兼容日期。部署前请查看生成的报告。
|
|
89
|
+
- type: section
|
|
90
|
+
title: 将源代码上传到 GitHub
|
|
91
|
+
blocks:
|
|
92
|
+
- type: text
|
|
93
|
+
paragraphs:
|
|
94
|
+
- 在 GitHub 创建空仓库并推送 EdgePress 源代码。然后在 Cloudflare 控制台创建 Worker,并通过 Workers Builds 连接该仓库,选择 main 作为生产分支。部署前请在 wrangler.jsonc 中设置唯一的 Worker 名称。
|
|
95
|
+
- Workers Builds 会读取 package.json 中的 build 和 deploy 脚本,先运行 npm run build 生成 dist/,再运行 npm run deploy 发布 Worker。dist/ 不会提交到 Git;Cloudflare 会管理此连接的构建授权。
|
|
96
|
+
- type: code
|
|
97
|
+
title: 推送源代码仓库
|
|
98
|
+
language: sh
|
|
99
|
+
code: |
|
|
100
|
+
git init
|
|
101
|
+
git add .
|
|
102
|
+
git commit -m "Initial EdgePress site"
|
|
103
|
+
git branch -M main
|
|
104
|
+
git remote add origin https://github.com/<owner>/<repository>.git
|
|
105
|
+
git push -u origin main
|
|
106
|
+
- type: text
|
|
107
|
+
text: 本地部署时,先运行 npx wrangler login 完成 Cloudflare 身份验证,再运行 edgepress deploy。该命令会生成 dist/,并依据 wrangler.jsonc 部署 Worker。
|
|
108
|
+
- type: link-list
|
|
109
|
+
title: 部署参考
|
|
110
|
+
items:
|
|
111
|
+
- label: 将 GitHub 连接到 Cloudflare Workers Builds
|
|
112
|
+
url: https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/github-integration/
|
|
113
|
+
- label: 配置 Workers Builds 命令
|
|
114
|
+
url: https://developers.cloudflare.com/workers/ci-cd/builds/configuration/
|
|
115
|
+
- type: section
|
|
116
|
+
title: 为 OpenResty 或 Nginx 生成静态文件
|
|
117
|
+
blocks:
|
|
118
|
+
- type: text
|
|
119
|
+
paragraphs:
|
|
120
|
+
- edgepress build 和 edgepress generate 使用同一个生成流程,将静态网站写入 dist/。运行 edgepress generate 后,把 dist/ 目录内的文件上传到服务器网站根目录。如果不希望网址多出一层目录,不要把 dist/ 本身作为嵌套目录上传。
|
|
121
|
+
- OpenResty 使用 Nginx 配置语法托管静态文件。将 root 指向已上传的目录;try_files 会依次检查原始路径、目录首页和 .html 路由。生成的 403.html 与 404.html 可用于错误响应。
|
|
122
|
+
- type: code
|
|
123
|
+
title: Nginx 或 OpenResty 基础站点配置
|
|
124
|
+
language: nginx
|
|
125
|
+
code: |
|
|
126
|
+
server {
|
|
127
|
+
listen 80;
|
|
128
|
+
server_name example.org;
|
|
129
|
+
root /var/www/edgepress;
|
|
130
|
+
index index.html;
|
|
131
|
+
|
|
132
|
+
location / {
|
|
133
|
+
try_files $uri $uri/ $uri.html =404;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
error_page 403 /403.html;
|
|
137
|
+
error_page 404 /404.html;
|
|
138
|
+
}
|
|
139
|
+
- type: code
|
|
140
|
+
title: 生成上传目录
|
|
141
|
+
language: sh
|
|
142
|
+
code: edgepress generate
|
|
143
|
+
- type: notice
|
|
144
|
+
title: 仅 Worker 支持的集成
|
|
145
|
+
text: 静态托管不会运行 src/worker.js。内置 /api/ 代理和 Cloudflare Service Binding 需要部署 EdgePress Worker;否则需在当前服务器配置等效的服务端路由。不要把后端 Token 写入浏览器设置。
|
|
146
|
+
tone: warning
|
|
147
|
+
---
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Theme development
|
|
3
|
+
lang: en
|
|
4
|
+
slug: theme-development
|
|
5
|
+
description: Build EdgePress themes with shared HTML partials, CSS palettes, element layouts, and reusable error pages.
|
|
6
|
+
blocks:
|
|
7
|
+
- columns: 1
|
|
8
|
+
cells:
|
|
9
|
+
-
|
|
10
|
+
- type: hero
|
|
11
|
+
eyebrow: Theme guide
|
|
12
|
+
title: Let themes own shared layout and visual design.
|
|
13
|
+
text: Pages define row widths, element types, and content. Themes define the site shell, typography, spacing, colors, and responsive behavior.
|
|
14
|
+
- columns: 2
|
|
15
|
+
cells:
|
|
16
|
+
-
|
|
17
|
+
- type: section
|
|
18
|
+
title: Theme structure
|
|
19
|
+
tone: soft
|
|
20
|
+
blocks:
|
|
21
|
+
- type: code
|
|
22
|
+
title: Theme files
|
|
23
|
+
language: text
|
|
24
|
+
code: |
|
|
25
|
+
themes/your-theme/
|
|
26
|
+
theme.json
|
|
27
|
+
package.json
|
|
28
|
+
README.md
|
|
29
|
+
layouts/
|
|
30
|
+
layout.html
|
|
31
|
+
partials/
|
|
32
|
+
head.html
|
|
33
|
+
header.html
|
|
34
|
+
footer.html
|
|
35
|
+
assets/
|
|
36
|
+
style.css
|
|
37
|
+
- type: text
|
|
38
|
+
paragraphs:
|
|
39
|
+
- The shared layout renders every page and post. The head, header, and footer partials provide common site components. Configure the page-title suffix and separator, site title, shared navigation, language links, footer text, and component visibility in config.yml.
|
|
40
|
+
- Use double-brace placeholders for escaped values. The approved raw placeholders are generated page content, JSON-LD, and EdgePress-generated navigation markup. Keep the skip link, one main landmark, labeled navigation, visible focus, and one page-level h1.
|
|
41
|
+
- Keep the body as a full-height vertical layout and let main grow so the footer stays at the bottom on short pages.
|
|
42
|
+
-
|
|
43
|
+
- type: section
|
|
44
|
+
title: Choose a theme palette
|
|
45
|
+
tone: soft
|
|
46
|
+
blocks:
|
|
47
|
+
- type: text
|
|
48
|
+
paragraphs:
|
|
49
|
+
- Keep colors, font choices, and component styling in the selected theme stylesheet. Do not put color values in config.yml. The site content stays the same when a theme changes.
|
|
50
|
+
- List the available themes with edgepress theme list. Select one with edgepress theme use default, edgepress theme use atelier, or edgepress theme use signal.
|
|
51
|
+
- Install a published theme with edgepress theme install <npm-package>[@version]. The package must include theme.json and layouts/layout.html. EdgePress copies it into themes/ and does not run npm install scripts.
|
|
52
|
+
- Start a custom theme with edgepress theme create my-theme. This creates an npm-ready package manifest, a blank stylesheet, and accessible layout, head, header, navigation, and footer files. Edit the files, then select it with edgepress theme use my-theme. Publish from that directory with npm publish --access public.
|
|
53
|
+
- type: notice
|
|
54
|
+
title: Shared error layouts
|
|
55
|
+
text: EdgePress generates localized 403 and 404 pages through the selected theme layout. The Worker serves the matching 403 page when static asset access is denied.
|
|
56
|
+
tone: info
|
|
57
|
+
- columns: 1
|
|
58
|
+
cells:
|
|
59
|
+
-
|
|
60
|
+
- type: section
|
|
61
|
+
title: Page rows and editable elements
|
|
62
|
+
blocks:
|
|
63
|
+
- type: text
|
|
64
|
+
paragraphs:
|
|
65
|
+
- Each page and locale is a Markdown file, but the page body after front matter must stay empty. The editor data lives in its blocks YAML.
|
|
66
|
+
- "Order the data from the outside inward: set each row's columns count first, provide one cells entry per column, select an element type inside a cell, then edit that element's fields. The validator rejects mismatched column counts and empty cells."
|
|
67
|
+
- Pages do not use the post Markdown renderer. Posts remain Markdown articles and use the built-in sanitizing renderer.
|
|
68
|
+
- type: data-table
|
|
69
|
+
title: Available element families
|
|
70
|
+
headers:
|
|
71
|
+
- Element
|
|
72
|
+
- Main purpose
|
|
73
|
+
rows:
|
|
74
|
+
- - hero, section, text, heading
|
|
75
|
+
- Page structure and written content
|
|
76
|
+
- - display-text
|
|
77
|
+
- Large editorial, serif, outline, mono, or accent typography
|
|
78
|
+
- - media-text
|
|
79
|
+
- Image or captioned video paired with editable text
|
|
80
|
+
- - link-list, list, steps, code, data-table, notice
|
|
81
|
+
- Navigation, instructions, code samples, facts, and callouts
|
|
82
|
+
- - feature-grid, quote, cta, faq, latest-posts
|
|
83
|
+
- Reusable page composition
|
|
84
|
+
- - privacy-services, privacy-controller, privacy-consent, captcha, ad-slot
|
|
85
|
+
- Configuration-backed site integrations
|
|
86
|
+
- type: notice
|
|
87
|
+
title: Video captions
|
|
88
|
+
text: media-text video entries require a WebVTT captions source, language tag, and track label. Videos use native controls and preload none. A third-party video embed should remain behind an explicit consent integration.
|
|
89
|
+
tone: warning
|
|
90
|
+
- columns: 1
|
|
91
|
+
cells:
|
|
92
|
+
-
|
|
93
|
+
- type: section
|
|
94
|
+
title: Develop and preview
|
|
95
|
+
blocks:
|
|
96
|
+
- type: steps
|
|
97
|
+
items:
|
|
98
|
+
- title: Select a theme
|
|
99
|
+
text: Install or create a theme, then use the EdgePress theme command to change paths.theme in edgepress.config.mjs.
|
|
100
|
+
command: edgepress theme use your-theme
|
|
101
|
+
- title: Edit layout and CSS
|
|
102
|
+
text: Change the selected theme layout, partials, and stylesheet. Each CSS and JavaScript asset receives a content fingerprint during build.
|
|
103
|
+
- title: Preview the site
|
|
104
|
+
text: The server watches source files, rebuilds the output, refreshes the browser, and updates the accessibility and agent-friendliness report.
|
|
105
|
+
command: edgepress server
|
|
106
|
+
---
|