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
|
# 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)
|
## Deploy steps (Pre-rendered website)
|
||||||
|
|
||||||
On dev machine:
|
On dev machine:
|
||||||
|
|
|
@ -2,17 +2,20 @@
|
||||||
const buttonFormat = "gif";
|
const buttonFormat = "gif";
|
||||||
|
|
||||||
import { Icon } from "astro-icon/components";
|
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="" />
|
<hr class="h-1" style="" />
|
||||||
<footer class="flexcol">
|
<footer class="flexcol">
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<p>
|
<p>
|
||||||
<a href="https://github.com/BuyMyMojo/aria.coffee" target="_blank"
|
| <a href="https://github.com/BuyMyMojo/aria.coffee" target="_blank"
|
||||||
> <Icon name="mdi:source-branch" class={"svg-inline"}/>Source Code</a
|
> <Icon name="mdi:source-branch" class={"svg-inline"}/>Source Code</a
|
||||||
> | <a href="https://aria.coffee/rss.xml" target="_blank"
|
> - 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
|
> <Icon name="mdi:rss" class={"svg-inline"}/>RSS Feed</a
|
||||||
>
|
> |
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue