-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathastro.config.mjs
More file actions
189 lines (187 loc) · 6.05 KB
/
Copy pathastro.config.mjs
File metadata and controls
189 lines (187 loc) · 6.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import netlify from '@astrojs/netlify';
export default defineConfig({
output: 'static',
adapter: netlify(),
vite: {
resolve: {
alias: {
'@components': '/src/components',
'@data': '/src/data',
},
},
},
integrations: [
starlight({
title: 'Codex',
description: 'A curated, OS-agnostic field reference for offensive security.',
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/Athena-OS/codex' }],
// Enable the "Edit page" link in the page footer. Starlight appends
// the file path (relative to the project root) onto this baseUrl,
// so the resulting link goes straight to GitHub's web editor for
// the corresponding .mdx file. Lowers the barrier to community
// contributions — typo fixes and "this also works on Server 2022"
// notes become a 30-second round trip instead of a fork-clone-PR
// dance.
editLink: {
baseUrl: 'https://github.com/Athena-OS/codex/edit/main/',
},
components: {
Head: './src/components/Head.astro',
PageFrame: './src/components/PageFrame.astro',
PageTitle: './src/components/PageTitle.astro',
SiteTitle: './src/components/SiteTitle.astro',
ThemeSelect: './src/components/ThemeSelect.astro',
Footer: './src/components/Footer.astro',
},
// Customize Expressive Code's copy button to fit the Codex palette.
// The defaults use a hardcoded green tooltip background (terminal.ansiGreen)
// which clashes with the accent palette. We replace it with palette-aware
// CSS variables — both the button itself and the success tooltip now
// follow whatever hue the user picks via the palette tuner.
expressiveCode: {
// Map non-bundled languages to the closest bundled grammar so
// Expressive Code stops emitting "language not found" warnings
// for code blocks tagged with these identifiers. The displayed
// language label on the code-block frame keeps the original
// identifier; only the highlighting grammar changes.
//
// asp / aspx / jsp → html: these are all "HTML-with-embedded-
// script-blocks" formats. HTML highlighting catches the
// structural tags correctly; the script-block contents render
// as plain text inside, which is the same fallback Shiki
// would apply to fully-unknown languages anyway.
// named → text: BIND DNS zone files have no close analog in
// Shiki's bundled grammars. `text` is the explicit no-op
// fallback recommended by Shiki for unsupported languages.
shiki: {
langAlias: {
asp: 'html',
aspx: 'html',
jsp: 'html',
named: 'text',
},
},
styleOverrides: {
frames: {
// === Copy button — idle, hover, active states ===
// Use the accent color for the button surface and border.
// Opacities are tuned so the button reads as "tinted accent"
// rather than fully opaque accent (which would be loud).
inlineButtonForeground: 'var(--codex-accent)',
inlineButtonBackground: 'var(--codex-accent)',
inlineButtonBorder: 'var(--codex-accent)',
inlineButtonBackgroundIdleOpacity: '0.08',
inlineButtonBackgroundHoverOrFocusOpacity: '0.20',
inlineButtonBackgroundActiveOpacity: '0.35',
inlineButtonBorderOpacity: '0.55',
// === Success tooltip — was bright green, now accent-tinted ===
// We use the accent token directly so the "Copied!" bubble
// follows the palette hue. Foreground is the page background
// for solid contrast.
tooltipSuccessBackground: 'var(--codex-accent)',
tooltipSuccessForeground: 'var(--codex-bg)',
},
},
},
customCss: [
'./src/styles/codex.css',
'./src/styles/background.css',
],
sidebar: [
{
label: 'Network',
items: [
{
label: 'Reconnaissance',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/network/recon' } }],
},
{
label: 'Service Footprinting',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/network/services' } }],
},
],
},
{
label: 'Web',
items: [
{
label: 'Authentication & Sessions',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/auth' } }],
},
{
label: 'Command Injection',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/command-injection' } }],
},
{
label: 'File Inclusion',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/lfi' } }],
},
{
label: 'File Upload',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/uploads' } }],
},
{
label: 'IDOR',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/idor' } }],
},
{
label: 'Server-Side',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/server-side' } }],
},
{
label: 'Sessions',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/sessions' } }],
},
{
label: 'SQL Injection',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/sqli' } }],
},
{
label: 'Web Services & APIs',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/web-services' } }],
},
{
label: 'WordPress',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/wordpress' } }],
},
{
label: 'XSS',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/xss' } }],
},
{
label: 'XXE',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/web/xxe' } }],
},
],
},
{
label: 'Windows',
items: [
{
label: 'Privilege Escalation',
collapsed: true,
items: [{ autogenerate: { directory: 'codex/windows/privesc' } }],
},
],
},
],
}),
],
});