Skip to content

Commit

Permalink
refactor: 优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse205 committed Apr 16, 2024
1 parent 50cfcdd commit 17939b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ const originDoc: { [variant: string]: OriginDocConfig } = {

const MATCH_RELEASE_REG = /- \[(v[\d.]*)\]\((\d*).md\)/g

function getCommitHtml(config: OriginDocConfig): string {
function getCommitHtmlLink(config: OriginDocConfig): string {
return `<a href="${config.url}/commit/${config.commit}" target="_blank"><code>${config.commit}</code></a>`
}

const footerMessage = `<span class="vp-doc">
<span>
原始 Magisk 文档版本: ${originDoc.magisk.date} ${getCommitHtml(originDoc.magisk)}<br/>
原始 Magisk Delta 文档版本: ${originDoc.delta.date} ${getCommitHtml(originDoc.delta)}<br/>
在 GPL-3.0 许可下发布
原始 Magisk 文档版本: ${originDoc.magisk.date} ${getCommitHtmlLink(originDoc.magisk)}<br/>
原始 Magisk Delta 文档版本: ${originDoc.delta.date} ${getCommitHtmlLink(originDoc.delta)}<br/>
在 GPL-3.0 许可下发布
</span>
</span>`
</span>`

const base = '/MagiskChineseDocument/'

Expand Down

0 comments on commit 17939b3

Please sign in to comment.