Compare commits
6 Commits
ac9ab52d63
...
senpai
| Author | SHA1 | Date | |
|---|---|---|---|
| 68759887c0 | |||
| ce958e93fb | |||
| 17dc8342cb | |||
| a88e284c1e | |||
| 32a150c0ce | |||
| 5258627fa9 |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.md linguist-language=Astro
|
||||||
|
*.mdx linguist-language=Astro
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy Astro
|
name: Deploy Dev Website
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -9,13 +9,13 @@ jobs:
|
|||||||
name: Build and Deploy
|
name: Build and Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
services:
|
# services:
|
||||||
mermaid:
|
# mermaid:
|
||||||
image: yuzutech/kroki-mermaid
|
# image: yuzutech/kroki-mermaid
|
||||||
kroki:
|
# kroki:
|
||||||
image: yuzutech/kroki
|
# image: yuzutech/kroki
|
||||||
env:
|
# env:
|
||||||
KROKI_MERMAID_HOST: mermaid
|
# KROKI_MERMAID_HOST: mermaid
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -41,6 +41,6 @@ jobs:
|
|||||||
username: ${{ secrets.SSH_USERNAME }}
|
username: ${{ secrets.SSH_USERNAME }}
|
||||||
key: ${{ secrets.SSH_KEY }}
|
key: ${{ secrets.SSH_KEY }}
|
||||||
source: "dist/*"
|
source: "dist/*"
|
||||||
target: /srv/website/dev
|
target: /srv/website/stable
|
||||||
overwrite: true
|
overwrite: true
|
||||||
strip_components: 1
|
strip_components: 1
|
||||||
|
|||||||
46
.gitea/workflows/stable.yml
Normal file
46
.gitea/workflows/stable.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Deploy Stable Website
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- senpai
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
name: Build and Deploy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# services:
|
||||||
|
# mermaid:
|
||||||
|
# image: yuzutech/kroki-mermaid
|
||||||
|
# kroki:
|
||||||
|
# image: yuzutech/kroki
|
||||||
|
# env:
|
||||||
|
# KROKI_MERMAID_HOST: mermaid
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
name: Checkout code
|
||||||
|
|
||||||
|
- name: Setup node and npm
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: lts/*
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Check and build
|
||||||
|
run: npm run build
|
||||||
|
# env:
|
||||||
|
# KROKI_SERVER: "http://kroki:8000"
|
||||||
|
|
||||||
|
- name: Copy files via ssh
|
||||||
|
uses: appleboy/scp-action@v1
|
||||||
|
with:
|
||||||
|
host: c0ntroller.de
|
||||||
|
username: ${{ secrets.SSH_USERNAME }}
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
source: "dist/*"
|
||||||
|
target: /srv/website/stable
|
||||||
|
overwrite: true
|
||||||
|
strip_components: 1
|
||||||
46
README.md
46
README.md
@@ -1,43 +1,13 @@
|
|||||||
# Astro Starter Kit: Minimal
|
# Frontpage
|
||||||
|
|
||||||
```sh
|
[](https://c0ntroller.de/portfolio/astro-rewrite/)
|
||||||
npm create astro@latest -- --template minimal
|
|
||||||
```
|
|
||||||
|
|
||||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
| Stable | Dev
|
||||||
|
| ------ | ---
|
||||||
|
| [](https://c0ntroller.de/) | [](https://dev.c0ntroller.de/)
|
||||||
|
|
||||||
## 🚀 Project Structure
|
This repository contains my Astro-based website.
|
||||||
|
|
||||||
Inside of your Astro project, you'll see the following folders and files:
|
When changes are made to `senpai` it will be deploy on https://c0ntroller.de
|
||||||
|
|
||||||
```text
|
When changes are made in the `dev` branch it will be deployed on https://dev.c0ntroller.de
|
||||||
/
|
|
||||||
├── public/
|
|
||||||
├── src/
|
|
||||||
│ └── pages/
|
|
||||||
│ └── index.astro
|
|
||||||
└── package.json
|
|
||||||
```
|
|
||||||
|
|
||||||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
|
|
||||||
|
|
||||||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
|
|
||||||
|
|
||||||
Any static assets, like images, can be placed in the `public/` directory.
|
|
||||||
|
|
||||||
## 🧞 Commands
|
|
||||||
|
|
||||||
All commands are run from the root of the project, from a terminal:
|
|
||||||
|
|
||||||
| Command | Action |
|
|
||||||
| :------------------------ | :----------------------------------------------- |
|
|
||||||
| `npm install` | Installs dependencies |
|
|
||||||
| `npm run dev` | Starts local dev server at `localhost:4321` |
|
|
||||||
| `npm run build` | Build your production site to `./dist/` |
|
|
||||||
| `npm run preview` | Preview your build locally, before deploying |
|
|
||||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
|
||||||
| `npm run astro -- --help` | Get help using the Astro CLI |
|
|
||||||
|
|
||||||
## 👀 Want to learn more?
|
|
||||||
|
|
||||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
.welcome-typewriter-nostyle {
|
.welcome-typewriter-nostyle {
|
||||||
min-height: 1em;
|
min-height: 1em;
|
||||||
border-right: 2px solid orange;
|
border-right: 2px solid rgb(var(--accent-base));
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
display: block;
|
display: block;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
width: 0px;
|
width: 0px;
|
||||||
border-right: 2px solid orange;
|
border-right: 2px solid rgb(var(--accent-base));
|
||||||
animation: blink-caret 1s step-end infinite;
|
animation: blink-caret 1s step-end infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes blink-caret {
|
@keyframes blink-caret {
|
||||||
from, to { border-color: orange }
|
from, to { border-color: rgb(var(--accent-base)) }
|
||||||
50% { border-color: transparent; }
|
50% { border-color: transparent; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Beides Ok.
|
|||||||
Achso, außer dass `app` dann deprecated wurde.
|
Achso, außer dass `app` dann deprecated wurde.
|
||||||
|
|
||||||
Next.js war für mich die erste Berührung mit dem JavaScript Ökosystem und plötzlich verstand ich die ganzen Memes.
|
Next.js war für mich die erste Berührung mit dem JavaScript Ökosystem und plötzlich verstand ich die ganzen Memes.
|
||||||
Dann kam auch plötzlich die Nacht vom dependebot und ich hatte plötzlich 20 PRs, die alle Next.js Updates waren.
|
Dann kam auch plötzlich die Nachricht vom dependebot und ich hatte plötzlich 20 PRs, die alle Next.js Updates waren.
|
||||||
Nur, dass ab irgendeinem Punkt man plötzlich sich mit komplizierteren Updates rumschlagen musste und nicht einfach nur `npm audit fix` machen konnte.
|
Nur, dass ab irgendeinem Punkt man plötzlich sich mit komplizierteren Updates rumschlagen musste und nicht einfach nur `npm audit fix` machen konnte.
|
||||||
|
|
||||||
Also brauchte es eine Alternative.
|
Also brauchte es eine Alternative.
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import { execSync } from "child_process";
|
|
||||||
import { statSync } from "fs";
|
|
||||||
|
|
||||||
export function remarkModifiedTime() {
|
|
||||||
return function (tree, file) {
|
|
||||||
const filepath = file.history[0];
|
|
||||||
try {
|
|
||||||
const result = execSync(`git log -1 --pretty="format:%cI" "${filepath}"`);
|
|
||||||
// If result is empty or undefined, fallback to fs stat
|
|
||||||
if (!result || !result.toString().trim()) {
|
|
||||||
throw new Error("No git history");
|
|
||||||
}
|
|
||||||
file.data.astro.frontmatter.lastModified = result.toString();
|
|
||||||
return;
|
|
||||||
} catch (e) {
|
|
||||||
// Ignore, fallback to fs stat
|
|
||||||
const result = statSync(filepath);
|
|
||||||
file.data.astro.frontmatter.lastModified = result.mtime.toISOString();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user