Updates
This commit is contained in:
@@ -64,19 +64,19 @@ export const work = {
|
||||
"Tailwind CSS",
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Circlenav",
|
||||
description: "The AI search engine done right",
|
||||
href: "https://circlenav.net",
|
||||
metrics: [""],
|
||||
technologies: [
|
||||
"SearXNG",
|
||||
"NextJS",
|
||||
"Docker",
|
||||
"Grok (XAI)",
|
||||
"Websockets",
|
||||
],
|
||||
},
|
||||
// {
|
||||
// title: "Circlenav",
|
||||
// description: "The AI search engine done right",
|
||||
// href: "https://circlenav.net",
|
||||
// metrics: [""],
|
||||
// technologies: [
|
||||
// "SearXNG",
|
||||
// "NextJS",
|
||||
// "Docker",
|
||||
// "Grok (XAI)",
|
||||
// "Websockets",
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
},
|
||||
Devops: {
|
||||
@@ -146,6 +146,20 @@ export const work = {
|
||||
"Azure",
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Bun MariaDB",
|
||||
description:
|
||||
"A schema-driven MariaDB manager for Bun, featuring automatic schema synchronization, type-safe CRUD operations, vector embedding support, and TypeScript type definition generation.",
|
||||
href: "https://git.tben.me/Moduletrace/bun-mariadb",
|
||||
technologies: [
|
||||
"MariaDB",
|
||||
"SQL",
|
||||
"Bun",
|
||||
"Shell",
|
||||
"Typescript",
|
||||
"Vector Database",
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Bun SQLite",
|
||||
description:
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export const SiteData = {
|
||||
SiteName: `Tben INC`,
|
||||
SiteSlug: `tben-inc`,
|
||||
SiteDescription: `10X Software and Devops Engineer`,
|
||||
SiteURL: `https://www.tben.me`,
|
||||
} as const;
|
||||
@@ -1,29 +1,40 @@
|
||||
import {
|
||||
BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS,
|
||||
BunMariaDBTables,
|
||||
} from "@/db/types/db";
|
||||
import { PagePropsType } from "@/src/types";
|
||||
import BunMariaDB from "@moduletrace/bun-mariadb";
|
||||
import { BunextPageServerFn } from "@moduletrace/bunext/types";
|
||||
|
||||
export const server: BunextPageServerFn<PagePropsType> = async (ctx) => {
|
||||
// const blog_post_res = await sql`
|
||||
// SELECT * FROM blog_posts
|
||||
// WHERE slug=${ctx.query?.slug}
|
||||
// `;
|
||||
const blog_post = await BunMariaDB.select<
|
||||
BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS,
|
||||
(typeof BunMariaDBTables)[number]
|
||||
>({
|
||||
table: "blog_posts",
|
||||
query: {
|
||||
query: {
|
||||
slug: {
|
||||
value: ctx.query?.slug,
|
||||
},
|
||||
published: {
|
||||
value: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// const blog_post: DSQL_TBEN_ME_BLOG_POSTS = [...blog_post_res]?.[0];
|
||||
|
||||
// if (!blog_post?.body) {
|
||||
// return {
|
||||
// props: {},
|
||||
// };
|
||||
// }
|
||||
|
||||
// const pageMdString = blog_post.body;
|
||||
|
||||
// const pageGrayMatter = matter(pageMdString);
|
||||
|
||||
// const content = pageGrayMatter.content;
|
||||
if (!blog_post?.single_res?.id) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/blog",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
props: {
|
||||
blogPost: {},
|
||||
blogPost: blog_post.single_res,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,19 +1,34 @@
|
||||
import {
|
||||
BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS,
|
||||
BunMariaDBTables,
|
||||
} from "@/db/types/db";
|
||||
import { PagePropsType } from "@/src/types";
|
||||
import { DSQL_TBEN_ME_BLOG_POSTS } from "@/src/types/dsql";
|
||||
import BunMariaDB from "@moduletrace/bun-mariadb";
|
||||
import { BunextPageServerFn } from "@moduletrace/bunext/types";
|
||||
import _ from "lodash";
|
||||
|
||||
export const server: BunextPageServerFn<PagePropsType> = async (ctx) => {
|
||||
// const blog_posts_res = await sql`
|
||||
// SELECT * FROM blog_posts
|
||||
// WHERE published=1
|
||||
// ORDER BY id DESC
|
||||
// `;
|
||||
|
||||
// const blog_posts: DSQL_TBEN_ME_BLOG_POSTS[] = [...blog_posts_res];
|
||||
const blog_posts = await BunMariaDB.select<
|
||||
BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS,
|
||||
(typeof BunMariaDBTables)[number]
|
||||
>({
|
||||
table: "blog_posts",
|
||||
query: {
|
||||
order: {
|
||||
field: "id",
|
||||
strategy: "DESC",
|
||||
},
|
||||
query: {
|
||||
published: {
|
||||
value: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
props: {
|
||||
blogPosts: [],
|
||||
blogPosts: blog_posts.payload || [],
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { DSQL_TBEN_ME_BLOG_POSTS } from "./dsql";
|
||||
import { BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS } from "@/db/types/db";
|
||||
|
||||
export type PagePropsType = {
|
||||
blogPosts?: DSQL_TBEN_ME_BLOG_POSTS[] | null;
|
||||
blogPost?: DSQL_TBEN_ME_BLOG_POSTS | null;
|
||||
blogPosts?: BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS[] | null;
|
||||
blogPost?: BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user