Merge branch 'master' into deploy

This commit is contained in:
Saibotk 2023-09-03 00:24:51 +02:00
commit 328bf3430d
Signed by: saibotk
GPG key ID: 67585F0065E261D5
21 changed files with 6126 additions and 3463 deletions

View file

@ -1,4 +1,4 @@
FROM docker.io/library/nginx:1.23.1-alpine FROM docker.io/library/nginx:1.25.2-alpine
COPY ./dist/ /usr/share/nginx/html/ COPY ./dist/ /usr/share/nginx/html/

View file

@ -1,22 +1,22 @@
module.exports = { module.exports = {
extends: ['@clickbar/typescript', 'plugin:astro/recommended'], extends: ["@clickbar/typescript", "plugin:astro/recommended"],
overrides: [ overrides: [
{ {
// Define the configuration for `.astro` file. // Define the configuration for `.astro` file.
files: ['*.astro'], files: ["*.astro"],
// Allows Astro components to be parsed. // Allows Astro components to be parsed.
parser: 'astro-eslint-parser', parser: "astro-eslint-parser",
// Parse the script in `.astro` as TypeScript by adding the following configuration. // Parse the script in `.astro` as TypeScript by adding the following configuration.
// It's the setting you need when using TypeScript. // It's the setting you need when using TypeScript.
parserOptions: { parserOptions: {
parser: '@typescript-eslint/parser', parser: "@typescript-eslint/parser",
extraFileExtensions: ['.astro'], extraFileExtensions: [".astro"],
}, },
rules: { rules: {
// override/add rules settings here, such as: // override/add rules settings here, such as:
// Does not work well with typescript // Does not work well with typescript
'no-undef': 'off', "no-undef": "off",
}, },
}, },
], ],
} };

View file

