Skip to content

Commit f16ede9

Browse files
committed
【文档】更新脚本设计与工作流程文档
- 新增脚本与主程序设计分析文档(scripts.md) - 新增自动化发布工作流文档(workflow.md) - 更新 README.md 和 README_EN.md 中的说明和链接 - 在 release.yml 中添加 Pages 部署相关步骤
1 parent e4dc717 commit f16ede9

6 files changed

Lines changed: 470 additions & 48 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ jobs:
7676
cp -v index.min.html ../release/
7777
cp -v index.allinone.html ../release/
7878
cp -v index.allinone.min.html ../release/
79+
# Misc
80+
cp -v LICENSE ../release/
81+
cp -v README.md ../release/
82+
cp -v README_EN.md ../release/
83+
cp -v CONTRIBUTING.md ../release/
84+
cp -v CNAME ../release/
85+
cp -rv doc ../release/
86+
cp -rv scripts ../release/
87+
cp -rv src ../release/
7988
shell: bash
8089
working-directory: ${{ github.action_path }}
8190

@@ -87,6 +96,18 @@ jobs:
8796
tag: "v${{ steps.version-check.outputs.version }}"
8897
artifacts: "../release/index.html,../release/index.min.html,../release/index.allinone.html,../release/index.allinone.min.html"
8998

99+
- name: Setup Pages
100+
uses: actions/configure-pages@v4
101+
102+
- name: Upload artifact
103+
uses: actions/upload-pages-artifact@v3
104+
with:
105+
path: '../release'
106+
107+
- name: Deploy to GitHub Pages
108+
id: deployment
109+
uses: actions/deploy-pages@v4
110+
90111
- name: Delete tag
91112
if: (cancelled() || failure()) && steps.push-tag.outputs.tag_name != ''
92113
run: |

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
| 文件名 | 说明 |
2020
| :----- | :--- |
21-
| index.html | 默认 HTML 入口文件,使用 CDN 引入依赖。 |
22-
| index.min.html | 压缩后的 HTML 入口文件,使用 CDN 引入依赖。 |
23-
| index.allinone.html | 全合一 HTML 入口文件,默认包含所有可被脚本下载的依赖。 |
24-
| index.allinone.min.html | 压缩后的全合一 HTML 入口文件,默认包含所有可被脚本下载的依赖。 |
21+
| [index.html](index.html) | 默认 HTML 入口文件,使用 CDN 引入依赖。 |
22+
| [index.min.html](index.min.html) | 压缩后的 HTML 入口文件,使用 CDN 引入依赖。 |
23+
| [index.allinone.html](index.allinone.html) | 全合一 HTML 入口文件,默认包含所有可被脚本下载的依赖。 |
24+
| [index.allinone.min.html](index.allinone.min.html) | 压缩后的全合一 HTML 入口文件,默认包含所有可被脚本下载的依赖。 |
2525

2626
### 手动部署
2727

@@ -49,7 +49,7 @@
4949
## 代码或内容贡献
5050

5151
欢迎每一位对本项目感兴趣的朋友贡献代码和内容。
52-
请参阅[程序逻辑](doc/logic.md)。
52+
请参阅[程序逻辑](doc/logic.md)、[脚本与主程序设计分析](doc/scripts.md)和[工作流程](doc/workflow.md),并确保你的贡献符合项目规范
5353

5454
较为简单的提交贡献方法可查阅[贡献文档](CONTRIBUTING.md)以了解相关信息。
5555

README_EN.md

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ This project provides a low-dependency, one-click deployment solution for render
66

77
## Features
88

9-
- **Minimal dependencies**: Only requires a single HTML file to render Markdown web pages.
10-
- **Code highlighting**: Supports syntax highlighting for code blocks in Markdown.
11-
- **Markdown support**: Renders Markdown files to HTML.
12-
- **Mermaid support**: Renders Mermaid diagrams in Markdown.
13-
- **Multi-language support**: Provides machine translation between languages.
14-
- **Dark mode**: Supports light, dark, and system theme modes.
15-
- **Pjax support**: Enables page navigation without full refresh.
9+
- **Low Dependencies**: Only one HTML file is required to render Markdown to web pages.
10+
- **Syntax Highlighting**: Render code blocks in Markdown.
11+
- **Markdown Support**: Convert Markdown files to HTML.
12+
- **Mermaid Support**: Render Mermaid diagrams in Markdown.
13+
- **Multi-language Support**: Machine translation between multiple languages.
14+
- **Dark Mode**: Support light, dark, and system default themes.
15+
- **Pjax Support**: Page navigation without full reload.
1616

