Skip to content

Commit

Permalink
feat: Hexo 平台设置
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 6, 2023
1 parent 68f11e5 commit 77950ed
Show file tree
Hide file tree
Showing 12 changed files with 237 additions and 56 deletions.
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"syncWidgetRepo": "python scripts/sync_widget_repo.py"
},
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
"@terwer/esbuild-config-custom": "^1.0.12",
"@terwer/eslint-config-custom": "^1.3.6",
"@types/node": "^18.17.3",
Expand Down Expand Up @@ -61,13 +62,13 @@
"vue-router": "^4.2.4",
"xmlbuilder2": "^3.1.1",
"zhi-blog-api": "^1.20.11",
"zhi-common": "^1.11.9",
"zhi-common": "^1.11.10",
"zhi-device": "^2.3.0",
"zhi-fetch-middleware": "^0.2.9",
"zhi-github-middleware": "^0.1.6",
"zhi-fetch-middleware": "^0.2.10",
"zhi-github-middleware": "^0.1.7",
"zhi-lib-base": "^0.4.4",
"zhi-notion-markdown": "^0.1.1",
"zhi-siyuan-api": "^2.0.0",
"zhi-xmlrpc-middleware": "^0.4.4"
"zhi-siyuan-api": "^2.0.1",
"zhi-xmlrpc-middleware": "^0.4.5"
}
}
178 changes: 147 additions & 31 deletions pnpm-lock.yaml

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

5 changes: 5 additions & 0 deletions src/adaptors/api/base/CommonblogConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ export class CommonblogConfig extends BlogConfig {
*/
public usernameEnabled = false

/**
* 是否展示Token设置地址
*/
public showTokenTip = false

constructor(home: string, apiUrl: string, username: string, password: string, middlewareUrl?: string) {
super()
this.home = home
Expand Down
8 changes: 6 additions & 2 deletions src/adaptors/api/base/github/CommonGithubConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ class CommonGithubConfig extends CommonblogConfig {
githubBranch: string,
middlewareUrl?: string
) {
super("https://github.com", "", githubUsername, githubAuthToken, middlewareUrl)
super("https://github.com", "https://api.github.com", githubUsername, githubAuthToken, middlewareUrl)


this.username = githubUsername
this.password = githubAuthToken
this.usernameEnabled = true
this.password = githubAuthToken
this.passwordType = PasswordType.PasswordType_Token
this.tokenSettingUrl = "https://github.com/settings/tokens"
this.showTokenTip = true
this.previewUrl = "/[user]/[repo]/blob/[branch]/[docpath]"
this.githubRepo = githubRepo
this.githubBranch = githubBranch
this.defaultPath = "/"
Expand Down
Loading

0 comments on commit 77950ed

Please sign in to comment.