Skip to content

Commit

Permalink
Merge pull request #1534 from terwer/dev
Browse files Browse the repository at this point in the history
fix: #1530 add option for slug change
  • Loading branch information
terwer authored Dec 16, 2024
2 parents 01b9a54 + 8240285 commit 599543f
Show file tree
Hide file tree
Showing 33 changed files with 150 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 9.13.2
version: 9.15.0
run_install: false

- name: Get pnpm store directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9.13.2
version: 9.15.0
run_install: false
if: ${{ steps.release.outputs.release_created }}

Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ brew install n
sudo n 18
brew install corepack
corepack enable pnpm
corepack use pnpm@9.13.2
corepack use pnpm@9.15.0

pnpm install
```
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@types/crypto-js": "^4.2.2",
"@types/iframe-resizer": "^3.5.13",
"@types/katex": "^0.16.7",
"@types/lodash-es": "^4.17.12",
"@types/minimist": "^1.2.5",
"@types/node": "^18.19.68",
"@vitejs/plugin-vue": "^5.2.1",
Expand All @@ -58,8 +59,8 @@
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@iconify/json": "^2.2.282",
"@vueuse/components": "^11.3.0",
"@vueuse/core": "^11.3.0",
"@vueuse/components": "^12.0.0",
"@vueuse/core": "^12.0.0",
"chatgpt": "^5.2.5",
"cheerio": "1.0.0",
"cookie-parse": "^0.4.0",
Expand All @@ -75,7 +76,7 @@
"simple-xmlrpc": "^1.4.2",
"siyuan": "^1.0.7",
"telegraph.md": "^0.0.1",
"unplugin-icons": "^0.20.2",
"unplugin-icons": "^0.21.0",
"uuid": "^11.0.3",
"vue": "^3.5.13",
"vue-i18n": "^10.0.5",
Expand All @@ -93,5 +94,5 @@
"zhi-siyuan-picgo": "^1.12.1",
"zhi-xmlrpc-middleware": "^0.6.21"
},
"packageManager": "pnpm@9.13.2"
"packageManager": "pnpm@9.15.0"
}
74 changes: 37 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/adaptors/api/gitlab-hexo/gitlabhexoApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { GitlabhexoYamlConverterAdaptor } from "~/src/adaptors/api/gitlab-hexo/gitlabhexoYamlConverterAdaptor.ts"
import { CommonGitlabApiAdaptor } from "~/src/adaptors/api/base/gitlab/commonGitlabApiAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { YamlUtil } from "zhi-common"

/**
Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/gitlab-hugo/gitlabhugoApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { CommonGitlabApiAdaptor } from "~/src/adaptors/api/base/gitlab/commonGitlabApiAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { GitlabhugoYamlConverterAdaptor } from "~/src/adaptors/api/gitlab-hugo/gitlabhugoYamlConverterAdaptor.ts"
import { YamlUtil } from "zhi-common"

Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/gitlab-jekyll/gitlabjekyllApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { CommonGitlabApiAdaptor } from "~/src/adaptors/api/base/gitlab/commonGitlabApiAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { GitlabjekyllYamlConverterAdaptor } from "~/src/adaptors/api/gitlab-jekyll/gitlabjekyllYamlConverterAdaptor.ts"
import { YamlUtil } from "zhi-common"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { GitlabvitepressYamlConverterAdaptor } from "~/src/adaptors/api/gitlab-vitepress/gitlabvitepressYamlConverterAdaptor.ts"
import { CommonGitlabApiAdaptor } from "~/src/adaptors/api/base/gitlab/commonGitlabApiAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { YamlUtil } from "zhi-common"

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { CommonGitlabApiAdaptor } from "~/src/adaptors/api/base/gitlab/commonGitlabApiAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { GitlabvuepressYamlConverterAdaptor } from "~/src/adaptors/api/gitlab-vuepress/gitlabvuepressYamlConverterAdaptor.ts"
import { YamlUtil } from "zhi-common"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { Gitlabvuepress2YamlConverterAdaptor } from "~/src/adaptors/api/gitlab-vuepress2/gitlabvuepress2YamlConverterAdaptor.ts"
import { CommonGitlabApiAdaptor } from "~/src/adaptors/api/base/gitlab/commonGitlabApiAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { YamlUtil } from "zhi-common"

/**
Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/hexo/hexoApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { CommonGithubApiAdaptor } from "~/src/adaptors/api/base/github/commonGithubApiAdaptor.ts"
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { HexoYamlConverterAdaptor } from "~/src/adaptors/api/hexo/hexoYamlConverterAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { YamlUtil } from "zhi-common"

/**
Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/hugo/hugoApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import { CommonGithubApiAdaptor } from "~/src/adaptors/api/base/github/commonGithubApiAdaptor.ts"
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { HugoYamlConverterAdaptor } from "~/src/adaptors/api/hugo/hugoYamlConverterAdaptor.ts"
import {YamlUtil} from "zhi-common";

Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/jekyll/jekyllApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import { CommonGithubApiAdaptor } from "~/src/adaptors/api/base/github/commonGithubApiAdaptor.ts"
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { JekyllYamlConverterAdaptor } from "~/src/adaptors/api/jekyll/jekyllYamlConverterAdaptor.ts"
import { YamlUtil } from "zhi-common"

Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/vitepress/vitepressApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { CommonGithubApiAdaptor } from "~/src/adaptors/api/base/github/commonGithubApiAdaptor.ts"
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { VitepressYamlConverterAdaptor } from "~/src/adaptors/api/vitepress/vitepressYamlConverterAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { YamlUtil } from "zhi-common"

/**
Expand Down
4 changes: 2 additions & 2 deletions src/adaptors/api/vitepress/vitepressYamlConverterAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ class VitepressYamlConverterAdaptor extends YamlConvertAdaptor {

// 标签
const head = yamlFormatObj.yamlObj?.head
if (head && head.length == 4) {
if (head && head.length > 0) {
for (let i = 0; i < head.length; i++) {
const m = head[i]
if (m?.name === "keywords" && !StrUtil.isEmptyString(m.content)) {
post.mt_keywords = m.content?.split(" ")
post.mt_keywords = m.content?.split(" ").join(",")
break
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/vuepress/vuepressApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import { CommonGithubApiAdaptor } from "~/src/adaptors/api/base/github/commonGithubApiAdaptor.ts"
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { VuepressYamlConverterAdaptor } from "~/src/adaptors/api/vuepress/vuepressYamlConverterAdaptor.ts"
import { YamlUtil } from "zhi-common"

Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/api/vuepress2/vuepress2ApiAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { CommonGithubApiAdaptor } from "~/src/adaptors/api/base/github/commonGithubApiAdaptor.ts"
import { BlogConfig, PageTypeEnum, Post, YamlConvertAdaptor } from "zhi-blog-api"
import { Vuepress2YamlConverterAdaptor } from "~/src/adaptors/api/vuepress2/vuepress2YamlConverterAdaptor.ts"
import _ from "lodash-es"
import * as _ from "lodash-es"
import { YamlUtil } from "zhi-common"

/**
Expand Down
Loading

0 comments on commit 599543f

Please sign in to comment.