Skip to content

Commit dc5123a

Browse files
authored
Merge pull request #14 from glandjs/develop
add new layout and new page
2 parents 7ff03f1 + c670b9c commit dc5123a

File tree

15 files changed

+571
-150
lines changed

15 files changed

+571
-150
lines changed

astro.config.mjs

Lines changed: 157 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
// @ts-check
21
import { defineConfig } from 'astro/config'
32
import starlight from '@astrojs/starlight'
43
import tailwind from '@astrojs/tailwind'
54

6-
// https://astro.build/config
75
export default defineConfig({
8-
site: 'https://glandjs.github.io/docs',
9-
base: '/docs/',
6+
site: 'https://glandjs.github.io',
7+
base: '/',
108
integrations: [
9+
tailwind({
10+
applyBaseStyles: false,
11+
}),
1112
starlight({
12-
expressiveCode: {
13-
themes: ['vesper'],
14-
},
1513
title: 'Gland',
14+
logo: {
15+
src: './src/assets/logo.svg',
16+
alt: 'Gland Documentation',
17+
},
1618
social: {
17-
github: 'https://github.com/glandjs/gland',
19+
github: 'https://github.com/glandjs/docs',
20+
discord: 'https://discord.gg/glandjs',
21+
npm: 'https://www.npmjs.com/package/@glandjs/core',
22+
},
23+
expressiveCode: {
24+
themes: ['github-dark-default'],
25+
styleOverrides: {
26+
borderRadius: '0.5rem',
27+
},
1828
},
19-
customCss: ['./src/tailwind.css'],
29+
customCss: ['@styles/tailwind.css'],
2030
components: {
2131
Header: '@components/Header.astro',
2232
ContentPanel: '@components/ContentPanel.astro',
@@ -35,18 +45,153 @@ export default defineConfig({
3545
attrs: {
3646
rel: 'preconnect',
3747
href: 'https://fonts.gstatic.com',
38-
crossorigin: true,
48+
crossorigin: 'anonymous',
49+
},
50+
},
51+
{
52+
tag: 'link',
53+
attrs: {
54+
rel: 'stylesheet',
55+
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap',
3956
},
4057
},
4158
{
4259
tag: 'link',
4360
attrs: {
4461
rel: 'stylesheet',
45-
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap',
62+
href: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap',
4663
},
4764
},
4865
],
66+
sidebar: [
67+
{
68+
label: 'Introduction',
69+
collapsed: false,
70+
items: [
71+
{
72+
label: 'Getting Started',
73+
link: '/getting-started',
74+
badge: 'New',
75+
},
76+
{
77+
label: 'Installation',
78+
link: '/installation',
79+
},
80+
{
81+
label: 'Quickstart',
82+
link: '/quickstart',
83+
},
84+
],
85+
},
86+
{
87+
label: 'Core Concepts',
88+
collapsed: false,
89+
items: [
90+
{
91+
label: 'Event-Driven Architecture',
92+
link: '/concepts/event-driven',
93+
},
94+
{
95+
label: 'Channels',
96+
link: '/concepts/channels',
97+
},
98+
{
99+
label: 'Controllers',
100+
link: '/concepts/controllers',
101+
},
102+
{
103+
label: 'Modules',
104+
link: '/concepts/modules',
105+
},
106+
],
107+
},
108+
{
109+
label: 'Guides',
110+
collapsed: true,
111+
items: [
112+
{
113+
label: 'Basic Usage',
114+
link: '/guides/basic-usage',
115+
},
116+
{
117+
label: 'Dependency Injection',
118+
link: '/guides/dependency-injection',
119+
},
120+
{
121+
label: 'Advanced Features',
122+
link: '/guides/advanced-features',
123+
},
124+
{
125+
label: 'Best Practices',
126+
link: '/guides/best-practices',
127+
},
128+
],
129+
},
130+
{
131+
label: 'HTTP Integration',
132+
collapsed: true,
133+
items: [
134+
{
135+
label: 'Express Integration',
136+
link: '/http/express',
137+
},
138+
{
139+
label: 'Fastify Integration',
140+
link: '/http/fastify',
141+
},
142+
{
143+
label: 'Custom Integrations',
144+
link: '/http/custom',
145+
},
146+
],
147+
},
148+
{
149+
label: 'API Reference',
150+
collapsed: true,
151+
items: [
152+
{
153+
label: 'Core API',
154+
link: '/api/core',
155+
},
156+
{
157+
label: 'Utilities',
158+
link: '/api/utilities',
159+
},
160+
{
161+
label: 'Configuration',
162+
link: '/api/configuration',
163+
},
164+
{
165+
label: 'Decorators',
166+
link: '/api/decorators',
167+
},
168+
],
169+
},
170+
{
171+
label: 'Resources',
172+
collapsed: true,
173+
items: [
174+
{
175+
label: 'FAQ',
176+
link: '/resources/faq',
177+
},
178+
{
179+
label: 'Examples',
180+
link: '/resources/examples',
181+
},
182+
{
183+
label: 'Community',
184+
link: '/resources/community',
185+
},
186+
{
187+
label: 'Contributing',
188+
link: '/resources/contributing',
189+
},
190+
],
191+
},
192+
],
193+
lastUpdated: true,
194+
pagination: true,
49195
}),
50-
tailwind({ applyBaseStyles: false }),
51196
],
52197
})

ec.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'
2+
3+
/** @type {import('@astrojs/starlight/expressive-code').StarlightExpressiveCodeOptions} */
4+
export default {
5+
plugins: [pluginLineNumbers()],
6+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"bugs": {
1313
"url": "https://github.com/glandjs/docs/issues"
1414
},
15-
"homepage": "https://glandjs.github.io/docs/",
15+
"homepage": "https://glandjs.github.io/",
1616
"scripts": {
1717
"dev": "astro dev",
1818
"start": "astro dev",
@@ -25,6 +25,7 @@
2525
"@astrojs/starlight": "^0.32.5",
2626
"@astrojs/starlight-tailwind": "^3.0.1",
2727
"@astrojs/tailwind": "^5.1.4",
28+
"@expressive-code/plugin-line-numbers": "^0.41.2",
2829
"astro": "^5.5.3",
2930
"sharp": "^0.32.5",
3031
"tailwindcss": "^3.4.4"

pnpm-lock.yaml

Lines changed: 40 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/logo.svg

Lines changed: 5 additions & 0 deletions
Loading

src/components/Header.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { Icon } from '@astrojs/starlight/components';
33
44
const navItems = [
55
{ name: "Gland_", href: "/help" },
6-
{ name: "docs", href: "/docs" },
7-
{ name: "Changelogs", href: "/changelogs" },
8-
{ name: "Community", href: "/community" }
6+
{ name: "documentation", href: "/documentation" },
7+
{ name: "changelog", href: "/changelog" },
8+
{ name: "community", href: "/community" }
99
];
1010
---
1111

1212
<div class="logo-section">
13-
<img src="/assets/logo.png" alt="Gland Logo" class="h-10 mr-3" />
13+
<img src="src/assets/logo.png" alt="Gland Logo" class="h-10 mr-3" />
1414
<span>GLAND</span>
1515
</div>
1616

@@ -74,7 +74,7 @@ const navItems = [
7474
document.addEventListener('DOMContentLoaded', () => {
7575
// Mobile menu toggle
7676
const mobileMenuButton = document.querySelector('.mobile-menu-button');
77-
const mobileMenu = document.querySelector('.mobile-menu');
77+
const mobileMenu = document.querySelector('.mobile-menu')!;
7878

7979
if (mobileMenuButton && mobileMenu) {
8080
mobileMenuButton.addEventListener('click', () => {

0 commit comments

Comments
 (0)