Skip to content

Commit

Permalink
fix: hexo 深度优化
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 29, 2023
1 parent 3b14292 commit 596c09e
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 41 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ Support features such as fast publishing, image bed management, platform expansi

Attention:

1. Important notice from GitHub-related platforms: Deployment is only supported for source code. Deployment is only supported for source code. Deployment is only supported for source code. It's emphasized for clarity.
Note:

2. This plugin undergoes frequent updates. To prevent unpredictable errors due to program caching, please follow the process of `uninstalling` first and then `reinstalling` for updates.
1. GitHub and related platforms specifically emphasize: Only support source code deployment, only support source code deployment, only support source code deployment. Important matters are stated three times.

3. **In case of plugin malfunction due to configuration issues**, please back up `[workspace]/data/storage/syp/sy-p-plus-cfg.json` and then delete it. This configuration file will be automatically initialized upon first use. **Please refrain from performing this action when the plugin is functional**.
2. This plugin undergoes frequent iterations. To prevent unpredictable errors caused by program caching, please use the method of `uninstalling` first and then `reinstalling` for updates.

3. **If the configuration is abnormally set, causing this plugin to be completely unusable**, please backup `[workspace]/data/storage/syp/sy-p-plus-cfg.json`, and then delete it. This configuration file will be automatically initialized on first use.

**When performing this operation, it is best to close Joplin first, then delete the configuration, and then open it again. This is to prevent data from being read while open, leading to overwrite and save.**

**Please avoid performing this operation if the plugin is functioning properly.**

> Do you have other questions or suggestions? Please join QQ group `895063267` for discussion.
## Update history

Expand Down
2 changes: 2 additions & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

**能用的情况下请勿进行此操作。**

> 还有其他问题或者需求建议?请加QQ群 `895063267` 讨论。
## 更新历史

请直接查看 [CHANGELOG](./CHANGELOG.md)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"pinia": "^2.1.6",
"shorthash2": "^1.0.3",
"simple-xmlrpc": "^1.4.2",
"siyuan": "^0.8.1",
"siyuan": "^0.8.2",
"siyuan-plugin-picgo": "^1.4.4",
"uuid": "^9.0.0",
"vue": "^3.3.4",
Expand Down
47 changes: 21 additions & 26 deletions pnpm-lock.yaml

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

11 changes: 6 additions & 5 deletions src/appInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ import { create } from "xmlbuilder2"
* 应用实例
*/
export class AppInstance {
public logger
public deviceType
public logger: any
public deviceType: any

public fetch
public xmlbuilder2
public simpleXmlrpc
public fetch: any
public xmlbuilder2: any
public simpleXmlrpc: any
public CommonFetchClient: any

constructor() {
this.logger = createAppLogger("app-instance")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { createAppLogger } from "~/src/utils/appLogger.ts"
import { AppInstance } from "~/src/appInstance.ts"
import { useVueI18n } from "~/src/composables/useVueI18n.ts"
import { useSettingStore } from "~/src/stores/useSettingStore.ts"
import { computed, onMounted, reactive, ref, toRaw, triggerRef, watch } from "vue"
import { onMounted, reactive, ref, toRaw, watch } from "vue"
import { DynamicConfig, DynamicJsonCfg, getDynCfgByKey, setDynamicJsonCfg } from "~/src/platforms/dynamicConfig.ts"
import { SypConfig } from "~/syp.config.ts"
import { CommonBlogConfig } from "~/src/adaptors/api/base/commonBlogConfig.ts"
Expand Down Expand Up @@ -80,7 +80,6 @@ const formData = reactive({
setting: {} as typeof SypConfig,
dynamicConfigArray: [] as DynamicConfig[],
useSiyuanApi: false,
isInit: false,
})
Expand Down Expand Up @@ -242,7 +241,6 @@ const initConf = async () => {
onMounted(async () => {
// 初始化
await initConf()
formData.useSiyuanApi = isStorageViaSiyuanApi()
formData.isInit = true
})
</script>
Expand Down Expand Up @@ -349,7 +347,7 @@ onMounted(async () => {
</el-select>
</el-form-item>
<!-- 跨域代理地址 -->
<el-form-item v-if="!formData.useSiyuanApi" :label="t('setting.blog.middlewareUrl')">
<el-form-item :label="t('setting.blog.middlewareUrl')">
<el-input v-model="formData.cfg.middlewareUrl" :placeholder="t('setting.blog.middlewareUrl.tip')" />
<el-alert
:closable="false"
Expand Down Expand Up @@ -394,4 +392,4 @@ onMounted(async () => {
.inline-tip
margin 0
padding-left 0
</style>
</style>
2 changes: 1 addition & 1 deletion src/locales/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export default {
"setting.blog.middlewareUrl": "跨域请求代理",
"setting.blog.middlewareUrl.tip": "某些场景下需要(例如自部署模式,Nginx伺服等、vite开发环境伺服等),其他情况可忽略",
"setting.blog.middlewareUrl.my.tip":
"如果没有部署代理,可以使用我的共享地址:https://api.terwer.space/api/middleware 。出于性能考虑,建议自己部署一份,请使用 https://github.com/terwer/node-metaweblog-api-adaptor 进行部署。",
"大部分情况下不需要,部分场景在浏览器环境下可能需要。如果没有部署代理,可以使用我的共享地址:https://api.terwer.space/api/middleware 。出于性能考虑,建议自己部署一份,请使用 https://github.com/terwer/node-metaweblog-api-adaptor 进行部署。",
"setting.conf.export": "导出配置",
"setting.conf.import": "导入配置",
"setting.conf.transport": "导入导出",
Expand Down

0 comments on commit 596c09e

Please sign in to comment.