Skip to content

Commit

Permalink
Merge pull request #73 from PysioHub/main
Browse files Browse the repository at this point in the history
fix: Git Hash
  • Loading branch information
pysio2007 authored Oct 21, 2024
2 parents 657c748 + e27fad5 commit dd5704a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const { cut } = pkg;

//Git Hash
const gitInfo = gitDescribe.gitDescribeSync();
process.env.VUE_APP_GIT_HASH = gitInfo.hash;
const gitHash = gitInfo.hash.startsWith('g') ? gitInfo.hash.slice(1) : gitInfo.hash;
process.env.VUE_APP_GIT_HASH = gitHash;

export default hopeTheme({
hostname: "https://www.pysio.online",
Expand Down Expand Up @@ -39,7 +40,7 @@ export default hopeTheme({
sidebar,

// 页脚
footer: `Pysio's Home / 蜀ICP备2023021309号-1 / <a href="https://github.com/pysio2007/Vue-blog/commit/${process.env.VUE_APP_GIT_HASH}" target="_blank" style="color: inherit; text-decoration: underline;">${process.env.VUE_APP_GIT_HASH}</a> `,
footer: `Pysio's Home / 蜀ICP备2023021309号-1 / <a href="https://github.com/pysio2007/Vue-blog/commit/${process.env.VUE_APP_GIT_HASH}" target="_blank" style="color: inherit; text-decoration: underline;">${process.env.VUE_APP_GIT_HASH}</a> `,
displayFooter: true,

// 博客相关
Expand Down

0 comments on commit dd5704a

Please sign in to comment.