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.
Files changed (80) hide show
  1. package/README.md +70 -0
  2. package/config.yml +146 -0
  3. package/content/pages/home/en.md +84 -0
  4. package/content/pages/home/zh-cn.md +84 -0
  5. package/content/pages/plugin-development/en.md +108 -0
  6. package/content/pages/plugin-development/zh-cn.md +108 -0
  7. package/content/pages/privacy-policy/en.md +73 -0
  8. package/content/pages/privacy-policy/zh-cn.md +73 -0
  9. package/content/pages/project-introduction/en.md +88 -0
  10. package/content/pages/project-introduction/zh-cn.md +88 -0
  11. package/content/pages/quick-start/en.md +147 -0
  12. package/content/pages/quick-start/zh-cn.md +147 -0
  13. package/content/pages/theme-development/en.md +106 -0
  14. package/content/pages/theme-development/zh-cn.md +106 -0
  15. package/content/posts/2026-09-23-edgepress-on-the-edge/en.md +169 -0
  16. package/content/posts/2026-09-23-edgepress-on-the-edge/zh-cn.md +169 -0
  17. package/content/posts/2026-09-24-edgepress-release-2026-9-1/en.md +30 -0
  18. package/content/posts/2026-09-24-edgepress-release-2026-9-1/zh-cn.md +30 -0
  19. package/content/posts/2026-09-25-edgepress-release-2026-9-2/en.md +28 -0
  20. package/content/posts/2026-09-25-edgepress-release-2026-9-2/zh-cn.md +28 -0
  21. package/content/posts/2026-09-25-edgepress-release-2026-9-3/en.md +39 -0
  22. package/content/posts/2026-09-25-edgepress-release-2026-9-3/zh-cn.md +39 -0
  23. package/edgepress.config.mjs +18 -0
  24. package/languages/base/en.json +55 -0
  25. package/languages/packs/zh-CN.json +55 -0
  26. package/package.json +59 -0
  27. package/plugins/consent/index.js +40 -0
  28. package/project-compatibility.json +48 -0
  29. package/src/assets.js +181 -0
  30. package/src/build.js +277 -0
  31. package/src/cli.js +344 -0
  32. package/src/concurrency.js +26 -0
  33. package/src/config.js +396 -0
  34. package/src/content.js +160 -0
  35. package/src/generators.js +263 -0
  36. package/src/i18n.js +64 -0
  37. package/src/maintenance.js +122 -0
  38. package/src/markdown.js +65 -0
  39. package/src/page-blocks.js +350 -0
  40. package/src/page-check.js +416 -0
  41. package/src/plugin-api.js +75 -0
  42. package/src/preview.js +167 -0
  43. package/src/report-visuals.js +480 -0
  44. package/src/theme.js +161 -0
  45. package/src/worker.js +139 -0
  46. package/static/.gitkeep +0 -0
  47. package/static/edgepress/language-select.js +5 -0
  48. package/static/edgepress/plugins/advertising/google-adsense.js +26 -0
  49. package/static/edgepress/plugins/captcha/cloudflare-turnstile.js +28 -0
  50. package/static/edgepress/plugins/captcha/google-recaptcha.js +27 -0
  51. package/static/edgepress/plugins/captcha/hcaptcha.js +27 -0
  52. package/static/edgepress/plugins/consent/manager.js +180 -0
  53. package/static/edgepress/plugins/statistics/baidu-tongji.js +8 -0
  54. package/static/edgepress/plugins/statistics/cloudflare-web-analytics.js +9 -0
  55. package/static/edgepress/plugins/statistics/google-analytics.js +13 -0
  56. package/static/edgepress/plugins/tracking/google-tag-manager.js +10 -0
  57. package/static/edgepress/plugins/tracking/meta-pixel.js +18 -0
  58. package/static/edgepress/search.js +84 -0
  59. package/static/edgepress-markdown-guide.svg +21 -0
  60. package/templates/gitignore +6 -0
  61. package/templates/site-readme.md +20 -0
  62. package/themes/atelier/assets/style.css +120 -0
  63. package/themes/atelier/layouts/layout.html +17 -0
  64. package/themes/atelier/layouts/partials/footer.html +4 -0
  65. package/themes/atelier/layouts/partials/head.html +17 -0
  66. package/themes/atelier/layouts/partials/header.html +5 -0
  67. package/themes/atelier/theme.json +6 -0
  68. package/themes/default/assets/style.css +157 -0
  69. package/themes/default/layouts/layout.html +12 -0
  70. package/themes/default/layouts/partials/footer.html +4 -0
  71. package/themes/default/layouts/partials/head.html +19 -0
  72. package/themes/default/layouts/partials/header.html +5 -0
  73. package/themes/default/theme.json +6 -0
  74. package/themes/signal/assets/style.css +113 -0
  75. package/themes/signal/layouts/layout.html +12 -0
  76. package/themes/signal/layouts/partials/footer.html +4 -0
  77. package/themes/signal/layouts/partials/head.html +17 -0
  78. package/themes/signal/layouts/partials/header.html +5 -0
  79. package/themes/signal/theme.json +6 -0
  80. package/wrangler.jsonc +13 -0
