This commit is contained in:
2026-11-03 10:00:36 +01:00
parent 6326c2bb26
commit 8c280be7b8
8 changed files with 132 additions and 75 deletions
+5 -1
View File
@@ -50,4 +50,8 @@ dsql-schema-to-typedef.json
.git
/assets
/secrets
/secrets
/public/sitemap.xml
/public/robots.txt
/public/sitemap-chunks/
+2 -2
View File
@@ -6,7 +6,7 @@
"name": "new-personal-site-bunext",
"dependencies": {
"@moduletrace/bun-mariadb": "^1.1.1",
"@moduletrace/bunext": "^1.2.0",
"@moduletrace/bunext": "^1.2.4",
"gray-matter": "^4.0.3",
"html-to-react": "^1.7.0",
"lodash": "^4.17.21",
@@ -145,7 +145,7 @@
"@moduletrace/bun-mariadb": ["@moduletrace/[email protected]", "https://git.tben.me/api/packages/Moduletrace/npm/%40moduletrace%2Fbun-mariadb/-/1.1.1/bun-mariadb-1.1.1.tgz", { "dependencies": { "@inquirer/prompts": "^8.3.0", "chalk": "^5.6.2", "commander": "^14.0.3", "lodash": "^4.17.23", "sanitize-html": "^2.17.6" }, "peerDependencies": { "typescript": ">=5" }, "optionalPeers": ["typescript"], "bin": { "bun-mariadb": "dist/commands/index.js" } }, "sha512-nDKaKr59lC6td9rxwopvO3DQbpH34U+dPlGVFvozmsKu89hP7a/e0IpwnTfd7Otw9cnqPjG3F9a7tHWS7fCgdg=="],
"@moduletrace/bunext": ["@moduletrace/[email protected].0", "https://git.tben.me/api/packages/Moduletrace/npm/%40moduletrace%2Fbunext/-/1.2.0/bunext-1.2.0.tgz", { "dependencies": { "@tailwindcss/postcss": "^4.3.3", "@types/bun": "1.3.14", "@types/node": "^24.10.0", "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "bun-plugin-tailwind": "^0.1.2", "chalk": "^5.6.2", "chokidar": "^5.0.0", "commander": "^14.0.2", "esbuild": "^0.28.2", "lightningcss-wasm": "^1.32.0", "lodash": "^4.18.1", "ora": "^9.0.0", "postcss": "^8.5.30", "react": "^19.3.0", "react-dom": "^19.3.0", "tailwindcss": "^4.3.3", "typescript": "^5.0.0", "uuid": "^14.0.2" }, "bin": { "bunext": "dist/commands/index.js" } }, "sha512-GypVMYehm+ykoHB3ch6ygzLLJKa0Fo1ugLtLB0JZoJlZOgqYTvMuxmSLi/j2dL3t5NdAdcgzerkFp/7iU0jKJA=="],
"@moduletrace/bunext": ["@moduletrace/[email protected].4", "https://git.tben.me/api/packages/Moduletrace/npm/%40moduletrace%2Fbunext/-/1.2.4/bunext-1.2.4.tgz", { "dependencies": { "@tailwindcss/postcss": "^4.3.3", "@types/bun": "1.3.14", "@types/node": "^24.10.0", "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "bun-plugin-tailwind": "^0.1.2", "chalk": "^5.6.2", "chokidar": "^5.0.0", "commander": "^14.0.2", "esbuild": "^0.28.2", "lightningcss-wasm": "^1.32.0", "lodash": "^4.18.1", "ora": "^9.0.0", "postcss": "^8.5.30", "react": "^19.3.0", "react-dom": "^19.3.0", "tailwindcss": "^4.3.3", "typescript": "^5.0.0", "uuid": "^14.0.2" }, "bin": { "bunext": "dist/commands/index.js" } }, "sha512-DweIg++4JRDcBIsLOTyK8SCQye3myp+cU8nOse2f3Arg+gQOLAgN9cKUKcs22esENKQB4ywRNw5j2hSg718y9A=="],
"@oven/bun-darwin-aarch64": ["@oven/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Omj20SuiHBOUjUBIyqtkNjSUIjOtEOJwmbix/ZyFH4BaQ6OZTaaRWIR4TjHVz0yadHgli6lLTiAh1uarnvD49A=="],
+40 -7
View File
@@ -1,8 +1,29 @@
# #!/bin/bash
# set -e
# SOURCE_PATH="/home/archben/Projects/Git/personal/new-personal-site-bunext"
# SERVER_IP="150.136.47.131"
# SERVER_PATH="/docker/tben-me"
# cd $SOURCE_PATH
# rsync -avz --exclude-from=.gitignore --delete $SOURCE_PATH/ root@$SERVER_IP:$SERVER_PATH/
# ssh -i /home/archben/.ssh/tben root@$SERVER_IP << 'EOF'
# cd /docker/tben-me
# docker build -t tben-me .
# docker kill tben-me || echo "Service already killed"
# docker rm tben-me || echo "Container already removed"
# docker run --name tben-me -d --network nginx-proxy-manager --network mariadb --restart unless-stopped tben-me:latest
# EOF
#!/bin/bash
set -e
SOURCE_PATH="/home/archben/Projects/Git/personal/new-personal-site-bunext"
SOURCE_PATH="$HOME/Projects/Git/personal/new-personal-site-bunext"
SERVER_IP="150.136.47.131"
SERVER_PATH="/docker/tben-me"
@@ -10,11 +31,23 @@ SERVER_PATH="/docker/tben-me"
cd $SOURCE_PATH
rsync -avz --exclude-from=.gitignore --delete $SOURCE_PATH/ root@$SERVER_IP:$SERVER_PATH/
rsync -avz $SOURCE_PATH/secrets/prod.env root@$SERVER_IP:$SERVER_PATH/.env
ssh -i /home/archben/.ssh/tben root@$SERVER_IP << 'EOF'
cd /docker/tben-me
docker build -t tben-me .
docker kill tben-me || echo "Service already killed"
docker rm tben-me || echo "Container already removed"
docker run --name tben-me -d --network nginx-proxy-manager --network mariadb --restart unless-stopped tben-me:latest
ssh -i $HOME/.ssh/tben root@$SERVER_IP << 'EOF'
set -e
DEPLOY_NAME="tben-me"
cd /docker/$DEPLOY_NAME
docker build -t $DEPLOY_NAME .
docker kill $DEPLOY_NAME 2>/dev/null || echo "Service already killed"
docker rm $DEPLOY_NAME 2>/dev/null || echo "Container already removed"
docker run --name $DEPLOY_NAME -d \
--network nginx-proxy-manager --network mariadb \
-v /data/$DEPLOY_NAME/.data:/data \
--restart unless-stopped \
--cpus 0.5 --memory 1g \
--env-file /docker/$DEPLOY_NAME/.env \
$DEPLOY_NAME:latest
EOF
+2 -2
View File
@@ -2,7 +2,7 @@
set -e
SOURCE_PATH="/home/archben/Projects/Git/personal/new-personal-site-bunext"
SOURCE_PATH="$HOME/Projects/Git/personal/new-personal-site-bunext"
SERVER_IP="195.26.246.243"
SERVER_PATH="/docker/tben-me"
@@ -12,7 +12,7 @@ cd $SOURCE_PATH
rsync -avz --exclude-from=.gitignore --delete $SOURCE_PATH/ root@$SERVER_IP:$SERVER_PATH/
rsync -avz $SOURCE_PATH/secrets/prod.env root@$SERVER_IP:$SERVER_PATH/.env
ssh -i /home/archben/.ssh/tben root@$SERVER_IP << 'EOF'
ssh -i $HOME/.ssh/tben root@$SERVER_IP << 'EOF'
set -e
DEPLOY_NAME="tben-me"
+1 -1
View File
@@ -12,7 +12,7 @@
},
"dependencies": {
"@moduletrace/bun-mariadb": "^1.1.1",
"@moduletrace/bunext": "^1.2.0",
"@moduletrace/bunext": "^1.2.4",
"gray-matter": "^4.0.3",
"html-to-react": "^1.7.0",
"lodash": "^4.17.21",
+7 -6
View File
@@ -1,11 +1,12 @@
# https://www.tben.me robots.txt
# Generated by bunext
User-agent: *
Allow: /
Disallow: /admin
Disallow: /auth
Disallow: /api
Disallow: /media
Disallow: /ws
Disallow: /webhooks
# Sitemaps
Sitemap: https://www.tben.me/sitemap.xml
# Optional: disallow common non-content paths (uncomment if needed)
Disallow: /api/
Disallow: /_next/
+44 -55
View File
@@ -1,58 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- Homepage -->
<url>
<loc>https://www.tben.me/</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<!-- Main Pages -->
<url>
<loc>https://www.tben.me/about</loc>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.tben.me/skills</loc>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.tben.me/work</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.tben.me/blog</loc>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.tben.me/contact</loc>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>
<!-- Blog Posts -->
<url>
<loc>https://www.tben.me/blog/nginx-reverse-proxy-caching-rate-limiting-static-files</loc>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>
<url>
<loc>https://www.tben.me/blog/solving-the-database-hassle</loc>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.tben.me/blog/find-your-perfect-framework</loc>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.tben.me/blog/choosing-your-tech-stack</loc>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.tben.me/</loc>
<lastmod>2026-10-15T03:50:16.406Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/blog/choosing-your-tech-stack</loc>
<lastmod>2025-07-25T18:18:31.270Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/blog/find-your-perfect-framework</loc>
<lastmod>2025-07-25T18:18:23.918Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/blog/solving-the-database-hassle</loc>
<lastmod>2025-07-25T18:18:13.396Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/blog/nginx-reverse-proxy-caching-rate-limiting-static-files</loc>
<lastmod>2026-02-16T12:14:02.760Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/blog/bunext-replacing-next-js-from-scratch</loc>
<lastmod>2026-03-29T07:49:03.579Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/blog</loc>
<lastmod>2026-10-15T03:50:16.406Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/skills</loc>
<lastmod>2026-10-15T03:50:16.406Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/about</loc>
<lastmod>2026-10-15T03:50:16.406Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/work</loc>
<lastmod>2026-10-15T03:50:16.406Z</lastmod>
</url>
<url>
<loc>https://www.tben.me/contact</loc>
<lastmod>2026-10-15T03:50:16.406Z</lastmod>
</url>
</urlset>
+31 -1
View File
@@ -4,7 +4,10 @@ import {
} from "@/db/types/db";
import { PagePropsType } from "@/src/types";
import BunMariaDB from "@moduletrace/bun-mariadb";
import { BunextPageServerFn } from "@moduletrace/bunext/types";
import {
BunextPageServerFn,
BunextPageSitemapFn,
} from "@moduletrace/bunext/types";
export const server: BunextPageServerFn<PagePropsType> = async (ctx) => {
const blog_post = await BunMariaDB.select<
@@ -38,3 +41,30 @@ export const server: BunextPageServerFn<PagePropsType> = async (ctx) => {
},
};
};
export const sitemap: BunextPageSitemapFn = async ({ route }) => {
const blog_post = await BunMariaDB.select<
BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS,
(typeof BunMariaDBTables)[number]
>({
table: "blog_posts",
query: {
query: {
published: {
value: 1,
},
},
},
});
return (
blog_post.payload?.map((bp) => {
return {
path: `/blog/${bp.slug}`,
lastmod: bp.date_updated_code
? new Date(Number(bp.date_updated_code))
: undefined,
};
}) || []
);
};