Skip to content

Commit 12a4359

Browse files
authored
Dev (#223)
* update pkg * clean docs * rm unused styles * misc * add blog posts , docs etc
1 parent e10e4af commit 12a4359

25 files changed

+237
-466
lines changed

bun.lockb

9.07 KB
Binary file not shown.

package.json

Lines changed: 9 additions & 9 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.220",
12-
"unocss": "^0.61.0",
13-
"@unocss/transformer-directives": "^0.61.0"
11+
"@iconify/json": "^2.2.250",
12+
"unocss": "^0.62.4",
13+
"@unocss/transformer-directives": "^0.62.4"
1414
},
1515
"dependencies": {
16-
"@docsearch/css": "^3.6.0",
16+
"@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.13.5",
21-
"@solidjs/start": "^1.0.1",
22-
"@vinxi/plugin-mdx": "^3.7.1",
20+
"@solidjs/router": "^0.14.5",
21+
"@solidjs/start": "^1.0.6",
22+
"@vinxi/plugin-mdx": "^3.7.2",
2323
"rehype-highlight": "^7.0.0",
24-
"solid-js": "^1.8.17",
24+
"solid-js": "^1.8.22",
2525
"solid-mdx": "^0.0.7",
26-
"vinxi": "^0.3.12"
26+
"vinxi": "^0.4.3"
2727
},
2828
"engines": {
2929
"node": ">=18"

public/news/nvui.jpeg

168 KB
Loading

public/news/nvui.webp

170 KB
Binary file not shown.

public/news/v2.0.jpeg

594 KB
Loading

public/news/v2.5.jpeg

1.44 MB
Loading

public/news/volt.jpeg

189 KB
Loading

public/news/volt.webp

184 KB
Binary file not shown.

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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +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
138-
border="0 b solid slate-2 dark:dark-4"
139-
bg-white-1
140-
class="sticky top-0 z-50"
141-
dark:bg-dark-2
142-
shadow={props.pathname.includes("docs") ? "" : "lg"}
143-
>
137+
<nav class="sticky top-0 z-50 shadow-md" bg="white-1 dark:dark-3">
144138
<div class={styles}>
145139
<div md="flex gap-3 mx-auto" class="grid justify-between w-full gap-5">
146140
<Links />

src/components/doc_comps/Sidebar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@ export const sidebar_Items = [
1212
},
1313

1414
{
15-
label: ["Configure", "i-line-md:cog-filled"],
15+
label: ["Customize", "i-line-md:cog-filled"],
1616
items: [
1717
["Walkthrough", "config/walkthrough"],
1818
["Manage Plugins", "config/plugins"],
1919
["LSP Configuration", "config/lsp"],
2020
["Mappings", "config/mappings"],
21+
["Snippets", "config/snippets"],
2122
["UI Plugin", "config/nvchad_ui"],
2223
["Theming", "config/theming"],
23-
["Snippets", "config/snippets"],
2424
],
2525
},
2626

2727
["Features", "features", "i-tabler:server-cog"],
2828
["Recipes", "recipes", "i-mingcute:tool-fill"],
29-
["Api Functions", "api", "i-mdi:atom-variant"],
3029
["Contributing", "contribute", "i-mdi-github"],
3130
["Faq", "faq", "i-octicon:question-16"],
3231
["Credits", "credits", "i-line-md:heart"],

src/css/markdown.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -448,21 +448,6 @@
448448
@apply text-red;
449449
}
450450

451-
.iframe-container {
452-
position: relative;
453-
width: 100%;
454-
height: 0;
455-
padding-bottom: 56.25%; /* adjust this value to match the aspect ratio of your iframe */
456-
}
457-
458-
.iframe-container iframe {
459-
position: absolute;
460-
top: 0;
461-
left: 0;
462-
width: 100%;
463-
height: 100%;
464-
@apply rounded-lg softShadow;
465-
}
466451

467452
#DocContent img {
468453
@apply rounded-lg;