@@ -0,0 +1,106 @@
1
+ ---
2
+ title: 主题开发
3
+ lang: zh-CN
4
+ slug: theme-development
5
+ description: 使用共享 HTML 局部模板、CSS 配色、页面元素布局和可复用错误页构建 EdgePress 主题。
6
+ blocks:
7
+ - columns: 1
8
+ cells:
9
+ -
10
+ - type: hero
11
+ eyebrow: 主题指南
12
+ title: 让主题负责共享布局和视觉设计。
13
+ text: 页面定义行栏数、元素类型和内容。主题负责网站外壳、字体、间距、颜色和响应式行为。
14
+ - columns: 2
15
+ cells:
16
+ -
17
+ - type: section
18
+ title: 主题结构
19
+ tone: soft
20
+ blocks:
21
+ - type: code
22
+ title: 主题文件
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
+ - 共享布局会渲染所有页面和文章。head、header 和 footer 局部模板提供常见网站组件。在 config.yml 中配置页面标题后缀与分隔符、站点标题、全站导航、语言链接、页脚内容和组件显示状态。
40
+ - 使用双花括号占位符输出经过转义的值。唯一允许的原样占位符是生成的页面内容、JSON-LD 和 EdgePress 生成的导航标记。保留跳转链接、唯一 main 主区域、带标签的导航、可见焦点和一个页面级 h1。
41
+ - 将 body 保持为全高纵向布局,并让 main 延伸,这样短页面的页脚也会留在视口底部。
42
+ -
43
+ - type: section
44
+ title: 选择主题配色
45
+ tone: soft
46
+ blocks:
47
+ - type: text
48
+ paragraphs:
49
+ - 颜色、字体选择和组件样式保存在当前主题的样式表中。不要在 config.yml 中填写颜色。切换主题不会改变页面内容。
50
+ - 使用 edgepress theme list 查看可用主题。使用 edgepress theme use default、edgepress theme use atelier 或 edgepress theme use signal 进行切换。
51
+ - 使用 edgepress theme install <npm-package>[@version] 安装 npm 上发布的主题包。包内必须包含 theme.json 和 layouts/layout.html。EdgePress 会将主题复制到 themes/,且不会运行 npm 安装脚本。
52
+ - 使用 edgepress theme create my-theme 创建可发布到 npm 的主题包骨架,其中包含 npm package.json、空白样式表、无障碍布局以及 head、header、导航和 footer 文件。编辑后使用 edgepress theme use my-theme 切换;也可以进入该目录运行 npm publish --access public 发布。
53
+ - type: notice
54
+ title: 共享错误页
55
+ text: EdgePress 使用所选主题布局生成本地化的 403 和 404 页面。静态资源被拒绝访问时,Worker 会返回对应的 403 页面。
56
+ tone: info
57
+ - columns: 1
58
+ cells:
59
+ -
60
+ - type: section
61
+ title: 页面行与可编辑元素
62
+ blocks:
63
+ - type: text
64
+ paragraphs:
65
+ - 每个页面和语言版本都是一个 Markdown 文件,但 front matter 之后必须保持空白。页面编辑数据放在 YAML blocks 中。
66
+ - 数据从外向内排列:先设每行的 columns 栏数,再为每栏设置一个 cells 项,然后在栏内选择元素类型,最后编辑该元素字段。验证器会拒绝栏数不匹配或空白的栏。
67
+ - 页面不使用文章 Markdown 渲染器。文章仍使用 Markdown 撰写,并由内置安全渲染器输出。
68
+ - type: data-table
69
+ title: 可用元素类别
70
+ headers:
71
+ - 元素
72
+ - 主要用途
73
+ rows:
74
+ - - hero、section、text、heading
75
+ - 页面结构和文字内容
76
+ - - display-text
77
+ - 编辑式、衬线、描边、等宽或强调字样
78
+ - - media-text
79
+ - 图片或带字幕视频配合可编辑文字
80
+ - - link-list、list、steps、code、data-table、notice
81
+ - 导航、说明、代码、信息和提示
82
+ - - feature-grid、quote、cta、faq、latest-posts
83
+ - 可复用页面组合
84
+ - - privacy-services、privacy-controller、privacy-consent、captcha、ad-slot
85
+ - 使用配置数据的站点集成
86
+ - type: notice
87
+ title: 视频字幕
88
+ text: media-text 视频元素需要 WebVTT 字幕源、语言标签和字幕轨道名称。视频使用浏览器原生控件并设置 preload none。第三方视频嵌入应放在明确同意后才启用的集成中。
89
+ tone: warning
90
+ - columns: 1
91
+ cells:
92
+ -
93
+ - type: section
94
+ title: 开发与预览
95
+ blocks:
96
+ - type: steps
97
+ items:
98
+ - title: 选择主题
99
+ text: 安装或创建主题后,使用 EdgePress theme 命令修改 edgepress.config.mjs 中的 paths.theme。
100
+ command: edgepress theme use your-theme
101
+ - title: 编辑布局和 CSS
102
+ text: 修改所选主题的布局、局部模板和样式表。构建时会为每个 CSS 和 JavaScript 资源生成内容指纹。
103
+ - title: 预览网站
104
+ text: server 会监视源文件、重新构建输出、刷新浏览器,并更新无障碍化和 agent 友好度报告。
105
+ command: edgepress server
106
+ ---
@@ -0,0 +1,169 @@
1
+ ---
2
+ title: "EdgePress and Markdown: a complete writing guide"
3
+ date: 2026-09-23
4
+ lang: en
5
+ slug: markdown-syntax-guide
6
+ tags:
7
+ - EdgePress
8
+ - Markdown
9
+ - writing guide
10
+ description: "A hands-on guide to the Markdown syntax EdgePress renders, including GitHub Flavored Markdown, safe HTML, nested formatting, and its supported limits."
11
+ ---
12
+
13
+ EdgePress keeps **pages** and **posts** deliberately different. Pages use ordered, editable element blocks from their Markdown front matter. Posts use the Markdown renderer, so this article is also a working reference: every example below is rendered from a real post.
14
+
15
+ The post renderer uses CommonMark with GitHub Flavored Markdown (GFM), then sanitizes the generated HTML. Use a blank line between block elements. Inline syntax can be combined inside paragraphs, list items, quotes, and table cells.
16
+
17
+ ## Headings and paragraphs
18
+
19
+ Markdown has six heading levels. A post already gets its page-level `<h1>` from its front matter title; use `##` through `######` in the body so the page keeps one clear `<h1>`.
20
+
21
+ ```markdown
22
+ # Heading level 1
23
+ ## Heading level 2
24
+ ### Heading level 3
25
+ #### Heading level 4
26
+ ##### Heading level 5
27
+ ###### Heading level 6
28
+ ```
29
+
30
+ CommonMark also has Setext headings. A line of `=` characters makes a level-one heading, and a line of `-` characters makes a level-two heading. Keep the level-one form in a code sample when the post already has its page title as `<h1>`:
31
+
32
+ ```markdown
33
+ Heading level one
34
+ =================
35
+
36
+ Heading level two
37
+ -----------------
38
+ ```
39
+
40
+ The level-two Setext form is rendered here:
41
+
42
+ Setext heading level two
43
+ ------------------------
44
+
45
+ This article uses the remaining heading levels below to demonstrate that they render as real headings.
46
+
47
+ ### A level-three heading
48
+
49
+ #### A level-four heading
50
+
51
+ ##### A level-five heading
52
+
53
+ ###### A level-six heading
54
+
55
+ A paragraph is ordinary text. Leave a blank line to start a new paragraph. A single newline in a paragraph normally becomes a space. For a hard line break, put two spaces at the end of a source line, then continue on the next line:
56
+
57
+ This line ends with a Markdown hard break.
58
+ This sentence starts on the next rendered line.
59
+
60
+ Use three hyphens, asterisks, or underscores on a line by themselves to make a thematic break:
61
+
62
+ ---
63
+
64
+ An asterisk rule:
65
+
66
+ * * *
67
+
68
+ An underscore rule:
69
+
70
+ ___
71
+
72
+ ## Emphasis, code, and characters
73
+
74
+ Use `*italic*` or `_italic_` for *emphasis*. Use `**bold**` or `__bold__` for **strong emphasis**. Combine them as `***bold and italic***`, and use `~~deleted text~~` for ~~strikethrough~~.
75
+
76
+ Backticks make `inline code`. Fence multiple lines with three backticks; add a language name for readable code highlighting hooks:
77
+
78
+ ```js
79
+ const site = { renderer: 'EdgePress', markdown: true };
80
+ console.log(`Building with ${site.renderer}`);
81
+ ```
82
+
83
+ Tildes can fence code as well:
84
+
85
+ ~~~text
86
+ This fenced block uses tildes.
87
+ ~~~
88
+
89
+ Indenting code by four spaces is also part of CommonMark:
90
+
91
+ const indented = 'four leading spaces';
92
+
93
+ To show a literal backtick, put it inside a code span marked with two backticks: `` ` ``. Markdown punctuation can be escaped with a backslash, like `\*not emphasis\*`, and character references such as `&lt;` and `&amp;` are displayed as `<` and `&`.
94
+
95
+ ## Links and images
96
+
97
+ An inline link looks like `[Quick start](/quick-start/)`. Reference links keep the destination separate: [the build guide][build-guide]. GFM recognizes a bare URL such as https://www.markdownguide.org/, an angle-bracket URL such as <https://commonmark.org>, a www.example.com address, and an email such as team@example.com. Link text should describe its destination.
98
+
99
+ [build-guide]: /quick-start/
100
+
101
+ Images use the same shape as links, with an exclamation mark and useful alternative text. This local illustration is included in the project assets:
102
+
103
+ ![A diagram showing Markdown source passing through EdgePress rendering and HTML sanitization to a published post](/edgepress-markdown-guide.svg "The EdgePress post pipeline")
104
+
105
+ ## Lists, including nested combinations
106
+
107
+ Start unordered items with `-`, `+`, or `*`; start ordered items with a number and a period. Indent child items by at least two spaces. Inline emphasis, code, and links work inside either level:
108
+
109
+ - A parent item with **strong text** and `inline code`.
110
+ 1. A numbered child with a [link to the guide](/quick-start/).
111
+ 2. Another child with *emphasis*.
112
+ - A second parent item.
113
+
114
+ GFM task-list markers render as named, non-interactive status symbols so assistive technology can announce whether a task is complete:
115
+
116
+ - [x] The finished item includes **bold text**.
117
+ - [ ] The unfinished item contains `code` and a nested child:
118
+ - [x] The nested item is complete.
119
+
120
+ Block quotes begin with `>`. Quotes can contain other block syntax, including a nested list and inline formatting:
121
+
122
+ > A quoted sentence with **bold text** and `code`.
123
+ >
124
+ > - A list nested inside the quote.
125
+ > - A second quoted list item with [a link](/project-introduction/).
126
+
127
+ You can also nest quote levels by adding another `>` at the start of a line:
128
+
129
+ > The outer quote.
130
+ >
131
+ > > The inner quote has *emphasis*.
132
+
133
+ These examples combine two or more Markdown forms in one region. The generated HTML keeps the semantic nesting: list inside a quote, list inside a list, and inline emphasis inside list items.
134
+
135
+ The `+` marker also starts an unordered list, and `1)` is another ordered-list marker:
136
+
137
+ + Another unordered item.
138
+ + A second item.
139
+
140
+ 1) An ordered item using a closing parenthesis.
141
+ 2) Its next item.
142
+
143
+ ## Tables and more GFM
144
+
145
+ Use pipes to separate table cells and hyphens for the header divider. Colons set alignment. Inline Markdown works inside cells:
146
+
147
+ | Syntax | Example | Rendered result |
148
+ | :--- | :---: | ---: |
149
+ | Emphasis | `*text*` | *text* |
150
+ | Strong | `**text**` | **text** |
151
+ | Code | `` `const x = 1` `` | `const x = 1` |
152
+
153
+ GFM also turns `www.example.com` and `https://example.com` into links, and supports the strikethrough and task-list forms shown above. Tables can scroll horizontally on narrow screens so their columns stay readable.
154
+
155
+ ## Safe inline HTML and supported limits
156
+
157
+ Small semantic HTML elements such as <kbd>Ctrl</kbd> can be useful inside Markdown. EdgePress sanitizes the resulting HTML: safe text, headings, lists, links, images, quotes, and tables are retained, while unsafe attributes and active script content are removed. This raw script is intentionally removed during the build:
158
+
159
+ <script>alert('unsafe');</script>
160
+
161
+ Use a page's media-text element for video; embedded frames and arbitrary scripts are not allowed in posts.
162
+
163
+ This is the complete enabled post dialect: CommonMark block and inline syntax plus GFM tables, autolinks, task lists, and strikethrough. Extensions such as footnotes, math notation, Mermaid diagrams, underline syntax, and definition lists are not enabled by this project. They remain ordinary text unless you add a trusted renderer extension.
164
+
165
+ ## Writing posts in EdgePress
166
+
167
+ Create a post directory under `content/posts/` with one lowercase locale file such as `en.md` or `zh-cn.md`. Keep the `lang` front matter value matched to the locale filename. Add title, date, slug, tags, and an optional description above the Markdown body. Then run `edgepress build` to render the post, or `edgepress check` to build the site and generate the accessibility, agent-friendliness, responsive screenshot, and Markdown-rendering report.
168
+
169
+ The local article search reads the generated `search.json` file from this site and searches post titles and text in the browser. It does not send a query to a third-party service.
@@ -0,0 +1,169 @@
1
+ ---
2
+ title: "EdgePress 与 Markdown:完整写作指南"
3
+ date: 2026-09-23
4
+ lang: zh-CN
5
+ slug: markdown-syntax-guide
6
+ tags:
7
+ - EdgePress
8
+ - Markdown
9
+ - 写作指南
10
+ description: "通过可直接查看的示例,了解 EdgePress 支持的 Markdown、GitHub Flavored Markdown、安全 HTML、嵌套语法和功能边界。"
11
+ ---
12
+
13
+ EdgePress 对 **pages(页面)** 和 **posts(文章)** 采用不同的编辑方式。页面在 Markdown 前置资料中配置有序、可编辑的元素块;文章则使用 Markdown 渲染器。本文本身就是一篇实际渲染的文章,可作为语法参考。
14
+
15
+ 文章渲染器使用 CommonMark 与 GitHub Flavored Markdown(GFM),随后会清理生成的 HTML。块级内容之间留一个空行;行内语法可以组合在段落、列表、引用和表格单元格中。
16
+
17
+ ## 标题与段落
18
+
19
+ Markdown 有六级标题。文章页面的 `<h1>` 已由前置资料中的标题生成;正文使用 `##` 到 `######`,让页面始终只有一个明确的 `<h1>`。
20
+
21
+ ```markdown
22
+ # 一级标题
23
+ ## 二级标题
24
+ ### 三级标题
25
+ #### 四级标题
26
+ ##### 五级标题
27
+ ###### 六级标题
28
+ ```
29
+
30
+ CommonMark 还支持 Setext 标题:在标题下一行写 `=` 可以生成一级标题,写 `-` 可以生成二级标题。如果文章标题已经生成 `<h1>`,请只在正文使用二级形式;一级写法留在代码示例中。
31
+
32
+ ```markdown
33
+ 一级 Setext 标题
34
+ =================
35
+
36
+ 二级 Setext 标题
37
+ -----------------
38
+ ```
39
+
40
+ 下面实际渲染一个二级 Setext 标题:
41
+
42
+ Setext 二级标题示例
43
+ -------------------
44
+
45
+ 下面实际使用其余标题级别,便于确认它们会变成 HTML 标题元素。
46
+
47
+ ### 三级标题示例
48
+
49
+ #### 四级标题示例
50
+
51
+ ##### 五级标题示例
52
+
53
+ ###### 六级标题示例
54
+
55
+ 普通文字组成段落。空一行就会开始新段落。段落中的单个换行通常会折叠成空格。要强制换行,在 Markdown 源文件的行尾加两个空格,再从下一行继续:
56
+
57
+ 这一行用 Markdown 硬换行结束。
58
+ 这句话会显示在下一行。
59
+
60
+ 单独一行写三个连字符、星号或下划线可以生成分隔线:
61
+
62
+ ---
63
+
64
+ 星号分隔线:
65
+
66
+ * * *
67
+
68
+ 下划线分隔线:
69
+
70
+ ___
71
+
72
+ ## 强调、代码与字符
73
+
74
+ 用 `*斜体*` 或 `_斜体_` 表示 *强调*;用 `**粗体**` 或 `__粗体__` 表示 **加重强调**。也可以组合为 `***粗斜体***`,并用 `~~删除线~~` 表示 ~~删除文字~~。
75
+
76
+ 反引号用于 `行内代码`。多行代码用三个反引号包起来,也可以标注语言,供代码样式使用:
77
+
78
+ ```js
79
+ const site = { renderer: 'EdgePress', markdown: true };
80
+ console.log(`Building with ${site.renderer}`);
81
+ ```
82
+
83
+ 也可以使用波浪号围住代码:
84
+
85
+ ~~~text
86
+ 这个围栏代码块使用波浪号。
87
+ ~~~
88
+
89
+ CommonMark 也支持每行缩进四个空格的代码块:
90
+
91
+ const indented = '前面有四个空格';
92
+
93
+ 要显示反引号本身,可用两个反引号包住单个反引号:`` ` ``。反斜线可以转义 Markdown 标点,例如 `\*这不是斜体\*`;字符实体 `&lt;` 和 `&amp;` 会分别显示为 `<` 和 `&`。
94
+
95
+ ## 链接与图片
96
+
97
+ 行内链接写作 `[快速入门](/quick-start/)`。也可以把目标地址集中写在文末,例如[构建指南][build-guide]。GFM 会自动识别 https://www.markdownguide.org/ 这样的裸网址、<https://commonmark.org> 这样的尖括号网址、www.example.com 和 team@example.com 这样的邮箱。链接文字应当说明目标内容。
98
+
99
+ [build-guide]: /quick-start/
100
+
101
+ 图片与链接格式相同,只需在前面加感叹号,并提供有意义的替代文字。下图是项目本地资源:
102
+
103
+ ![Markdown 源文件依次经过 EdgePress 渲染与 HTML 清理,生成发布文章的流程图](/edgepress-markdown-guide.svg "EdgePress 文章生成流程")
104
+
105
+ ## 列表与嵌套组合
106
+
107
+ 无序列表项以 `-`、`+` 或 `*` 开头;有序列表项以数字和句点开头。子项目缩进至少两个空格。两种列表都可以包含强调、代码和链接:
108
+
109
+ - 父项目含有 **粗体文字** 和 `行内代码`。
110
+ 1. 编号子项目中有一个[指南链接](/quick-start/)。
111
+ 2. 另一个子项目含有 *斜体*。
112
+ - 第二个父项目。
113
+
114
+ GFM 任务列表会显示带有无障碍名称的静态状态符号,屏幕阅读器可以读出任务是否完成:
115
+
116
+ - [x] 已完成事项包含 **粗体文字**。
117
+ - [ ] 未完成事项包含 `代码`,并有嵌套子项:
118
+ - [x] 该嵌套事项已经完成。
119
+
120
+ 引用行以 `>` 开头。引用内容也可以嵌套其他块级语法,例如列表,以及行内强调:
121
+
122
+ > 引用句子中包含 **粗体文字** 和 `代码`。
123
+ >
124
+ > - 引用内部的列表项。
125
+ > - 第二个引用列表项中包含[链接](/project-introduction/)。
126
+
127
+ 在每行前再增加一个 `>`,可以嵌套引用层级:
128
+
129
+ > 外层引用。
130
+ >
131
+ > > 内层引用包含 *斜体*。
132
+
133
+ 这些示例把多种 Markdown 写法放在同一区域。生成的 HTML 会保留语义嵌套:引用中有列表、列表中有列表、列表项中有行内强调。
134
+
135
+ 无序列表还可以用 `+` 开头,有序列表项也可以写作 `1)`:
136
+
137
+ + 另一种无序列表项。
138
+ + 第二个项目。
139
+
140
+ 1) 使用右括号的有序项目。
141
+ 2) 下一项。
142
+
143
+ ## 表格与其他 GFM 语法
144
+
145
+ 用竖线分隔单元格,用连字符分隔表头。冒号用于设置对齐方式。单元格也支持行内 Markdown:
146
+
147
+ | 语法 | 写法 | 渲染结果 |
148
+ | :--- | :---: | ---: |
149
+ | 强调 | `*文字*` | *文字* |
150
+ | 加重 | `**文字**` | **文字** |
151
+ | 代码 | `` `const x = 1` `` | `const x = 1` |
152
+
153
+ GFM 也会把 `www.example.com` 与 `https://example.com` 转换成链接,并支持上文的删除线和任务列表。窄屏幕上的表格可以横向滚动,列内容仍清晰可读。
154
+
155
+ ## 安全行内 HTML 与支持范围
156
+
157
+ 像 <kbd>Ctrl</kbd> 这样的简短语义 HTML 元素可以放进 Markdown。EdgePress 会清理生成的 HTML:保留安全文字、标题、列表、链接、图片、引用和表格;移除不安全属性和可执行脚本。下面这段原始脚本会在构建时被移除:
158
+
159
+ <script>alert('unsafe');</script>
160
+
161
+ 视频请使用页面的「媒体与文字」元素;文章不允许嵌入框架或任意脚本。
162
+
163
+ 本项目启用的文章语法范围是:CommonMark 的块级和行内语法,加上 GFM 表格、自动链接、任务列表与删除线。脚注、数学公式、Mermaid 图表、下划线语法和定义列表等扩展没有启用;除非添加受信任的渲染扩展,否则它们会作为普通文字显示。
164
+
165
+ ## 在 EdgePress 中写文章
166
+
167
+ 在 `content/posts/` 下为每篇文章建立目录,并放入 `en.md` 或 `zh-cn.md` 这样的语言文件。前置资料中的 `lang` 值必须与文件名匹配。添加标题、日期、网址别名、标签和可选摘要,再在前置资料之后编写 Markdown 正文。运行 `edgepress build` 生成文章;运行 `edgepress check` 则会构建网站,并输出无障碍、Agent 友好度、移动端截图与 Markdown 渲染报告。
168
+
169
+ 本地文章搜索在浏览器中读取网站生成的 `search.json`,搜索文章标题和正文,不会把搜索词发送给第三方服务。
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: EdgePress September 2026 update
3
+ date: 2026-09-24
4
+ lang: en
5
+ tags:
6
+ - release
7
+ - page builder
8
+ - accessibility
9
+ ---
10
+ This is the first requested release update for September 2026.
11
+
12
+ ## Editable page layouts
13
+
14
+ Pages now use an outside-in layout model. Set a row's column count, add one cell for each column, choose element types inside each cell, and write the element content in that page's localized Markdown front matter. Posts continue to use Markdown rendering.
15
+
16
+ New elements pair images or captioned video with text, and provide display typography styles. Theme stylesheets own colors and visual treatment.
17
+
18
+ ## Shared site components
19
+
20
+ All pages use the selected theme's shared head, navigation, and footer partials. The same layout generates localized 403 and 404 pages. Site metadata, component visibility, navigation labels, and footer copy are configured in config.yml. Theme selection uses edgepress theme.
21
+
22
+ ## Plugins and backend requests
23
+
24
+ The guides now cover consent-gated tracking, statistics, advertising, and human-verification providers, alongside trusted build-time plugins. A generic Worker proxy can forward /api/v1/* requests through a Service Binding or an HTTPS URL and a Worker secret. The backend must still validate and authorize every request.
25
+
26
+ ## Live preview and review report
27
+
28
+ edgepress server watches source files, rebuilds the site, refreshes the browser, and updates the accessibility and agent-friendliness report. edgepress check also captures desktop and mobile screenshots and writes tools/page-check.pdf with Markdown and JSON summaries.
29
+
30
+ The automated report checks generated markup and metadata. It does not establish legal compliance or replace manual keyboard, contrast, or assistive-technology review.
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: EdgePress 2026 年 9 月更新
3
+ date: 2026-09-24
4
+ lang: zh-CN
5
+ tags:
6
+ - 发布
7
+ - 页面构建器
8
+ - 无障碍
9
+ ---
10
+ 这是 2026 年 9 月针对本次需求的第一次更新。
11
+
12
+ ## 可编辑页面布局
13
+
14
+ 页面现在采用由外向内的布局模式:先设置每行栏数,为每栏添加一个单元格,再在单元格内选择元素类型,并在该语言页面的 Markdown 前置数据中填写元素内容。文章继续使用 Markdown 渲染。
15
+
16
+ 新增的元素支持图片或带字幕的视频搭配文字,以及多种艺术字样式。颜色和视觉表现由主题样式表负责。
17
+
18
+ ## 共享站点组件
19
+
20
+ 所有页面都复用所选主题的 head、导航和页脚局部模板。相同布局也会生成本地化 403 和 404 页面。站点元数据、组件显示状态、导航标签和页脚文案在 config.yml 中配置。使用 edgepress theme 切换主题。
21
+
22
+ ## 插件与后端请求
23
+
24
+ 开发指南现已涵盖遵循同意设置的跟踪、统计、广告、人机验证服务,以及可信构建插件。通用 Worker 代理可以通过 Service Binding,或 HTTPS URL 加 Worker 密钥转发 /api/v1/* 请求。后端仍需验证每项请求并执行授权。
25
+
26
+ ## 实时预览与审核报告
27
+
28
+ edgepress server 会监视源文件、重新构建网站、刷新浏览器,并更新无障碍化和 agent 友好度报告。edgepress check 还会捕获桌面与移动页面截图,并生成 tools/page-check.pdf,以及 Markdown 和 JSON 摘要。
29
+
30
+ 自动报告检查生成的标记和元数据,但不能证明符合特定法律,也不能取代键盘、对比度或辅助技术的人工审核。
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: "EdgePress September 2026 update: request 2"
3
+ date: 2026-09-25
4
+ lang: en
5
+ slug: edgepress-release-2026-9-2
6
+ tags:
7
+ - release
8
+ - responsive design
9
+ - Markdown
10
+ ---
11
+
12
+ This is the second requested EdgePress update for September 2026.
13
+
14
+ ## Mobile layouts and language selection
15
+
16
+ Themes now keep long article content, tables, code blocks, navigation, and page elements within narrow screens. The audit captures mobile views and compares the measured document width with the viewport. The header's language links are now a compact, keyboard-operable dropdown that opens the same route in the selected language.
17
+
18
+ ## Markdown guide and local article search
19
+
20
+ The first post is now a bilingual, rendered guide to EdgePress posts and the supported CommonMark and GFM syntax. It covers nested lists and quotes, task markers, tables, code, links, images, sanitized inline HTML, and unsupported extensions. The report checks those rendered features in both language versions.
21
+
22
+ Visitors can search article titles and full post text using the generated local search index. Search runs in the browser and filters posts only.
23
+
24
+ ## Accessible content report
25
+
26
+ The report now includes individual post results and screenshots for posts and pages. Its HTML uses headings, landmarks, labeled tables, linkable sections, image descriptions, and a tagged PDF with a document outline when the installed browser supports it. Mobile viewport and document widths appear beside each screenshot.
27
+
28
+ Run `edgepress check` to rebuild the site, review the report, and inspect the generated Markdown syntax checks and responsive evidence.
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: EdgePress 2026 年 9 月更新:第 2 次需求
3
+ date: 2026-09-25
4
+ lang: zh-CN
5
+ slug: edgepress-release-2026-9-2
6
+ tags:
7
+ - 发布
8
+ - 移动端适配
9
+ - Markdown
10
+ ---
11
+
12
+ 这是 EdgePress 在 2026 年 9 月针对第 2 次需求的更新。
13
+
14
+ ## 移动布局与语言选择
15
+
16
+ 主题现在会让较长的文章内容、表格、代码块、导航和页面元素适应窄屏幕。审核工具会捕获移动视图,并比较页面文档宽度与视口宽度。页头语言链接改为紧凑的下拉菜单,可以使用键盘操作,并在切换语言时前往当前页面的对应语言版本。
17
+
18
+ ## Markdown 指南与本地文章搜索
19
+
20
+ 第一篇文章现为双语指南,逐项展示 EdgePress 文章支持的 CommonMark 和 GFM 语法。内容包括嵌套列表与引用、任务标记、表格、代码、链接、图片、经过清理的行内 HTML,以及未启用的扩展。报告会检查两种语言页面的实际渲染结果。
21
+
22
+ 访客可以使用本地生成的搜索索引查询文章标题和全文。搜索在浏览器中运行,只会匹配文章。
23
+
24
+ ## 无障碍报告
25
+
26
+ 报告现在逐篇列出文章结果,并附上文章与页面截图。报告 HTML 使用标题、页面地标、有表头的表格、可跳转章节和图片说明;若浏览器支持,也会生成带文档大纲的标签 PDF。每张移动截图旁会列出视口与页面文档宽度。
27
+
28
+ 运行 `edgepress check` 可构建网站、查看报告、检查 Markdown 语法结果和响应式截图。
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: "EdgePress September 2026 update: request 3"
3
+ date: 2026-09-25
4
+ lang: en
5
+ slug: edgepress-release-2026-9-3
6
+ tags:
7
+ - release
8
+ - npm
9
+ - themes
10
+ ---
11
+
12
+ This is the third requested EdgePress update for September 2026.
13
+
14
+ ## Install EdgePress from npm
15
+
16
+ EdgePress is published as the `edgepress` package. Start a site by installing the package, initializing an empty folder, installing the generated site dependencies, then opening the local preview:
17
+
18
+ ```sh
19
+ npm install edgepress
20
+ edgepress init
21
+ npm install
22
+ edgepress server
23
+ ```
24
+
25
+ The initializer keeps an existing `package.json` name and scripts, then adds the EdgePress commands and runtime dependencies.
26
+
27
+ ## Install or create themes
28
+
29
+ Install a theme package with `edgepress theme install <npm-package>[@version]`. EdgePress copies the theme into `themes/` and skips package install scripts. Switch among installed themes with `edgepress theme list` and `edgepress theme use <name>`.
30
+
31
+ Run `edgepress theme create my-theme` to generate a blank npm-ready custom theme package. It includes a shared HTML shell, editable head, header, navigation and footer partials, a required accessible structure, and an empty stylesheet for the theme's colors and responsive design.
32
+
33
+ ## Deploy from GitHub or upload static files
34
+
35
+ The quick-start guide explains how to push the source to GitHub and connect it to Cloudflare Workers Builds. The package's build and deploy scripts let Cloudflare generate the static files and publish the Worker on pushes to the production branch. Local deployment uses `edgepress deploy`.
36
+
37
+ The GitHub README includes Cloudflare's one-click Worker deployment button for this public repository.
38
+
39
+ `edgepress build` and `edgepress generate` share one generator. Upload the contents of `dist/` to an OpenResty or Nginx document root to serve the static pages. Worker API routes and service bindings still need a Worker or an equivalent server-side route.
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: EdgePress 2026 年 9 月更新:第 3 次需求
3
+ date: 2026-09-25
4
+ lang: zh-CN
5
+ slug: edgepress-release-2026-9-3
6
+ tags:
7
+ - 发布
8
+ - npm
9
+ - 主题
10
+ ---
11
+
12
+ 这是 EdgePress 在 2026 年 9 月针对第 3 次需求的更新。
13
+
14
+ ## 从 npm 安装 EdgePress
15
+
16
+ EdgePress 已发布为 `edgepress` 包。安装包后,在空目录中初始化项目,再安装生成的网站依赖并启动本地预览:
17
+
18
+ ```sh
19
+ npm install edgepress
20
+ edgepress init
21
+ npm install
22
+ edgepress server
23
+ ```
24
+
25
+ 初始化器会保留现有 `package.json` 中的项目名称和脚本,并补入 EdgePress 命令与运行依赖。
26
+
27
+ ## 安装或创建主题
28
+
29
+ 使用 `edgepress theme install <npm-package>[@version]` 安装 npm 主题包。EdgePress 会将主题复制到 `themes/`,且不会运行包的安装脚本。使用 `edgepress theme list` 查看已安装主题,再用 `edgepress theme use <name>` 切换。
30
+
31
+ 运行 `edgepress theme create my-theme` 可生成可发布到 npm 的空白自定义主题包,包含共享 HTML 外壳、可编辑的 head、header、导航和 footer 局部模板、必要的无障碍结构,以及用于自定义配色和响应式设计的空白样式表。
32
+
33
+ ## 从 GitHub 部署或上传静态文件
34
+
35
+ 快速入门指南现已说明如何将源代码推送到 GitHub 并连接 Cloudflare Workers Builds。Cloudflare 会使用项目的 build 与 deploy 脚本,在推送到生产分支时生成静态文件并发布 Worker。本地部署可运行 `edgepress deploy`。
36
+
37
+ GitHub 仓库 README 现已加入 Cloudflare 官方的一键 Worker 部署按钮。
38
+
39
+ `edgepress build` 与 `edgepress generate` 使用同一生成器。将 `dist/` 内的文件上传到 OpenResty 或 Nginx 网站根目录即可托管静态页面。Worker API 路由和 Service Binding 仍需部署 Worker,或在当前服务器配置等效服务端路由。
@@ -0,0 +1,18 @@
1
+ export default {
2
+ paths: {
3
+ content: "content",
4
+ static: "static",
5
+ theme: "themes/default",
6
+ output: "dist",
7
+ cache: ".edgepress"
8
+ },
9
+ permalink: "/:year/:month/:slug/",
10
+ pagination: { perPage: 10 },
11
+ markdown: { gfm: true, breaks: false },
12
+ i18n: {
13
+ defaultLocale: "en",
14
+ languagePacks: ["zh-CN"]
15
+ },
16
+ concurrency: 8,
17
+ plugins: ["plugins/consent/index.js"]
18
+ };