Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangpeng96 committed Feb 6, 2024
2 parents 71137b7 + 0a40b1e commit 802ada0
Show file tree
Hide file tree
Showing 223 changed files with 13,008 additions and 27,636 deletions.
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

11 changes: 6 additions & 5 deletions .github/workflows/Typecho-dev-Ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
php:
name: PHP ${{ matrix.php }} Tests
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
php: ['7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup PHP only
uses: shivammathur/setup-php@v2
with:
Expand All @@ -30,19 +30,20 @@ jobs:
build:
name: Typecho Build
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci') && github.event_name != 'pull_request'"
if: ${{ !contains(github.event.head_commit.message, 'skip ci') && github.event_name != 'pull_request' && github.repository == 'typecho/typecho' }}
needs:
- php
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build
run: |
mkdir build
cp -r LICENSE.txt index.php install.php admin install usr var build/
mkdir build/usr/uploads/
chmod 755 build/usr/uploads/
rm -rf build/admin/src
rm -rf build/usr/themes/classic-22/static/scss
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
- name: Upload a Build Artifact
uses: WebFreak001/[email protected]
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/Typecho-hotfix-Merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Typecho Hotfix Merge

on:
pull_request:
types:
- closed
- labeled
branches:
- master

jobs:
auto-merge:
if: github.event.action == 'closed' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'fix/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Merge to dev branch
uses: devmasx/merge-branch@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
from_branch: ${{ github.event.pull_request.head.ref }}
target_branch: dev

label-merge:
if: github.event.action == 'labeled' && !startsWith(github.event.pull_request.head.ref, 'fix/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Merge to dev branch
uses: devmasx/merge-branch@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
label_name: 'merge-to-dev'
target_branch: dev
28 changes: 8 additions & 20 deletions .github/workflows/Typecho-release-Ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
name: Typecho Build Release Ci
on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build
run: |
mkdir build
cp -r LICENSE.txt index.php install.php admin install usr var build/
mkdir build/usr/uploads/
chmod 755 build/usr/uploads/
rm -rf build/admin/src
rm -rf build/usr/themes/classic-22/static/scss
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./typecho.zip
asset_name: typecho.zip
asset_content_type: application/zip
- name: Trigger langs build
- name: Trigger language build
run: |
curl -XPOST -H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ usr/themes/*
!usr/themes/classic-22
node_modules/
/tools/tmp/
/.github/ISSUE_TEMPLATE/
/.github/PULL_REQUEST_TEMPLATE/

# typechoo
.htaccess
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ Typechoo 是对 Typecho 的一些功能进行扩展和优化,以支持更多

### 更新日志

- 2021/9/29 调整后台编辑布局,主题自定义字段放到右侧选项卡,并修正复选框的 BUG
- 2021/9/24 上游更新拉取与合并
- 2020/7/13 标签增加描述功能
- 2020/7/12 上游更新拉取与合并
- 2019/2/12 摘要的段落换行用回车符号显示出来
- 2024/02/07 更新上游代码,修复已知问题
- 2021/09/29 调整后台编辑布局,主题自定义字段放到右侧选项卡,并修正复选框的 BUG
- 2021/09/24 上游更新拉取与合并
- 2020/07/13 标签增加描述功能
- 2020/07/12 上游更新拉取与合并
- 2019/02/12 摘要的段落换行用回车符号显示出来

### To-do

Expand All @@ -19,6 +20,13 @@ Typechoo 是对 Typecho 的一些功能进行扩展和优化,以支持更多
- [ ] post 类型文章支持自定义模板
- [ ] 数据库扩展,内置 CreativeCommon 版权声明

### 配置环境

* PHP 7.2.0 或更高
* 数据库支持 MySQL, SQLite, PostgreSQL
* MySQL 5.5.3 或更高
* SQLite 3.7.11 或更高
* PostgreSQL 9.1 或更高

### Typecho

Expand Down
1 change: 1 addition & 0 deletions admin/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<?php
include 'copyright.php';
include 'common-js.php';
include 'form-js.php';
?>
<script>
$('#backup-secondary .typecho-option-tabs li').click(function() {
Expand Down
4 changes: 0 additions & 4 deletions admin/common-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ function checkScroll () {
.attr('rel', 'noopener noreferrer');
});
}

$('.main form').submit(function () {
$('button[type=submit]', this).attr('disabled', 'disabled');
});
});
})();
</script>
2 changes: 1 addition & 1 deletion admin/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
\Widget\Init::alloc();

/** 注册一个初始化插件 */
\Typecho\Plugin::factory('admin/common.php')->begin();
\Typecho\Plugin::factory('admin/common.php')->call('begin');

\Widget\Options::alloc()->to($options);
\Widget\User::alloc()->to($user);
Expand Down
10 changes: 5 additions & 5 deletions admin/copyright.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
<div class="typecho-foot" role="contentinfo">
<div class="copyright">
<a href="http://typecho.org" class="i-logo-s">Typecho</a>
<p><?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s', $options->software, $options->version); ?></p>
<a href="https://typecho.org" class="i-logo-s">Typecho</a>
<p><?php _e('由 <a href="https://typecho.org">%s</a> 强力驱动, 版本 %s', $options->software, $options->version); ?></p>
</div>
<nav class="resource">
<a href="http://docs.typecho.org"><?php _e('帮助文档'); ?></a> &bull;
<a href="http://forum.typecho.org"><?php _e('支持论坛'); ?></a> &bull;
<a href="https://docs.typecho.org"><?php _e('帮助文档'); ?></a> &bull;
<a href="https://forum.typecho.org"><?php _e('支持论坛'); ?></a> &bull;
<a href="https://github.com/typecho/typecho/issues"><?php _e('报告错误'); ?></a> &bull;
<a href="http://typecho.org/download"><?php _e('资源下载'); ?></a>
<a href="https://typecho.org/download"><?php _e('资源下载'); ?></a>
</nav>
</div>
Loading

0 comments on commit 802ada0

Please sign in to comment.