Skip to content

Commit 4499ab0

Browse files
committed
misc
1 parent 29d8835 commit 4499ab0

File tree

12 files changed

+69
-12
lines changed

12 files changed

+69
-12
lines changed

bun.lockb

-3.78 KB
Binary file not shown.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
"start": "vinxi start"
99
},
1010
"devDependencies": {
11-
"@iconify/json": "^2.2.247",
12-
"unocss": "^0.62.3",
13-
"@unocss/transformer-directives": "^0.62.3"
11+
"@iconify/json": "^2.2.250",
12+
"unocss": "^0.62.4",
13+
"@unocss/transformer-directives": "^0.62.4"
1414
},
1515
"dependencies": {
1616
"@docsearch/css": "^3.6.1",
1717
"@docsearch/js": "3",
1818
"@mdx-js/mdx": "^3.0.1",
1919
"@solidjs/meta": "^0.29.4",
20-
"@solidjs/router": "^0.14.3",
20+
"@solidjs/router": "^0.14.5",
2121
"@solidjs/start": "^1.0.6",
2222
"@vinxi/plugin-mdx": "^3.7.2",
2323
"rehype-highlight": "^7.0.0",
2424
"solid-js": "^1.8.22",
2525
"solid-mdx": "^0.0.7",
26-
"vinxi": "^0.4.2"
26+
"vinxi": "^0.4.3"
2727
},
2828
"engines": {
2929
"node": ">=18"

public/news/nvui.jpeg

62.9 KB
Loading

public/news/nvui.svg

Lines changed: 19 additions & 0 deletions
Loading

public/news/v2.0.jpeg

594 KB
Loading

public/news/v2.5.jpeg

1.44 MB
Loading

src/app.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,31 @@ const metaData: any = {};
1717
const defaultMeta = {
1818
title: "NvChad",
1919
desc: "Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your Neovim experience.",
20+
ogimg: "v2.5.jpeg",
2021
};
2122

2223
for (const path in routes) {
2324
let route = path.replace("./routes", "").replace(/\.[^.]+$/, "");
2425
route = route.replace("index", "");
2526
const moduleMeta = routes[path]?.meta || defaultMeta; // Accessing the meta property of the module
27+
28+
moduleMeta.ogimg = moduleMeta.cover
29+
? moduleMeta.cover.split(".")[0] + '.jpeg'
30+
: defaultMeta.ogimg;
31+
2632
metaData[route] = moduleMeta;
2733
}
2834

2935
metaData["/themes/"] = metaData["/themes"];
3036

3137
export default function App() {
38+
3239
return (
3340
<Router
3441
base={import.meta.env.SERVER_BASE_URL}
35-
root={(props) => (
42+
root={(props) => {
43+
44+
return (
3645
<MetaProvider>
3746
<Title>{metaData[props.location.pathname]?.title}</Title>
3847

@@ -47,18 +56,18 @@ export default function App() {
4756

4857
<Meta
4958
name="twitter:image:src"
50-
content="https://repository-images.githubusercontent.com/345368765/343e772f-d6e9-4a6b-84dc-8936f0c2706d"
59+
content={metaData[props.location.pathname]?.ogimg}
5160
/>
5261

5362
<Meta
5463
property="og:image"
55-
content="https://repository-images.githubusercontent.com/345368765/343e772f-d6e9-4a6b-84dc-8936f0c2706d"
64+
content={metaData[props.location.pathname]?.ogimg}
5665
/>
5766

5867
<Navbar pathname={props.location.pathname} />
5968
<Suspense>{props.children}</Suspense>
6069
</MetaProvider>
61-
)}
70+
)}}
6271
>
6372
<FileRoutes />
6473
</Router>

src/components/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function Navbar(props: Proptypes) {
134134
text-lg font-medium p-4 py-3 max-w-[1700px] mx-auto`;
135135

136136
return (
137-
<nav class="sticky top-0 z-50 shadow-md" bg="dark:dark-3">
137+
<nav class="sticky top-0 z-50 shadow-md" bg="white-1 dark:dark-3">
138138
<div class={styles}>
139139
<div md="flex gap-3 mx-auto" class="grid justify-between w-full gap-5">
140140
<Links />

src/routes/news/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,28 @@ const toMeta = (v) =>
55
}));
66

77
const news = toMeta(import.meta.glob("./*.mdx", { eager: true }));
8+
news.sort((a, b) => a.order - b.order);
89

910
export const meta = {
1011
title: "NvChad release blogs",
1112
desc: "List of NvChad version release news / guides",
1213
};
1314

15+
const jpegImg = (str) => str.replace(/\.\w+$/, ".jpeg");
16+
1417
function News() {
1518
return (
16-
<div m="x-auto" max="w-[1700px]" >
19+
<div m="x-auto" max="w-[1700px]">
1720
{/* overview cards */}
1821
<div grid gap5 class="md:grid-cols-2 2xl:grid-cols-4">
1922
{news.map((x) => (
2023
<div class=" flex flex-col items-start" bg="slate1 dark:dark-3">
21-
<img src={`/news/${x.cover}`} w-full rounded-t-lg loading="lazy" />
24+
<img
25+
src={`/news/${jpegImg(x.cover)}`}
26+
w-full
27+
rounded-t-lg
28+
loading="lazy"
29+
/>
2230

2331
<div h-full flex flex-col gap-4 justify-between p-7>
2432
<div>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export const meta = {
2+
title: "Base46 and UI plugin go general",
3+
desc:
4+
"NvChad's Base46 and UI plugin can now be used by non nvchad users! docs at :h nvui",
5+
cover: "nvui.svg",
6+
order: 3,
7+
}
8+
9+
# NvUI for all
10+
11+
![v2.0 poster](/news/nvui.svg)
12+
13+
## Introduction
14+
15+
NvChad got famous due to its look, which are powered by its Base46 & UI plugin!
16+
17+
- Base46 : Powerful Collection of 68 beautifully crafted themes, extensible and compiled to bytecode
18+
- UI : Collection of various core utilities like statusline, dashbaord,
19+

src/routes/news/v2.0_release.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const meta = {
33
desc:
44
"New UI features & using lazy.nvim. Improvements in startuptime, using base46 theme plugin as theme compiler",
55
cover: "v2.0.webp",
6+
order: 1,
67
}
78

89
# Announcing NvChad v2.0

src/routes/news/v2.5_release.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export const meta = {
22
title: "NvChad v2.5 released!",
33
desc: 'Minor NvChad release with standard neovim config structure, new 11 themes, UI Term module replacing nvterm.',
44
cover: "v2.5.webp",
5+
order: 2,
56
}
67

78
# NvChad v2.5 Released!

0 commit comments

Comments
 (0)