mirror of
https://github.com/midou36o/midou36o.github.io
synced 2024-11-26 20:21:58 +05:30
Move to node, update all dependencies, fix unocss, add a dockerfile and
Some checks are pending
Svelte Website guild. / Building the website (push) Waiting to run
Some checks are pending
Svelte Website guild. / Building the website (push) Waiting to run
a CI builder for gitea.
This commit is contained in:
parent
ad7efaa286
commit
30e733d375
30
.gitea/workflows/build.yaml
Normal file
30
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Svelte Website guild.
|
||||||
|
run-name: ${{ github.actor }} is building the website.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'svelte-stable'
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: 'Building the website'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Setup QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: 'Build:checkout'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: git.projectsegfau.lt
|
||||||
|
username: midou
|
||||||
|
password: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
- name: 'Build:dockerimage'
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
tags: git.projectsegfau.lt/midou/midou36o.github.io:latest
|
||||||
|
context: '.'
|
||||||
|
push: true
|
||||||
|
no-cache: true
|
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM node:18-alpine
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
COPY package.json ./
|
||||||
|
COPY pnpm-lock.yaml ./
|
||||||
|
|
||||||
|
RUN npm install -g pnpm
|
||||||
|
|
||||||
|
RUN pnpm i
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN pnpm build
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "build/index.js"]
|
48
package.json
48
package.json
@ -12,36 +12,38 @@
|
|||||||
"format": "prettier --plugin-search-dir . --write ."
|
"format": "prettier --plugin-search-dir . --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify/json": "^2.2.94",
|
"@iconify/json": "^2.2.163",
|
||||||
"@sveltejs/adapter-auto": "^1.0.3",
|
"@sveltejs/adapter-auto": "^3.0.1",
|
||||||
"@sveltejs/adapter-static": "^2.0.2",
|
"@sveltejs/adapter-node": "^2.0.2",
|
||||||
"@sveltejs/kit": "^1.22.3",
|
"@sveltejs/adapter-static": "^3.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
"@sveltejs/kit": "^2.0.6",
|
||||||
"@typescript-eslint/parser": "^5.62.0",
|
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
||||||
"@unocss/preset-icons": "^0.48.5",
|
"@typescript-eslint/parser": "^6.16.0",
|
||||||
"@unocss/preset-web-fonts": "^0.48.5",
|
"@unocss/extractor-svelte": "^0.58.2",
|
||||||
"eslint": "^8.45.0",
|
"@unocss/preset-icons": "^0.58.2",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"@unocss/preset-web-fonts": "^0.58.2",
|
||||||
"eslint-plugin-svelte3": "^4.0.0",
|
"eslint": "^8.56.0",
|
||||||
"prettier": "^2.8.8",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"prettier-plugin-svelte": "^2.10.1",
|
"prettier": "^3.1.1",
|
||||||
"svelte": "^3.59.2",
|
"prettier-plugin-svelte": "^3.1.2",
|
||||||
"svelte-check": "^3.4.6",
|
"svelte": "^4.2.8",
|
||||||
"svelte-dark-mode": "^2.1.0",
|
"svelte-check": "^3.6.2",
|
||||||
"svelte-time": "^0.7.2",
|
"svelte-time": "^0.8.2",
|
||||||
"tslib": "^2.6.0",
|
"tslib": "^2.6.2",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^5.3.3",
|
||||||
"unocss": "^0.48.5",
|
"unocss": "^0.58.2",
|
||||||
"vite": "^4.4.7"
|
"vite": "^5.0.10"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@unocss/reset": "^0.48.5",
|
"@unocss/reset": "^0.58.2",
|
||||||
"dayjs": "^1.11.9",
|
"dayjs": "^1.11.10",
|
||||||
|
"eslint-plugin-svelte": "^2.35.1",
|
||||||
"github-markdown-css": "^5.5.0",
|
"github-markdown-css": "^5.5.0",
|
||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"mathjax": "^3.2.2",
|
"mathjax": "^3.2.2",
|
||||||
"mdsvex": "^0.11.0",
|
"mdsvex": "^0.11.0",
|
||||||
|
"ofetch": "^1.3.3",
|
||||||
"rehype-katex": "^7.0.0",
|
"rehype-katex": "^7.0.0",
|
||||||
"rehype-mathjax": "^6.0.0",
|
"rehype-mathjax": "^6.0.0",
|
||||||
"remark-math": "^6.0.0",
|
"remark-math": "^6.0.0",
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
class="justify-center flex md:flex-row flex-col items-center m-auto shrink overflow-hidden h-screen"
|
class="justify-center flex md:flex-row flex-col items-center m-auto shrink overflow-hidden h-screen"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
in:fly={{ delay: 300, duration: 300, y: 50, easing: quintOut }}
|
in:fly={{ delay: 350, duration: 350, y: 50, easing: quintOut }}
|
||||||
out:fly={{ duration: 300, y: -50, easing: quintOut }}
|
out:fly={{ duration: 350, y: -50, easing: quintOut }}
|
||||||
class="flex flex-col md:pr-3"
|
class="flex flex-col md:pr-3"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col md:flex-row">
|
<div class="flex flex-col md:flex-row">
|
||||||
@ -45,14 +45,18 @@
|
|||||||
out:fly={{ duration: 300, y: 0, easing: quintOut }}
|
out:fly={{ duration: 300, y: 0, easing: quintOut }}
|
||||||
class="md:h-1/2 md:w-1 w-3/4 border-1 bg-black border-black dark:bg-white dark:border-white rounded-md"
|
class="md:h-1/2 md:w-1 w-3/4 border-1 bg-black border-black dark:bg-white dark:border-white rounded-md"
|
||||||
/>
|
/>
|
||||||
|
<!-- Secondary Content (Right) -->
|
||||||
<div class="md:pl-4 md:gap-1 flex md:h-50% flex-col place-items-start">
|
<div
|
||||||
|
in:fly={{ delay: 300, duration: 300, y: -50, easing: quintOut }}
|
||||||
|
out:fly={{ duration: 300, y: 50, easing: quintOut }}
|
||||||
|
class="md:pl-4 md:gap-1 flex md:h-50% flex-col place-items-start"
|
||||||
|
>
|
||||||
<div class="overflow-y-auto">
|
<div class="overflow-y-auto">
|
||||||
{#each data.posts as { title, date, description, slug }, i}
|
{#each data.posts as { title, date, description, slug }, i}
|
||||||
<a href="blog/{slug}">
|
<a href="blog/{slug}">
|
||||||
<!-- Gotta fix this, it's gonna look ugly when there are too many projects in the list... -->
|
<!-- Gotta fix this, it's gonna look ugly when there are too many projects in the list... -->
|
||||||
<div
|
<div
|
||||||
in:fly={{ delay: 350, duration: 300 * i, y: -50, easing: quintOut }}
|
in:fly={{ delay: 300, duration: 300 * i, y: -50, easing: quintOut }}
|
||||||
out:fly={{ duration: 300, y: 50, easing: quintOut }}
|
out:fly={{ duration: 300, y: 50, easing: quintOut }}
|
||||||
class="flex flex-col p-2 rounded dark:hover:bg-#082f49 hover:bg-blue-100"
|
class="flex flex-col p-2 rounded dark:hover:bg-#082f49 hover:bg-blue-100"
|
||||||
>
|
>
|
||||||
|
@ -38,8 +38,12 @@
|
|||||||
out:fly={{ duration: 300, y: 0, easing: quintOut }}
|
out:fly={{ duration: 300, y: 0, easing: quintOut }}
|
||||||
class="md:h-1/2 md:w-1 w-3/4 border-1 bg-black border-black dark:bg-white dark:border-white rounded-md"
|
class="md:h-1/2 md:w-1 w-3/4 border-1 bg-black border-black dark:bg-white dark:border-white rounded-md"
|
||||||
/>
|
/>
|
||||||
|
<!-- Secondary Content (Right) -->
|
||||||
<div class="md:pl-4 md:gap-1 flex md:h-50% flex-col place-items-start">
|
<div
|
||||||
|
in:fly={{ delay: 300, duration: 300, y: -50, easing: quintOut }}
|
||||||
|
out:fly={{ duration: 300, y: 50, easing: quintOut }}
|
||||||
|
class="md:pl-4 md:gap-1 flex md:h-50% flex-col place-items-start"
|
||||||
|
>
|
||||||
<div class="overflow-y-auto">
|
<div class="overflow-y-auto">
|
||||||
{#each proj as { name, date, desc, url, image, imdes }, i}
|
{#each proj as { name, date, desc, url, image, imdes }, i}
|
||||||
<a href={url}>
|
<a href={url}>
|
||||||
|
@ -12,7 +12,7 @@ export async function GET({ fetch }) {
|
|||||||
<title>Midou's blog</title>
|
<title>Midou's blog</title>
|
||||||
<description>A blog covering about anything that comes into my mind!</description>
|
<description>A blog covering about anything that comes into my mind!</description>
|
||||||
<link>https://midou.dev/</link>
|
<link>https://midou.dev/</link>
|
||||||
<atom:link href="https://midou.dev/blog/rss.xml" rel="self" type="application/rss+xml"/>
|
<atom:link href="https://midou.dev/rss.xml" rel="self" type="application/rss+xml"/>
|
||||||
${posts
|
${posts
|
||||||
.map(
|
.map(
|
||||||
(post) => `
|
(post) => `
|
||||||
@ -21,7 +21,6 @@ export async function GET({ fetch }) {
|
|||||||
<description>${post.description}</description>
|
<description>${post.description}</description>
|
||||||
<link>https://midou.dev/blog/${post.slug}</link>
|
<link>https://midou.dev/blog/${post.slug}</link>
|
||||||
<guid isPermaLink="true">https://midou.dev/blog/${post.slug}</guid>
|
<guid isPermaLink="true">https://midou.dev/blog/${post.slug}</guid>
|
||||||
<p> Since I am a dumbass, I don't know how to put the paragraph here! </p>
|
|
||||||
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
|
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
|
||||||
</item>
|
</item>
|
||||||
`
|
`
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// import adapter from '@sveltejs/adapter-auto';
|
// import adapter from '@sveltejs/adapter-auto';
|
||||||
import adapter from '@sveltejs/adapter-static';
|
//import adapter from '@sveltejs/adapter-static';
|
||||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
import adapter from '@sveltejs/adapter-node';
|
||||||
|
//import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||||
import { mdsvex, escapeSvelte } from 'mdsvex';
|
import { mdsvex, escapeSvelte } from 'mdsvex';
|
||||||
import shiki from 'shiki';
|
import shiki from 'shiki';
|
||||||
import math from 'remark-math';
|
import math from 'remark-math';
|
||||||
@ -13,7 +14,6 @@ const config = {
|
|||||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: [
|
preprocess: [
|
||||||
vitePreprocess(),
|
|
||||||
mdsvex({
|
mdsvex({
|
||||||
extensions: ['.md', 'svx'],
|
extensions: ['.md', 'svx'],
|
||||||
layout: 'src/lib/blog/+post.svelte',
|
layout: 'src/lib/blog/+post.svelte',
|
||||||
@ -36,13 +36,14 @@ const config = {
|
|||||||
extensions: ['.svelte', '.md', '.svx'],
|
extensions: ['.svelte', '.md', '.svx'],
|
||||||
|
|
||||||
kit: {
|
kit: {
|
||||||
adapter: adapter({
|
// adapter: adapter({
|
||||||
pages: 'build',
|
// pages: 'build',
|
||||||
assets: 'build',
|
// assets: 'build',
|
||||||
fallback: null,
|
// fallback: null,
|
||||||
precompress: false,
|
// precompress: false,
|
||||||
strict: false
|
// strict: false
|
||||||
})
|
// })
|
||||||
|
adapter: adapter()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ import {
|
|||||||
presetWebFonts
|
presetWebFonts
|
||||||
} from 'unocss';
|
} from 'unocss';
|
||||||
|
|
||||||
import { extractorSvelte } from 'unocss';
|
import extractorSvelte from '@unocss/extractor-svelte';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
extractors: [extractorSvelte],
|
extractors: [extractorSvelte()],
|
||||||
|
|
||||||
presets: [
|
presets: [
|
||||||
presetIcons(),
|
presetIcons(),
|
||||||
|
@ -13,6 +13,12 @@ const config: UserConfig = {
|
|||||||
],
|
],
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
include: ['dayjs/plugin/relativeTime.js']
|
include: ['dayjs/plugin/relativeTime.js']
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
port: 3000
|
||||||
|
},
|
||||||
|
preview: {
|
||||||
|
port: 3020
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user