1717
## Usage
1818

19-
| Filename | Description |
20-
| :----- | :--- |
21-
| index.html | Default HTML entry file using CDN dependencies. |
22-
| index.min.html | Minified HTML entry file using CDN dependencies. |
23-
| index.allinone.html | All-in-one HTML entry file with embedded dependencies which can be downloaded by script. |
24-
| index.allinone.min.html | Minified all-in-one HTML entry file with embedded dependencies which can be downloaded by script. |
19+
| File Name | Description |
20+
| :-------- | :---------- |
21+
| [index.html](index.html) | Default HTML entry file using CDN dependencies |
22+
| [index.min.html](index.min.html) | Minified HTML entry file using CDN dependencies |
23+
| [index.allinone.html](index.allinone.html) | All-in-one HTML entry file with embedded dependencies |
24+
| [index.allinone.min.html](index.allinone.min.html) | Minified all-in-one HTML entry file with embedded dependencies |
2525

2626
### Manual Deployment
2727

28-
1. Download the required HTML file from [Releases](https://github.com/PJ-568/MARKDOWN.HTML/releases) and place it in your website root directory;
29-
2. The HTML file will automatically render `index.md` in the same directory, or `README.md` if `index.md` doesn't exist.
28+
1. Download the required HTML file from the [Releases page](https://github.com/PJ-568/MARKDOWN.HTML/releases) and place it in your website directory;
29+
2. When accessed, the HTML file will automatically render `index.md` in the same directory. If `index.md` doesn't exist, it will render `README.md`.
3030

31-
### Github Actions
31+
### GitHub Actions
3232

33-
Compiles and deploys HTML files to specified directory. Replace `<version>` with actual version number.
33+
Compile and deploy HTML files to the target directory. Replace `<version>` with the actual version number.
3434

3535
```yaml
3636
- name: Deploy markdown.html
@@ -42,45 +42,48 @@ Compiles and deploys HTML files to specified directory. Replace `<version>` with
4242
use-all-in-one: 'false'
4343
```
4444
45-
## Notes
45+
## Additional Notes
4646
47-
`This open-source project allows modifications but please retain original author information. If removal is necessary, please contact the author to avoid losing technical support.` See [License](#license) for details.
47+
`The open-source projects used in this work may be modified, but please retain the original author information. Contact the author if removal is necessary to avoid losing technical support.` For details, see [License](#license).
4848

49-
## Contributions
49+
## Contributing
5050

51-
We welcome contributions to code and content. Please refer to:
51+
We welcome contributions to this project. Please review:
5252

53-
- [Logic Documentation](doc/logic.md)
54-
- [Contribution Guidelines](CONTRIBUTING.md)
53+
- [Program Logic](doc/logic.md)
54+
- [Script Design](doc/scripts.md)
55+
- [Workflow](doc/workflow.md)
56+
57+
Ensure your contributions follow project specifications. For contribution guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md).
5558

5659
## License
5760

58-
This project is licensed under [CC BY-SA 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). For complete license information, see [`LICENSE`](LICENSE).
61+
This project is licensed under [CC BY-SA 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). The full license text is available in [`LICENSE`](LICENSE).
5962

60-
### Acknowledgments
63+
### Acknowledgements
6164

6265
#### Projects
6366

64-
|Name|License|Links|
65-
|:-:|:--|:--|
66-
|tabler-icons|[MIT License](//mit-license.org)|[Github](https://github.com/tabler/tabler-icons), [Website](https://tabler.io/icons)|
67-
|highlightjs/highlight.js|[BSD-3-Clause license](https://github.com/highlightjs/highlight.js/raw/refs/heads/main/LICENSE)|[Github](https://github.com/highlightjs/highlight.js), [Website](https://highlightjs.org)|
68-
|markedjs/marked|[marked License](https://github.com/markedjs/marked/blob/master/LICENSE.md)|[Github](https://github.com/markedjs/marked), [Website](https://marked.js.org)|
69-
|mermaidjs/mermaid|[MIT License](https://github.com/mermaid-js/mermaid/blob/develop/LICENSE)|[Github](https://github.com/mermaid-js/mermaid), [Website](https://mermaid.js.org)|
70-
|translate.js|[Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)|[Github](https://github.com/xnx3/translate), [Gitee](https://gitee.com/mail_osc/translate), [Website](https://translate.zvo.cn)|
71-
|darkmode.js|[MIT license](//mit-license.org)|[Github](https://github.com/sandoche/Darkmode.js), [Website](https://darkmodejs.learn.uno)|
72-
|MoOx/pjax|[MIT license](//mit-license.org)|[Github](https://github.com/MoOx/pjax)|
73-
|instant.page|[MIT license](//mit-license.org)|[Github](https://github.com/instantpage/instant.page), [Website](https://instant.page)|
74-
|Maple Mono|[OFL-1.1 license](https://openfontlicense.org/open-font-license-official-text/)|[Github](https://github.com/subframe7536/maple-font), [Website](https://font.subf.dev)|
67+
| Name | License | Links |
68+
| :--- | :------ | :---- |
69+
| tabler-icons | [MIT](//mit-license.org) | [GitHub](https://github.com/tabler/tabler-icons), [Website](https://tabler.io/icons) |
70+
| highlight.js | [BSD-3-Clause](https://github.com/highlightjs/highlight.js/raw/main/LICENSE) | [GitHub](https://github.com/highlightjs/highlight.js), [Website](https://highlightjs.org) |
71+
| marked | [marked License](https://github.com/markedjs/marked/blob/master/LICENSE.md) | [GitHub](https://github.com/markedjs/marked), [Website](https://marked.js.org) |
72+
| mermaid | [MIT](https://github.com/mermaid-js/mermaid/blob/develop/LICENSE) | [GitHub](https://github.com/mermaid-js/mermaid), [Website](https://mermaid.js.org) |
73+
| translate.js | [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) | [GitHub](https://github.com/xnx3/translate), [Gitee](https://gitee.com/mail_osc/translate), [Website](https://translate.zvo.cn) |
74+
| darkmode.js | [MIT](//mit-license.org) | [GitHub](https://github.com/sandoche/Darkmode.js), [Website](https://darkmodejs.learn.uno) |
75+
| pjax | [MIT](//mit-license.org) | [GitHub](https://github.com/MoOx/pjax) |
76+
| instant.page | [MIT](//mit-license.org) | [GitHub](https://github.com/instantpage/instant.page), [Website](https://instant.page) |
77+
| Maple Mono | [OFL-1.1](https://openfontlicense.org) | [GitHub](https://github.com/subframe7536/maple-font), [Website](https://font.subf.dev) |
7578

7679
#### Services
7780

78-
|Icon|Name|
79-
|:-:|:--|
80-
|-|[360 Frontend CDN](https://cdn.baomitu.com/)|
81-
|![ByteDance Static CDN](https://cdn.bytedance.com/src/res/logo.svg)|[ByteDance Static CDN](https://cdn.bytedance.com/)|
82-
|![Chinese Web Font Project](https://chinese-font.netlify.app/favicon.ico)|[Chinese Web Font Project](https://chinese-font.netlify.app)|
81+
| Icon | Service |
82+
| :--- | :------ |
83+
| - | [360 Frontend CDN](https://cdn.baomitu.com/) |
84+
| ![ByteDance CDN](https://cdn.bytedance.com/src/res/logo.svg) | [ByteDance Static CDN](https://cdn.bytedance.com/) |
85+
| ![Chinese Fonts](https://chinese-font.netlify.app/favicon.ico) | [Chinese Web Fonts](https://chinese-font.netlify.app) |
8386

84-
## Stars
87+
## Stargazers
8588

8689
[![Stargazers over time](https://starchart.cc/PJ-568/MARKDOWN.HTML.svg?variant=adaptive)](https://starchart.cc/PJ-568/MARKDOWN.HTML)

0 commit comments

Comments
 (0)