Compare commits
8 Commits
v1.0.0
...
097850267c
Author | SHA1 | Date | |
---|---|---|---|
097850267c
|
|||
9a82eba757
|
|||
ebb3db8645
|
|||
a2584b97a1
|
|||
14c65bda05
|
|||
16104d12ae
|
|||
83b2b9ac68
|
|||
8cc5c6971f
|
@ -23,4 +23,4 @@ COPY --from=build /app/dist ./dist
|
|||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
ENV PORT=4321
|
ENV PORT=4321
|
||||||
EXPOSE 4321
|
EXPOSE 4321
|
||||||
CMD node ./dist/server/entry.mjs
|
ENTRYPOINT node ./dist/server/entry.mjs
|
52
TODO.md
52
TODO.md
@ -1,46 +1,58 @@
|
|||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
## Code
|
- [ ] License
|
||||||
- [ ] day.js for dates
|
|
||||||
- [ ] Nix Shell
|
|
||||||
|
|
||||||
## SSE
|
## Code
|
||||||
- [x] Correct Sitemap.xml
|
- [ ] Nix Shell
|
||||||
- [x] Correct robots.txt
|
- [ ] Analytics
|
||||||
- [x] Correct security.txt
|
- [ ] Organize code better
|
||||||
|
- [ ] Type slug of project
|
||||||
|
|
||||||
|
## SEO
|
||||||
|
- [ ] Meta tags on each page
|
||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
- [x] Show current page
|
|
||||||
- [x] Correct bg colour on entire page
|
|
||||||
- [x] Hamburger menu on mobile
|
|
||||||
- [ ] Dark mode toggle
|
- [ ] Dark mode toggle
|
||||||
- [ ] Navigate using pathname / breadcrumbs
|
- [ ] Navigate using pathname / breadcrumbs
|
||||||
|
- [ ] Better style for \<code /> blocks
|
||||||
|
|
||||||
## Accessibility
|
## Accessibility
|
||||||
- [x] Fix colours on buttons
|
|
||||||
- [x] Correct contrast
|
|
||||||
- [ ] All interactable elements have labels
|
- [ ] All interactable elements have labels
|
||||||
- [x] Colour links, also in MDX posts
|
|
||||||
|
## I18N
|
||||||
|
- [ ] Markdown for translations
|
||||||
|
|
||||||
## ~/
|
## ~/
|
||||||
- [ ] About me description
|
- [ ] About me description
|
||||||
- [x] Latest projects
|
- [ ] Limit latest projects to N (5?)
|
||||||
- [x] Non-cat image
|
|
||||||
|
|
||||||
## ~/about
|
## ~/about
|
||||||
- [ ] About me
|
- [ ] About me
|
||||||
|
|
||||||
## ~/links
|
## ~/links
|
||||||
- [ ] Add Bluesky link
|
|
||||||
- [ ] Add MusicBrainz link
|
## ~/projects
|
||||||
- [ ] Add Archidekt link
|
- [ ] Translate projects
|
||||||
|
- [ ] RSS Feed
|
||||||
|
|
||||||
|
## ~/projects/[project]
|
||||||
|
- [ ] Only use Gitea icon for Gitea links
|
||||||
|
- [ ] Bachelor project
|
||||||
|
- [x] Sparebank1 ActualBudget service
|
||||||
|
- [ ] More about this website
|
||||||
|
- [ ] NixOS on desktop
|
||||||
|
- [ ] Copy link to h tag and scroll to h tag on load
|
||||||
|
- [x] External links should open in new tab
|
||||||
|
- [x] Add keywords to meta tag
|
||||||
|
- [x] Add description to meta tag
|
||||||
|
- [ ] Source on image if "borrowed" from somewhere
|
||||||
|
|
||||||
## ~/slashes
|
## ~/slashes
|
||||||
- [ ] List of all slashes
|
- [ ] List of all slashes
|
||||||
|
|
||||||
## ~/uses
|
## ~/uses
|
||||||
- [ ] Homelab uses
|
- [x] Homelab uses
|
||||||
- [ ] Raspberry PI uses
|
- [x] Raspberry PI uses
|
||||||
- [ ] Hardware anchor
|
- [ ] Hardware anchor
|
||||||
|
|
||||||
## ~/certifications
|
## ~/certifications
|
||||||
|
@ -38,6 +38,11 @@ export default defineConfig({
|
|||||||
vite: {
|
vite: {
|
||||||
plugins: [tailwindcss()],
|
plugins: [tailwindcss()],
|
||||||
},
|
},
|
||||||
|
markdown: {
|
||||||
|
shikiConfig: {
|
||||||
|
theme: "catppuccin-mocha",
|
||||||
|
},
|
||||||
|
},
|
||||||
env: {
|
env: {
|
||||||
schema: {
|
schema: {
|
||||||
DOMAIN: envField.string({ context: "client", access: "public" }),
|
DOMAIN: envField.string({ context: "client", access: "public" }),
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||||
|
"archidektMessage": "My MTG cards and decks",
|
||||||
"hiIm": "Hi, I'm",
|
"hiIm": "Hi, I'm",
|
||||||
"position": "Software Engineer",
|
"position": "Software Engineer",
|
||||||
"aboutMe": "Dedicated developer currently working at Capgemini Bergen.",
|
"aboutMe": "Dedicated developer currently working at Capgemini Bergen.",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||||
|
"archidektMessage": "Mine MTG kort og decks",
|
||||||
"hiIm": "Hei, jeg er",
|
"hiIm": "Hei, jeg er",
|
||||||
"position": "Programvareutvikler",
|
"position": "Programvareutvikler",
|
||||||
"aboutMe": "Engasjert utvikler som for tiden jobber hos Capgemini Bergen.",
|
"aboutMe": "Engasjert utvikler som for tiden jobber hos Capgemini Bergen.",
|
||||||
|
17
package.json
17
package.json
@ -16,27 +16,28 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.9.4",
|
"@astrojs/check": "^0.9.4",
|
||||||
"@astrojs/mdx": "^4.0.8",
|
"@astrojs/mdx": "^4.0.8",
|
||||||
"@astrojs/node": "9.1.0",
|
"@astrojs/node": "9.1.1",
|
||||||
"@astrojs/sitemap": "^3.2.1",
|
"@astrojs/sitemap": "^3.2.1",
|
||||||
"@astrojs/svelte": "^7.0.4",
|
"@astrojs/svelte": "^7.0.4",
|
||||||
"@iconify-json/pajamas": "^1.2.5",
|
"@iconify-json/pajamas": "^1.2.5",
|
||||||
"@inlang/paraglide-astro": "^0.3.5",
|
"@inlang/paraglide-astro": "^0.3.5",
|
||||||
"@inlang/paraglide-js": "1.11.8",
|
"@inlang/paraglide-js": "1.11.8",
|
||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"@tailwindcss/vite": "^4.0.6",
|
"@tailwindcss/vite": "^4.0.9",
|
||||||
"astro": "5.3.0",
|
"astro": "^5.4.1 ",
|
||||||
"astro-icon": "^1.1.5",
|
"astro-icon": "^1.1.5",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
"sharp": "^0.33.5",
|
"sharp": "^0.33.5",
|
||||||
"svelte": "^5.20.1",
|
"svelte": "^5.20.4",
|
||||||
"tailwindcss": "^4.0.6",
|
"tailwindcss": "^4.0.9",
|
||||||
"typescript": "^5.7.3"
|
"typescript": "^5.7.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"daisyui": "^5.0.0-beta.8",
|
"daisyui": "^5.0.0",
|
||||||
"prettier": "^3.5.1",
|
"prettier": "^3.5.2",
|
||||||
"prettier-plugin-astro": "^0.14.1",
|
"prettier-plugin-astro": "^0.14.1",
|
||||||
"prettier-plugin-svelte": "^3.3.3",
|
"prettier-plugin-svelte": "^3.3.3",
|
||||||
"vite": "^6.1.0"
|
"vite": "^6.2.0"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"semi": false,
|
"semi": false,
|
||||||
|
588
pnpm-lock.yaml
generated
588
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,15 @@ export interface MyLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
|
{
|
||||||
|
title: "Archidekt",
|
||||||
|
url: "https://archidekt.com/u/Emberal",
|
||||||
|
message: m.archidektMessage(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Bluesky",
|
||||||
|
url: "https://bsky.app/profile/martials.no",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Codeberg",
|
title: "Codeberg",
|
||||||
url: "https://codeberg.org/martials",
|
url: "https://codeberg.org/martials",
|
||||||
@ -55,6 +64,10 @@ export default [
|
|||||||
alt: "Mastodon icon",
|
alt: "Mastodon icon",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "ListenBrainz",
|
||||||
|
url: "https://listenbrainz.org/user/emberal/",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Pixelfed",
|
title: "Pixelfed",
|
||||||
url: "https://pixelfed.social/i/web/profile/261454857934868480",
|
url: "https://pixelfed.social/i/web/profile/261454857934868480",
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
import { getCollection } from "astro:content"
|
||||||
import ProjectGrid from "./ProjectGrid.astro"
|
import ProjectGrid from "./ProjectGrid.astro"
|
||||||
import { type CollectionEntry } from "astro:content"
|
|
||||||
|
|
||||||
interface Props {
|
const projects = await getCollection("projects")
|
||||||
projects: CollectionEntry<"projects">[]
|
|
||||||
}
|
|
||||||
|
|
||||||
const { projects } = Astro.props
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<ProjectGrid projects={projects} />
|
<ProjectGrid projects={projects} />
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import type { Project } from "@/types/types"
|
import type { Project } from "@/types/types"
|
||||||
import type { NavLink } from "@/utils/linking"
|
import type { NavLink } from "@/utils/linking"
|
||||||
import ProjectCard from "./ProjectCard.astro"
|
import ProjectCard from "./ProjectCard.astro"
|
||||||
|
import dayjs from "dayjs"
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
projects: ReadonlyArray<Project>
|
projects: ReadonlyArray<Project>
|
||||||
@ -14,8 +15,15 @@ const baseUrl: NavLink = "/projects"
|
|||||||
|
|
||||||
<div class="flex flex-wrap justify-around">
|
<div class="flex flex-wrap justify-around">
|
||||||
{
|
{
|
||||||
projects.map(
|
projects
|
||||||
({ data: { title, description, tags, heroImage, heroImageAlt }, id }) => (
|
.toSorted((a, b) =>
|
||||||
|
dayjs(a.data.updatedAt).isBefore(dayjs(b.data.updatedAt)) ? 1 : -1,
|
||||||
|
)
|
||||||
|
.map(
|
||||||
|
({
|
||||||
|
data: { title, description, tags, heroImage, heroImageAlt },
|
||||||
|
id,
|
||||||
|
}) => (
|
||||||
<div class="my-5 px-2">
|
<div class="my-5 px-2">
|
||||||
<ProjectCard
|
<ProjectCard
|
||||||
title={title}
|
title={title}
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
|
import * as m from "@/paraglide/messages"
|
||||||
import Layout from "@/layouts/Layout.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
import BadgeList from "@/components/badge/BadgeList.astro"
|
import BadgeList from "@/components/badge/BadgeList.astro"
|
||||||
import GiteaLink from "@/components/links/GiteaLink.astro"
|
import GiteaLink from "@/components/links/GiteaLink.astro"
|
||||||
import { languageTag } from "@/paraglide/runtime"
|
import { languageTag } from "@/paraglide/runtime"
|
||||||
import { getEntry, render } from "astro:content"
|
import { getEntry, render } from "astro:content"
|
||||||
import { Image } from "astro:assets"
|
import { Image } from "astro:assets"
|
||||||
import * as m from "@/paraglide/messages"
|
import dayjs from "dayjs"
|
||||||
import "@/styles/global.css"
|
import "@/styles/global.css"
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -17,19 +18,32 @@ const { project } = Astro.props
|
|||||||
const entry = await getEntry("projects", project)
|
const entry = await getEntry("projects", project)
|
||||||
const { Content } = await render(entry!)
|
const { Content } = await render(entry!)
|
||||||
const {
|
const {
|
||||||
|
lang,
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
tags,
|
tags,
|
||||||
|
keywords,
|
||||||
heroImage,
|
heroImage,
|
||||||
heroImageAlt,
|
heroImageAlt,
|
||||||
source,
|
source,
|
||||||
createdAt,
|
createdAt,
|
||||||
updatedAt,
|
updatedAt,
|
||||||
} = entry!.data
|
} = entry!.data
|
||||||
|
|
||||||
|
function localeDateString(isoString: string): string {
|
||||||
|
if (languageTag() === "nb") {
|
||||||
|
return dayjs(isoString).locale(languageTag()).format("DD/MM/YYYY")
|
||||||
|
}
|
||||||
|
return dayjs(isoString).locale(languageTag()).format("DD-MM-YYYY")
|
||||||
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--TODO day.js / Temporal API for dates?-->
|
<Layout
|
||||||
<Layout title={title} class="mx-auto max-w-[750px]">
|
title={title}
|
||||||
|
class="mx-auto max-w-[750px]"
|
||||||
|
description={description}
|
||||||
|
keywords={keywords}
|
||||||
|
>
|
||||||
<div class="flex justify-between my-2">
|
<div class="flex justify-between my-2">
|
||||||
<div>
|
<div>
|
||||||
<h2>{title}</h2>
|
<h2>{title}</h2>
|
||||||
@ -37,10 +51,10 @@ const {
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col items-end">
|
<div class="flex flex-col items-end">
|
||||||
<p>
|
<p>
|
||||||
{m.createdAt()}: {new Date(createdAt).toLocaleDateString(languageTag())}
|
{m.createdAt()}: {localeDateString(createdAt)}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{m.updatedAt()}: {new Date(updatedAt).toLocaleDateString(languageTag())}
|
{m.updatedAt()}: {localeDateString(updatedAt)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -49,5 +63,7 @@ const {
|
|||||||
<GiteaLink href={source} class="my-2" />
|
<GiteaLink href={source} class="my-2" />
|
||||||
|
|
||||||
<p class="my-2">{description}</p>
|
<p class="my-2">{description}</p>
|
||||||
|
<div lang={lang}>
|
||||||
<Content />
|
<Content />
|
||||||
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -5,11 +5,13 @@ const projectCollection = defineCollection({
|
|||||||
loader: glob({ pattern: "**\/*.mdx", base: "./src/content/projects" }),
|
loader: glob({ pattern: "**\/*.mdx", base: "./src/content/projects" }),
|
||||||
schema: ({ image }) =>
|
schema: ({ image }) =>
|
||||||
z.object({
|
z.object({
|
||||||
|
lang: z.union([z.literal("en"), z.literal("nb")]),
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
description: z.string(),
|
description: z.string(),
|
||||||
heroImage: image(),
|
heroImage: image(),
|
||||||
heroImageAlt: z.string(),
|
heroImageAlt: z.string(),
|
||||||
tags: z.array(z.string()),
|
tags: z.array(z.string()),
|
||||||
|
keywords: z.array(z.string()),
|
||||||
source: z.string().url(),
|
source: z.string().url(),
|
||||||
createdAt: z.string().date(),
|
createdAt: z.string().date(),
|
||||||
updatedAt: z.string().date(),
|
updatedAt: z.string().date(),
|
||||||
|
BIN
src/content/projects/assets/is_it_worth_the_time.png
Normal file
BIN
src/content/projects/assets/is_it_worth_the_time.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
lang: "en"
|
||||||
title: "Welcome"
|
title: "Welcome"
|
||||||
description: "Welcome to my homepage / portfolio"
|
description: "Welcome to my homepage / portfolio"
|
||||||
heroImage: "assets/recursive-meme.png"
|
heroImage: "assets/recursive-meme.png"
|
||||||
heroImageAlt: "A recursive meme that says: Self-reference, recursive meme is self-referential"
|
heroImageAlt: "A recursive meme that says: Self-reference, recursive meme is self-referential"
|
||||||
tags: [Astro, Svelte, TypeScript, I18n, TailwindCSS, Docker]
|
tags: [Astro, Svelte, TypeScript, I18n, TailwindCSS, Docker]
|
||||||
|
keywords: [Martin Berg Alstad, portfolio, homepage, website, martials, emberal]
|
||||||
source: "https://git.martials.no/martials/martials.no"
|
source: "https://git.martials.no/martials/martials.no"
|
||||||
createdAt: "2024-09-22"
|
createdAt: "2024-09-22"
|
||||||
updatedAt: "2025-02-15"
|
updatedAt: "2025-02-15"
|
||||||
|
115
src/content/projects/sb1budget.mdx
Normal file
115
src/content/projects/sb1budget.mdx
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
---
|
||||||
|
lang: "en"
|
||||||
|
title: "Sparebank1 - Actual Budget"
|
||||||
|
description: "Automatically import transactions from Sparebank1 bank accounts to Actual Budget."
|
||||||
|
heroImage: "assets/is_it_worth_the_time.png"
|
||||||
|
heroImageAlt: "A diagram that shows how much time is saved automating a tasks rather than doing it manually."
|
||||||
|
tags: [TypeScript, Docker, Node, CronJob, Sqlite, API-management]
|
||||||
|
keywords: [Finance, Sparebank1, Sparebank1 Utvikling, Sparebank1 API, Actual Budget API]
|
||||||
|
source: "https://git.martials.no/martials/sparebank1_actual_budget_integration"
|
||||||
|
createdAt: "2025-02-27"
|
||||||
|
updatedAt: "2025-02-27"
|
||||||
|
---
|
||||||
|
|
||||||
|
import ExternalLink from "@/components/links/ExternalLink.astro"
|
||||||
|
|
||||||
|
## What is it?
|
||||||
|
|
||||||
|
<ExternalLink href="https://actualbudget.org/">Actual Budget</ExternalLink> is an open-source budgeting platform, it can very simply be self-hosted and accessed throught the browser.
|
||||||
|
While <ExternalLink href="https://www.sparebank1.no/nb/bank/privat.html">Sparebank1</ExternalLink> is a Norwegian bank, with a great <ExternalLink href="https://developer.sparebank1.no/#/">developer experience</ExternalLink> and an easy to use API that can be used to fetch transactions for example.
|
||||||
|
|
||||||
|
Actual has an API that can be used to interact with your own instance of Actual, like importing transactions.
|
||||||
|
|
||||||
|
Which is what the Sparebank1 Actual Budget integration does. It fetches transactions from my accounts in Sparebank1 and imports them automatically into Actual.
|
||||||
|
The operation runs daily and can be configured to import from multiple accounts at once.
|
||||||
|
|
||||||
|
The purpose of this application is to automatically transfer transactions to the budget, to avoid doing it manually often, or once in a while.
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## The techy stuff
|
||||||
|
|
||||||
|
Since the <ExternalLink href="https://actualbudget.org/docs/api/">Actual Budget API</ExternalLink> is an NPM package, the application had to be created in TypeScript.
|
||||||
|
I looked at options to NodeJS but neither Bun or Deno was compatible with the *better-sqlite3* package which was a dependency to the API,
|
||||||
|
so the best option for now was NodeJS.
|
||||||
|
|
||||||
|
The application runs a cronJob that executes once a day at 1 am. The specific time is not really that important since it fetches transactions from 3-4 days before the day it runs.
|
||||||
|
This is done to avoid fetching transactions which are not fully cleared yet. Some transactions can even be cleared but the unique Id for the transaction might not be set yet.
|
||||||
|
Actual uses that unique Id in order to avoid duplicate transactions, and makes it possible to update transactions if the content has changed.
|
||||||
|
|
||||||
|
Rules can be defined within the Actual application, so transactions are automatically sorted into the correct categories on import.
|
||||||
|
|
||||||
|
The application supports importing multiple accounts from a single user.
|
||||||
|
This is done by specifying the account keys to Sparebank1 and a equal length array of ids for the Actual accounts.
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
### Low Coupling
|
||||||
|
|
||||||
|
In order to make it easy to reuse the same application for other banks, it was created with low coupling in mind.
|
||||||
|
Interfaces are defined for the different parts of the application, and in order to implement it for any other bank,
|
||||||
|
the `Bank` interface can be implemented on any class, and requires two methods.
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
```ts
|
||||||
|
export interface Bank {
|
||||||
|
fetchTransactions: (
|
||||||
|
interval: Interval,
|
||||||
|
...accountKeys: ReadonlyArray<string>
|
||||||
|
) => Promise<ReadonlyArray<ActualTransaction>>
|
||||||
|
|
||||||
|
shutdown: () => Promise<void> | void
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
### Authentication
|
||||||
|
|
||||||
|
Both Sparebank1 and Actual requires different secrets and keys to work.
|
||||||
|
|
||||||
|
Actual only requires that secrets are passed into the client that handles the requests, but Sparebank1 requires more effort in order to fetch data.
|
||||||
|
First it requires a *authentication code* that can only be fetched using my own BankID account.
|
||||||
|
The authentication code must be swapped for a *refresh token* within 2 minutes or the process must be started over.
|
||||||
|
The refresh token has a lifetime of a year unless used, so it can be saved for later use.
|
||||||
|
The refresh token is added as an environmental variable that can be used to fetch the first *access token*.
|
||||||
|
After that, both the new refresh token and access token is stored in a Sqlite database so they can be reused until they expire.
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
### Deployement
|
||||||
|
|
||||||
|
The application runs in a docker container on my [Homelab](/uses).
|
||||||
|
It is build from a Gitea Act runner that adds the needed secrets and variables from the Gitea instance.
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Deploy application
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: host
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Secrets and vars
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run docker-compose
|
||||||
|
run: docker compose up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
## The road ahead
|
||||||
|
|
||||||
|
Future plans incude adding more features to the application and some more error handling.
|
||||||
|
Then potentially implementing the integration for other banks or credit cards to automate even more.
|
||||||
|
|
||||||
|
I also want to rewrite it in Bun when they implement the needed APIs to get Better-sqlite3 working.
|
@ -1,3 +1,3 @@
|
|||||||
title: Homelab
|
title: Homelab
|
||||||
hardware:
|
hardware:
|
||||||
- b # Graphics cards, CPUs, etc.
|
- HP ProDesk 600 G3 SFF i7 6. gen # https://bergenbruktpc.no/stasjonaer-pc/hp/hp-prodesk-600-g3-sff-i5-i7-6-gen#&variation=926583
|
@ -1,5 +1,5 @@
|
|||||||
title: Raspberry Pi 4
|
title: Raspberry Pi 4
|
||||||
accessories:
|
accessories:
|
||||||
- a # Screens, keyboards, mice, etc.
|
- 4 TB External harddrive
|
||||||
hardware:
|
hardware:
|
||||||
- b # Graphics cards, CPUs, etc.
|
- OKdo Raspberry Pi 4 Kit 4 GB # https://www.kjell.com/no/produkter/data/raspberry-pi/okdo-raspberry-pi-4-kit-4-gb-p88059
|
@ -6,9 +6,11 @@ import { resolvePathname } from "@/utils/linking"
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string
|
title: string
|
||||||
|
description?: string
|
||||||
|
keywords?: ReadonlyArray<string>
|
||||||
class?: string
|
class?: string
|
||||||
}
|
}
|
||||||
const { title, class: clazz } = Astro.props
|
const { title, description, keywords, class: clazz } = Astro.props
|
||||||
const mainClass =
|
const mainClass =
|
||||||
"grow max-w-[1000px] m-auto sm:min-w-[500px] not-sm:w-full px-5"
|
"grow max-w-[1000px] m-auto sm:min-w-[500px] not-sm:w-full px-5"
|
||||||
---
|
---
|
||||||
@ -17,13 +19,16 @@ const mainClass =
|
|||||||
<html lang={languageTag()} dir={"ltr"}>
|
<html lang={languageTag()} dir={"ltr"}>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="description" content="Astro description" />
|
<meta name="author" content="Martin Berg Alstad" />
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<meta name="generator" content={Astro.generator} />
|
||||||
|
{description && <meta name="description" content={description} />}
|
||||||
|
{keywords && <meta name="keywords" content={keywords.join(", ")} />}
|
||||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
<link rel="icon" type="image/jpg" href="/favicon.jpg" />
|
<link rel="icon" type="image/jpg" href="/favicon.jpg" />
|
||||||
<meta name="generator" content={Astro.generator} />
|
|
||||||
<title>{title} | Martin Berg Alstad</title>
|
<title>{title} | Martin Berg Alstad</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col min-h-screen bg-cat-base text-cat-text">
|
<body class="flex flex-col min-h-screen bg-cat-base text-cat-text">
|
||||||
<Header />
|
<Header />
|
||||||
<main class:list={[mainClass, clazz]}>
|
<main class:list={[mainClass, clazz]}>
|
||||||
|
@ -7,7 +7,10 @@ import "@/styles/global.css"
|
|||||||
export const prerender = true
|
export const prerender = true
|
||||||
|
|
||||||
export function getStaticPaths(): GetStaticPathsResult {
|
export function getStaticPaths(): GetStaticPathsResult {
|
||||||
return [{ params: { project: "homepage" } }]
|
return [
|
||||||
|
{ params: { project: "homepage" } },
|
||||||
|
{ params: { project: "sb1budget" } },
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const { project } = Astro.params
|
const { project } = Astro.params
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
---
|
---
|
||||||
import { getCollection } from "astro:content"
|
|
||||||
import Layout from "@/layouts/Layout.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
|
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
|
||||||
import "@/styles/global.css"
|
import "@/styles/global.css"
|
||||||
|
|
||||||
const projects = await getCollection("projects")
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Projects">
|
<Layout title="Projects">
|
||||||
<MyProjectsPage projects={projects} />
|
<MyProjectsPage />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -7,7 +7,10 @@ import "@/styles/global.css"
|
|||||||
export const prerender = true
|
export const prerender = true
|
||||||
|
|
||||||
export function getStaticPaths(): GetStaticPathsResult {
|
export function getStaticPaths(): GetStaticPathsResult {
|
||||||
return [{ params: { project: "homepage" } }]
|
return [
|
||||||
|
{ params: { project: "homepage" } },
|
||||||
|
{ params: { project: "sb1budget" } },
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const { project } = Astro.params
|
const { project } = Astro.params
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
---
|
---
|
||||||
import { getCollection } from "astro:content"
|
|
||||||
import Layout from "@/layouts/Layout.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
|
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
|
||||||
import "@/styles/global.css"
|
import "@/styles/global.css"
|
||||||
|
|
||||||
const projects = await getCollection("projects")
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Prosjekter">
|
<Layout title="Prosjekter">
|
||||||
<MyProjectsPage projects={projects} />
|
<MyProjectsPage />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
Reference in New Issue
Block a user