this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿง‘๐Ÿ’ป Display build commit on footer

Signed-off-by: Gwenn Le Bihan <gwenn.lebihan7@gmail.com>

+4 -1
+1 -1
.github/workflows/publish.yml
··· 54 54 env: 55 55 LANG: ${{ github.event.client_payload.lang }} 56 56 LOCALE: ${{ github.event.client_payload.locale }} 57 - BUILD_COMMIT: ${{ github.sha }} 57 + BUILD_COMMIT: ${{ github.event.client_payload.ref }} 58 58 59 59 - name: Save cached wakatime API response 60 60 uses: actions/cache/save@v4
+2
src/layouts/Layout.astro
··· 68 68 ) 69 69 } 70 70 </ul> 71 + 72 + <pre>{Astro.locals.commit}</pre> 71 73 </footer> 72 74 </body> 73 75 </html>
+1
src/middleware.ts
··· 5 5 export const onRequest = defineMiddleware(async ({ locals, url }, next) => { 6 6 locals.lang = process.env.LANG === "fr" ? "fr" : "en"; 7 7 locals.locale = process.env.LOCALE; 8 + locals.commit = process.env.BUILD_COMMIT; 8 9 const response = await next(); 9 10 const dom = new JSDOM(await response.text(), { 10 11 url: url.toString(),