1- import { defineConfig } from 'astro/config' ;
2- import tailwind from "@astrojs/tailwind" ;
3- import vercel from '@astrojs/vercel/serverless' ;
4- import sitemap from "@astrojs/sitemap" ;
5- import mdx from "@astrojs/mdx" ;
6- import rehypeAutolinkHeadings from 'rehype-autolink-headings' ;
7- import { rehypeHeadingIds } from '@astrojs/markdown-remark' ;
8- import { h } from 'hastscript' ;
9-
10- const AnchorLinkIcon = h (
11- 'span' ,
12- { ariaHidden : 'true' , class : 'anchor-icon grid items-center' } ,
13- h (
14- 'svg' ,
15- {
16- width : 16 ,
17- height : 16 ,
18- viewBox : '0 0 16 16' ,
19- xlmns : 'http://www.w3.org/2000/svg' ,
20- fill : 'currentcolor' ,
21- } ,
22- h ( 'path' , {
23- d : 'M6.354 5.5H4a3 3 0 0 0 0 6h3a3 3 0 0 0 2.83-4H9c-.086 0-.17.01-.25.031A2 2 0 0 1 7 10.5H4a2 2 0 1 1 0-4h1.535c.218-.376.495-.714.82-1z' ,
24- } ) ,
25- h ( 'path' , {
26- d : 'M9 5.5a3 3 0 0 0-2.83 4h1.098A2 2 0 0 1 9 6.5h3a2 2 0 1 1 0 4h-1.535a4.02 4.02 0 0 1-.82 1H12a3 3 0 1 0 0-6H9z' ,
27- } )
28- )
29- ) ;
1+ import { defineConfig } from "astro/config" ;
2+ import starlight from "@astrojs/starlight" ;
3+ import vercel from "@astrojs/vercel/serverless" ;
4+ import starlightBlog from "starlight-blog" ;
5+ import starlightLinksValidator from "starlight-links-validator" ;
306
317// https://astro.build/config
328export default defineConfig ( {
33- integrations : [
34- tailwind ( ) ,
35- sitemap ( ) ,
36- mdx ( {
37- optimize : true ,
38- } )
39- ] ,
409 output : "server" ,
4110 adapter : vercel ( {
4211 webAnalytics : {
43- enabled : true
44- }
12+ enabled : true ,
13+ } ,
4514 } ) ,
46- site : 'https://openresource.dev' ,
47- // used for sitemap
15+ site : "https://openresource.dev" ,
4816 vite : {
4917 define : {
50- 'import.meta.env.PUBLIC_VERCEL_ANALYTICS_ID' : JSON . stringify ( process . env . VERCEL_ANALYTICS_ID )
51- }
18+ "import.meta.env.PUBLIC_VERCEL_ANALYTICS_ID" : JSON . stringify (
19+ process . env . VERCEL_ANALYTICS_ID
20+ ) ,
21+ } ,
22+ } ,
23+ redirects : {
24+ '/books' : '/resources/books' ,
25+ '/events' : '/resources/events' ,
26+ '/open-sourcerers' : '/resources/open-sourcerers' ,
27+ '/podcasts' : '/resources/podcasts' ,
5228 } ,
53- markdown : {
54- rehypePlugins : [
55- rehypeHeadingIds ,
56- [
57- rehypeAutolinkHeadings ,
29+ integrations : [
30+ starlight ( {
31+ components : {
32+ Footer : "./src/components/Footer.astro" ,
33+ Head : "./src/components/Head.astro" ,
34+ PageTitle : "./src/components/PageTitleThenReadingTime.astro" ,
35+ Pagination : "./src/components/SupportThenPagination.astro" ,
36+ Header : "./src/components/Header.astro" ,
37+ } ,
38+ plugins : [
39+ starlightLinksValidator ( {
40+ exclude : [ "/articles" ] ,
41+ } ) ,
42+ starlightBlog ( {
43+ title : "Articles" ,
44+ prefix : "articles" ,
45+ authors : {
46+ julien : {
47+ name : "Julien Déramond" ,
48+ title : "Open {re}Source • Bootstrap • Orange" ,
49+ picture : "https://avatars.githubusercontent.com/u/17381666?s=200" ,
50+ url : "https://github.com/julien-deramond/" ,
51+ } ,
52+ } ,
53+ } ) ,
54+ ] ,
55+ title : "Open {re}Source" ,
56+ favicon : "./favicon.ico" ,
57+ logo : {
58+ light : "./src/assets/logo.svg" ,
59+ dark : "./src/assets/logo-dark.svg" ,
60+ replacesTitle : true ,
61+ } ,
62+ editLink : {
63+ baseUrl : "https://github.com/Open-reSource/openresource.dev/edit/main/" ,
64+ } ,
65+ social : {
66+ github : "https://github.com/Open-reSource/openresource.dev" ,
67+ discord : "https://discord.gg/fpUDwEMGwE" ,
68+ "x.com" : "https://x.com/open_resource" ,
69+ linkedin : "https://linkedin.com/company/open-re-source/" ,
70+ mastodon : "https://fosstodon.org/@openresource" ,
71+ blueSky : "https://bsky.app/profile/openresource.bsky.social" ,
72+ threads : "https://www.threads.net/@openresource" ,
73+ } ,
74+ customCss : [ "./src/styles/custom.css" ] ,
75+ defaultLocale : "root" ,
76+ locales : {
77+ root : {
78+ label : "English" ,
79+ lang : "en" ,
80+ } ,
81+ } ,
82+ sidebar : [
5883 {
59- properties : { class : 'anchor-link' } ,
60- behavior : 'after' ,
61- group : ( ) => h ( 'div' , { tabIndex : - 1 , class : "heading-wrapper" } ) ,
62- content : ( heading ) => [
63- AnchorLinkIcon ,
64- h (
65- 'span' ,
66- { 'is:raw' : true , class : 'sr-only' } ,
67- heading ?. children [ 0 ] ?. value
68- )
84+ label : "Guide" ,
85+ items : [
86+ {
87+ label : "Introduction" ,
88+ slug : "guide" ,
89+ } ,
90+ {
91+ label : "What Is Open Source?" ,
92+ collapsed : false ,
93+ items : [
94+ {
95+ label : "Introduction" ,
96+ slug : "guide/what-is-open-source" ,
97+ } ,
98+ {
99+ slug : "guide/what-is-open-source/definition-of-open-source" ,
100+ } ,
101+ {
102+ slug : "guide/what-is-open-source/brief-history-of-open-source" ,
103+ } ,
104+ {
105+ slug : "guide/what-is-open-source/the-significance-of-open-source" ,
106+ } ,
107+ {
108+ slug : "guide/what-is-open-source/examples-of-successful-open-source-projects" ,
109+ } ,
110+ {
111+ slug : "guide/what-is-open-source/types-of-open-source-projects" ,
112+ } ,
113+ {
114+ slug : "guide/what-is-open-source/types-of-open-source-software-projects" ,
115+ } ,
116+ {
117+ slug : "guide/what-is-open-source/benefits-of-open-source" ,
118+ } ,
119+ ] ,
120+ } ,
121+ {
122+ label : "Getting Started" ,
123+ collapsed : true ,
124+ items : [
125+ {
126+ label : "Introduction" ,
127+ slug : "guide/getting-started-with-open-source" ,
128+ } ,
129+ {
130+ slug : "guide/getting-started-with-open-source/source-code-hosting-platforms" ,
131+ } ,
132+ {
133+ slug : "guide/getting-started-with-open-source/finding-open-source-projects" ,
134+ } ,
135+ ] ,
136+ } ,
137+ {
138+ label : "Contributing" ,
139+ collapsed : true ,
140+ items : [
141+ {
142+ label : "Introduction" ,
143+ slug : "guide/contributing-to-open-source-projects" ,
144+ } ,
145+ {
146+ slug : "guide/contributing-to-open-source-projects/finding-open-source-projects" ,
147+ } ,
148+ {
149+ slug : "guide/contributing-to-open-source-projects/contributing-to-open-source" ,
150+ } ,
151+ {
152+ slug : "guide/contributing-to-open-source-projects/getting-involved-in-the-open-source-community" ,
153+ } ,
154+ {
155+ slug : "guide/contributing-to-open-source-projects/building-a-portfolio-with-open-source-contributions" ,
156+ } ,
157+ {
158+ slug : "guide/contributing-to-open-source-projects/overcoming-challenges-in-open-source-contributions" ,
159+ } ,
160+ ] ,
161+ } ,
162+ {
163+ label : "Creating" ,
164+ collapsed : true ,
165+ items : [
166+ {
167+ label : "Introduction" ,
168+ slug : "guide/creating-your-own-open-source-project" ,
169+ } ,
170+ {
171+ slug : "guide/creating-your-own-open-source-project/choosing-a-project-idea" ,
172+ } ,
173+ {
174+ slug : "guide/creating-your-own-open-source-project/planning-your-project" ,
175+ } ,
176+ {
177+ slug : "guide/creating-your-own-open-source-project/creating-your-project" ,
178+ } ,
179+ {
180+ slug : "guide/creating-your-own-open-source-project/legal-considerations" ,
181+ } ,
182+ {
183+ slug : "guide/creating-your-own-open-source-project/developing-your-project" ,
184+ } ,
185+ {
186+ slug : "guide/creating-your-own-open-source-project/building-and-engaging-your-community" ,
187+ } ,
188+ {
189+ slug : "guide/creating-your-own-open-source-project/contributing-your-project-to-the-open-source-community" ,
190+ badge : "Coming soon" ,
191+ } ,
192+ ] ,
193+ } ,
194+ {
195+ label : "Maintaining" ,
196+ collapsed : true ,
197+ items : [
198+ {
199+ label : "Introduction" ,
200+ slug : "guide/maintaining-open-source-projects" ,
201+ } ,
202+ {
203+ slug : "guide/maintaining-open-source-projects/introduction-to-open-source-project-maintenance" ,
204+ } ,
205+ {
206+ slug : "guide/maintaining-open-source-projects/managing-contributions-and-community-engagement" ,
207+ badge : "Coming soon" ,
208+ } ,
209+ {
210+ slug : "guide/maintaining-open-source-projects/managing-project-dependencies" ,
211+ badge : "Coming soon" ,
212+ } ,
213+ {
214+ slug : "guide/maintaining-open-source-projects/fostering-a-strong-and-inclusive-community" ,
215+ } ,
216+ {
217+ slug : "guide/maintaining-open-source-projects/ensuring-project-sustainability" ,
218+ badge : "Coming soon" ,
219+ } ,
220+ ] ,
221+ } ,
222+ {
223+ label : "Promoting" ,
224+ collapsed : true ,
225+ items : [
226+ {
227+ label : "Introduction" ,
228+ slug : "guide/promoting-open-source-projects" ,
229+ } ,
230+ {
231+ slug : "guide/promoting-open-source-projects/introduction-to-project-promotion" ,
232+ } ,
233+ {
234+ slug : "guide/promoting-open-source-projects/building-a-strong-project-identity" ,
235+ } ,
236+ {
237+ slug : "guide/promoting-open-source-projects/crafting-an-engaging-project-website" ,
238+ } ,
239+ ] ,
240+ } ,
241+ {
242+ label : "Financing" ,
243+ collapsed : true ,
244+ items : [
245+ {
246+ label : "Introduction" ,
247+ slug : "guide/financing-open-source-projects" ,
248+ } ,
249+ {
250+ slug : "guide/financing-open-source-projects/importance-and-challenges-of-financing-open-source-projects" ,
251+ } ,
252+ {
253+ slug : "guide/financing-open-source-projects/understanding-funding-models" ,
254+ } ,
255+ {
256+ slug : "guide/financing-open-source-projects/effective-fundraising-strategies" ,
257+ } ,
258+ {
259+ slug : "guide/financing-open-source-projects/resource-allocation-and-budgeting" ,
260+ badge : "Coming soon" ,
261+ } ,
262+ {
263+ slug : "guide/financing-open-source-projects/fostering-a-sustainable-ecosystem" ,
264+ badge : "Coming soon" ,
265+ } ,
266+ {
267+ slug : "guide/financing-open-source-projects/transparency-accountability-and-community-involvement" ,
268+ badge : "Coming soon" ,
269+ } ,
270+ ] ,
271+ } ,
69272 ] ,
70- }
71- ]
72- ]
73- }
74- } ) ;
273+ } ,
274+ {
275+ label : "Resources" ,
276+ autogenerate : { directory : "resources" } ,
277+ } ,
278+ {
279+ label : "Articles" ,
280+ link : "/articles" ,
281+ } ,
282+ ] ,
283+ } ) ,
284+ ] ,
285+ } ) ;
0 commit comments