src/css/style.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,19 @@ h2 {
8585
img {
8686
@apply animate-fade-in animate-duration-300;
8787
}
88+
89+
.iframe-container {
90+
position: relative;
91+
width: 100%;
92+
height: 0;
93+
padding-bottom: 56.25%; /* adjust this value to match the aspect ratio of your iframe */
94+
}
95+
96+
.iframe-container iframe {
97+
position: absolute;
98+
top: 0;
99+
left: 0;
100+
width: 100%;
101+
height: 100%;
102+
@apply rounded-lg softShadow;
103+
}

src/routes/docs/api.mdx

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/routes/docs/config/lsp.mdx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Then check [server_configurations.md](https://github.com/neovim/nvim-lspconfig/b
1616
{
1717
"neovim/nvim-lspconfig",
1818
config = function()
19-
require("nvchad.configs.lspconfig").defaults()
2019
require "configs.lspconfig"
2120
end,
2221
},
@@ -27,33 +26,27 @@ Then check [server_configurations.md](https://github.com/neovim/nvim-lspconfig/b
2726
- **configs/lspconfig.lua**
2827

2928
```lua
30-
local configs = require("nvchad.configs.lspconfig")
29+
local nvlsp = require "nvchad.configs.lspconfig"
30+
local lspconfig = require "lspconfig"
3131

32-
local on_attach = configs.on_attach
33-
local on_init = configs.on_init
34-
local capabilities = configs.capabilities
32+
nvlsp.defaults() -- loads nvchad's defaults
3533

36-
local lspconfig = require "lspconfig"
37-
local servers = { "html", "cssls", "clangd"}
34+
local servers = { "html", "cssls", "clangd" }
3835

36+
-- lsps with default config
3937
for _, lsp in ipairs(servers) do
4038
lspconfig[lsp].setup {
41-
on_init = on_init,
42-
on_attach = on_attach,
43-
capabilities = capabilities,
39+
on_attach = nvlsp.on_attach,
40+
on_init = nvlsp.on_init,
41+
capabilities = nvlsp.capabilities,
4442
}
4543
end
4644

4745
-- Without the loop, you would have to manually set up each LSP
4846
--
4947
-- lspconfig.html.setup {
50-
-- on_attach = on_attach,
51-
-- capabilities = capabilities,
52-
-- }
53-
--
54-
-- lspconfig.cssls.setup {
55-
-- on_attach = on_attach,
56-
-- capabilities = capabilities,
48+
-- on_attach = nvlsp.on_attach,
49+
-- capabilities = nvlsp.capabilities,
5750
-- }
5851
```
5952
## Mason.nvim

src/routes/docs/config/mappings.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ The mapping configuration uses the nvim name shortcuts as:
1616
## Mapping format
1717

1818
- NvChad uses `vim.keymap.set` by default, check `:h vim.keymap.set` for detailed docs.
19-
- The desc opt is optional. It's only needed for NvCheatsheet to document, First word in desc will be used for group heading.
20-
21-
- NvCheatsheet groups require at least 2 mappings
19+
- The desc opt is optional. It's only needed for NvCheatsheet to document
2220

2321
```lua
2422
local map = vim.keymap.set
@@ -27,6 +25,7 @@ map("n", "<leader>ff", "<cmd> Telescope <cr>")
2725

2826
-- multiple modes
2927
map({ "i", "n" }, "<C-k>", "<Up>", { desc = "Move up" })
28+
map({ "i", "n" }, "<C-j>", "<Down>", { desc = "Move down" })
3029

3130
-- mapping with a lua function
3231
map("n", "<A-i>", function()
@@ -42,4 +41,5 @@ nomap("n", "<C-k>")
4241

4342
<br/>
4443

45-
- Do know that lsp & gitsigns mappings wont be overrided by the above methods, because they dont load on startup & are lazy loaded. So put the lsp ones in `LspAttach` autocmd or right after your on_attach
44+
- Do know that lsp mappings wont be overrided by the above methods, because they dont load on startup & are lazy loaded.
45+
- So put the lsp ones in `LspAttach` autocmd or right after your on_attach

0 commit comments

Comments
 (0)