@ -13,10 +13,11 @@ stages:
- deploy - deploy
build: build:
image: docker.io/library/node:18.4 image: docker.io/library/node:20.5
stage: build stage: build
interruptible: true
before_script: before_script:
- npm install -g pnpm@7 - npm install -g pnpm
- pnpm config set store-dir .pnpm-store - pnpm config set store-dir .pnpm-store
script: script:
- pnpm install # install dependencies - pnpm install # install dependencies
@ -27,9 +28,16 @@ build:
- pnpm-lock.yaml - pnpm-lock.yaml
paths: paths:
- .pnpm-store - .pnpm-store
artifacts:
untracked: true
exclude: !dist/**
paths:
- dist
expire_in: 1 week
package: package:
stage: package stage: package
interruptible: true
image: quay.io/sheogorath/build-ah-engine:latest image: quay.io/sheogorath/build-ah-engine:latest
tags: tags:
- privileged - privileged
@ -45,6 +53,7 @@ package:
package-deploy: package-deploy:
stage: package stage: package
interruptible: true
image: quay.io/sheogorath/build-ah-engine:latest image: quay.io/sheogorath/build-ah-engine:latest
variables: variables:
LANG: C.UTF-8 LANG: C.UTF-8
@ -60,6 +69,7 @@ package-deploy:
test: test:
stage: test stage: test
interruptible: true
tags: tags:
- privileged - privileged
image: quay.io/sheogorath/build-ah-engine:latest image: quay.io/sheogorath/build-ah-engine:latest
@ -79,6 +89,7 @@ test:
test-deploy: test-deploy:
stage: test stage: test
interruptible: true
tags: tags:
- privileged - privileged
image: quay.io/sheogorath/build-ah-engine:latest image: quay.io/sheogorath/build-ah-engine:latest

View file

@ -1,11 +1,11 @@
module.exports = { module.exports = {
plugins: [require.resolve('prettier-plugin-astro')], plugins: [require.resolve("prettier-plugin-astro")],
overrides: [ overrides: [
{ {
files: '*.astro', files: "*.astro",
options: { options: {
parser: 'astro', parser: "astro",
}, },
}, },
], ],
}; };

View file

@ -8,7 +8,6 @@ npm create astro@latest -- --template blog
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![blog](https://user-images.githubusercontent.com/4677417/186189140-4ef17aac-c3c9-4918-a8c2-ce86ba1bb394.png) ![blog](https://user-images.githubusercontent.com/4677417/186189140-4ef17aac-c3c9-4918-a8c2-ce86ba1bb394.png)
Features: Features:

View file

@ -1,16 +1,15 @@
import { defineConfig } from 'astro/config' import mdx from "@astrojs/mdx";
import mdx from '@astrojs/mdx' import sitemap from "@astrojs/sitemap";
import sitemap from '@astrojs/sitemap' import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";
import tailwind from '@astrojs/tailwind'
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: 'https://saibotk.de', site: "https://saibotk.de",
integrations: [mdx(), sitemap(), tailwind()], integrations: [mdx(), sitemap(), tailwind()],
markdown: { markdown: {
shikiConfig: { shikiConfig: {
theme: 'rose-pine-moon', theme: "rose-pine-moon",
}, },
}, },
}) });

View file

@ -8,24 +8,26 @@
"start": "astro dev", "start": "astro dev",
"build": "astro build", "build": "astro build",
"preview": "astro preview", "preview": "astro preview",
"prettier": "prettier . --cache",
"lint": "eslint --ext .js,.cjs,.mjs,.ts,.cts,.mts,.tsx,.astro .", "lint": "eslint --ext .js,.cjs,.mjs,.ts,.cts,.mts,.tsx,.astro .",
"fix": "eslint --fix --ext .js,.cjs,.mjs,.ts,.cts,.mts,.tsx,.astro .", "format": "pnpm prettier --write",
"fix": "pnpm lint --fix && pnpm format",
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/mdx": "^0.11.4", "@astrojs/mdx": "^1.0.0",
"@astrojs/rss": "^1.0.2", "@astrojs/rss": "^3.0.0",
"@astrojs/sitemap": "^1.0.0", "@astrojs/sitemap": "^3.0.0",
"@astrojs/tailwind": "^2.1.1", "@astrojs/tailwind": "^5.0.0",
"@clickbar/eslint-config-typescript": "^4.0.10", "@clickbar/eslint-config-typescript": "^8.0.2",
"@fontsource/fira-code": "^4.5.12", "@fontsource/fira-code": "^5.0.8",
"@fontsource/inter": "^4.5.14", "@fontsource/inter": "^5.0.8",
"@tailwindcss/typography": "^0.5.7", "@tailwindcss/typography": "^0.5.9",
"astro": "^1.5.2", "astro": "^3.0.7",
"eslint": "^8.26.0", "eslint": "^8.48.0",
"eslint-plugin-astro": "^0.20.0", "eslint-plugin-astro": "^0.29.0",
"prettier-plugin-astro": "^0.6.0", "prettier-plugin-astro": "^0.12.0",
"tailwindcss": "^3.2.1", "tailwindcss": "^3.3.3",
"typescript": "^4.8.4" "typescript": "^5.2.2"
} }
} }

9396
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,6 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [ "extends": ["config:base", "docker:enableMajor"],
"config:base",
"docker:enableMajor"
],
"prConcurrentLimit": 0, "prConcurrentLimit": 0,
"gitLabAutomerge": true "gitLabAutomerge": true
} }

View file

@ -1,6 +1,8 @@
--- ---
// Import the global.css file here so that it is included on // Import the global.css file here so that it is included on
// all pages through the use of the <BaseHead /> component. // all pages through the use of the <BaseHead /> component.
import { ViewTransitions } from 'astro:transitions'
import '../styles/global.css' import '../styles/global.css'
export interface Props { export interface Props {
@ -42,3 +44,5 @@ const { title, description, image = '/android-chrome-192x192.png' } = Astro.prop
<meta property="twitter:title" content={title} /> <meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} /> <meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} /> <meta property="twitter:image" content={new URL(image, Astro.url)} />
<ViewTransitions />

View file

@ -1,5 +1,5 @@
--- ---
import RSS from './icons/RSS.astro' import Rss from './icons/Rss.astro'
const today = new Date() const today = new Date()
--- ---
@ -22,6 +22,6 @@ const today = new Date()
Source Code Source Code
</a> </a>
<span>&#183;</span> <span>&#183;</span>
<a href="/rss.xml" target="_blank" rel="noopener"><RSS class="w-4 inline-block" /></a> <a href="/rss.xml" target="_blank" rel="noopener"><Rss class="w-4 inline-block" /></a>
</div> </div>
</footer> </footer>

View file

@ -1,9 +1,9 @@
--- ---
import { SITE_TITLE } from '../config'
import HeaderLink from './HeaderLink.astro' import HeaderLink from './HeaderLink.astro'
import GitHub from './icons/GitHub.astro' import GitHub from './icons/GitHub.astro'
import Mastodon from './icons/Mastodon.astro'
import GitLab from './icons/GitLab.astro' import GitLab from './icons/GitLab.astro'
import Mastodon from './icons/Mastodon.astro'
import { SITE_TITLE } from '../config'
--- ---
<header class="mt-8"> <header class="mt-8">

View file

@ -1,5 +1,5 @@
// Place any global data in this file. // Place any global data in this file.
// You can import this data from anywhere in your site by using the `import` keyword. // You can import this data from anywhere in your site by using the `import` keyword.
export const SITE_TITLE = "Saibotk's blog" export const SITE_TITLE = "Saibotk's blog";
export const SITE_DESCRIPTION = 'Welcome to my personal blog!' export const SITE_DESCRIPTION = "Welcome to my personal blog!";

View file

@ -1,10 +1,10 @@
--- ---
import '@fontsource/inter/variable-full.css'
import '@fontsource/fira-code' import '@fontsource/fira-code'
import '@fontsource/inter'
import BaseHead from '../components/BaseHead.astro' import BaseHead from '../components/BaseHead.astro'
import Header from '../components/Header.astro'
import Footer from '../components/Footer.astro' import Footer from '../components/Footer.astro'
import Header from '../components/Header.astro'
import { SITE_TITLE, SITE_DESCRIPTION } from '../config' import { SITE_TITLE, SITE_DESCRIPTION } from '../config'
export interface Props { export interface Props {

View file

@ -1,10 +1,13 @@
import rss from '@astrojs/rss' import rss, { pagesGlobToRssItems } from "@astrojs/rss";
import { SITE_TITLE, SITE_DESCRIPTION } from '../config'
export const get = () => import { SITE_TITLE, SITE_DESCRIPTION } from "../config";
rss({
export async function GET() {
return rss({
title: SITE_TITLE, title: SITE_TITLE,
description: SITE_DESCRIPTION, description: SITE_DESCRIPTION,
site: import.meta.env.SITE, site: import.meta.env.SITE,
items: import.meta.glob('./posts/**/*.{md,mdx}'), // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-argument
}) items: await pagesGlobToRssItems(import.meta.glob("./posts/**/*.{md,mdx}")),
});
}

View file

@ -1,16 +1,16 @@
/* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-var-requires */
const defaultTheme = require('tailwindcss/defaultTheme') const defaultTheme = require("tailwindcss/defaultTheme");
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
module.exports = { module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: { theme: {
extend: { extend: {
fontFamily: { fontFamily: {
sans: ['InterVariable', ...defaultTheme.fontFamily.sans], sans: ["Inter Variable", ...defaultTheme.fontFamily.sans],
code: ['Fira Code', ...defaultTheme.fontFamily.mono], code: ["Fira Code", ...defaultTheme.fontFamily.mono],
}, },
}, },
}, },
plugins: [require('@tailwindcss/typography')], plugins: [require("@tailwindcss/typography")],
} };