File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { usePageHead } from " @/script/routing"
3+ import { computed } from " vue"
4+
5+ const hash = computed (() => import .meta .env .VITE_GIT_COMMIT_HASH )
6+ const commitUrl = computed (() => ` https://github.com/BloomyInDev/Portfolio/commit/${hash .value } ` )
37
48usePageHead ()
59 </script >
@@ -17,6 +21,12 @@ usePageHead()
1721 Vous pouvez également obtenir un lien pour mon CV
1822 <a href =" /cvWebBastienLuben.pdf" target =" _blank" >ici</a >.
1923 </p >
24+ <p >Ce site a été développé par Bastien LUBEN en utilisant Vite et Vue.js.</p >
25+ <p >
26+ Le code source est disponible sur
27+ <a href =" https://github.com/BloomyInDev/Portfolio" target =" _blank" >GitHub</a >. Hash de
28+ commit: <a :href =" commitUrl" >{{ hash }}</a >
29+ </p >
2030 </section >
2131</template >
2232
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ import vueDevTools from "vite-plugin-vue-devtools"
77
88import { projects } from "./src/script/projects"
99import type { CustomRouteMetadata } from "./src/types"
10+ import type { RouteRecordRaw } from "vue-router"
11+
12+ import * as child from "child_process"
13+
14+ process . env . VITE_GIT_COMMIT_HASH = child . execSync ( "git rev-parse --short HEAD" ) . toString ( )
1015
1116// https://vite.dev/config/
1217export default {
@@ -20,8 +25,8 @@ export default {
2025 } ,
2126 } ,
2227 ssgOptions : {
23- includedRoutes ( _paths , routes ) {
24- return routes . flatMap ( ( route ) => {
28+ includedRoutes : ( _paths , routes : Readonly < RouteRecordRaw [ ] > ) => {
29+ return routes . flatMap ( ( route : RouteRecordRaw ) => {
2530 return ( route . meta as CustomRouteMetadata ) . dontPregenerate
2631 ? [ ]
2732 : route . name == "project-detail"
You can’t perform that action at this time.
0 commit comments