Add auto linking to current git commit
This commit is contained in:
parent
ed2eafd664
commit
599a07e6c0
3 changed files with 15 additions and 5 deletions
1
.env.example
Normal file
1
.env.example
Normal file
|
@ -0,0 +1 @@
|
|||
PUBLIC_REPOURL=https://github.com/BuyMyMojo/aria.coffee/
|
|
@ -1,5 +1,11 @@
|
|||
# Wowie what a gay little website for my gay little self
|
||||
|
||||
## Setup
|
||||
|
||||
You must create a `.env` file with the contents of `.env.example` and set the URL of your repo for the commit footer.
|
||||
|
||||
Example URL: `https://github.com/BuyMyMojo/aria.coffee/` - Notice the trailing `/`, this is required
|
||||
|
||||
## Deploy steps (Pre-rendered website)
|
||||
|
||||
On dev machine:
|
||||
|
|
|
@ -2,17 +2,20 @@
|
|||
const buttonFormat = "gif";
|
||||
|
||||
import { Icon } from "astro-icon/components";
|
||||
import { execSync } from "node:child_process";
|
||||
|
||||
const commitURL = `${import.meta.env.PUBLIC_REPOURL}commit/${execSync(`git log -1 --pretty="format:%H"`)}`;
|
||||
---
|
||||
|
||||
<hr class="h-1" style="" />
|
||||
<footer class="flexcol">
|
||||
<div class="flexrow">
|
||||
<p>
|
||||
<a href="https://github.com/BuyMyMojo/aria.coffee" target="_blank"
|
||||
><Icon name="mdi:source-branch" class={"svg-inline"}/> Source Code</a
|
||||
> | <a href="https://aria.coffee/rss.xml" target="_blank"
|
||||
><Icon name="mdi:rss" class={"svg-inline"}/> RSS Feed</a
|
||||
>
|
||||
| <a href="https://github.com/BuyMyMojo/aria.coffee" target="_blank"
|
||||
> <Icon name="mdi:source-branch" class={"svg-inline"}/>Source Code</a
|
||||
> - Commit:<a href={commitURL}>{execSync(`git log -1 --pretty="format:%h"`)}</a> | <a href="https://aria.coffee/rss.xml" target="_blank"
|
||||
> <Icon name="mdi:rss" class={"svg-inline"}/>RSS Feed</a
|
||||
> |
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue