Skip to content

Commit

Permalink
删除md编辑器
Browse files Browse the repository at this point in the history
  • Loading branch information
WisteriaZy committed Dec 31, 2023
1 parent fff9eef commit ca94140
Show file tree
Hide file tree
Showing 525 changed files with 57 additions and 118,627 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/upload_html.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# update_html.py

input_file_path = 'path/to/your/input/file.txt'
output_html_path = 'path/to/your/output/index.html'
special_marker = '<!-- Custom Marker -->'

with open(input_file_path, 'r') as input_file:
file_content = input_file.read()

# 读取 HTML 文件内容
with open(output_html_path, 'r') as html_file:
html_content = html_file.read()

# 查找特殊标记
marker_index = html_content.find(special_marker)

# 如果找到了特殊标记,则在特殊标记后面添加文件内容
if marker_index != -1:
updated_html_content = (
html_content[:marker_index + len(special_marker)] +
f'\n<div>{file_content}</div>\n' +
html_content[marker_index + len(special_marker):]
)
else:
# 如果没有找到特殊标记,则在文件末尾添加文件内容
updated_html_content = html_content + f'\n<div>{file_content}</div>\n'

# 写入更新后的 HTML 内容
with open(output_html_path, 'w') as updated_html_file:
updated_html_file.write(updated_html_content)
24 changes: 24 additions & 0 deletions .github/workflows/upload_html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update HTML

on:
push:
branches:
- master

jobs:
update-html:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # 如果有依赖的话
2 changes: 1 addition & 1 deletion blog_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- 空白元素 实现占位 -->
<div class="spacer"></div>
<a href="index.html">主页</a>
<a href="blog_edit.html">写博客</a>

<a href="#">注销</a>
</div>
<!-- 这里的.container作为页面的版心 -->
Expand Down
56 changes: 0 additions & 56 deletions blog_edit.html

This file was deleted.

2 changes: 1 addition & 1 deletion blog_login.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- 空白元素 实现占位 -->
<div class="spacer"></div>
<a href="index.html">主页</a>
<a href="blog_edit.html">写博客</a>

</div>
<div class="login-container">
<div class="login-dialog">
Expand Down
47 changes: 0 additions & 47 deletions css/blog_edit.css

This file was deleted.

15 changes: 0 additions & 15 deletions editor.md/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions editor.md/.jshintrc

This file was deleted.

22 changes: 0 additions & 22 deletions editor.md/BUGS.md

This file was deleted.

Loading

0 comments on commit ca94140

Please sign in to comment.