|
1 | | -import { rehypeHeadingIds } from '@astrojs/markdown-remark'; |
2 | | -import starlight from '@astrojs/starlight'; |
3 | | -import { defineConfig } from 'astro/config'; |
4 | | -import rehypeExternalLinks from 'rehype-external-links'; |
5 | | -import { headingAnchorLinks } from './remark-plugins/heading-anchor-links.mjs'; |
6 | | -import { linkAliases } from './remark-plugins/link-aliases.mjs'; |
7 | | -import { sectionWrapper } from './remark-plugins/section-wrapper.mjs'; |
8 | | -import { tocSchemaMicrodata } from './remark-plugins/toc-schema-microdata.mjs'; |
| 1 | +import { rehypeHeadingIds } from "@astrojs/markdown-remark"; |
| 2 | +import starlight from "@astrojs/starlight"; |
| 3 | +import { defineConfig } from "astro/config"; |
| 4 | +import astroBrokenLinksChecker from "astro-broken-links-checker"; |
| 5 | +import rehypeExternalLinks from "rehype-external-links"; |
| 6 | +import { headingAnchorLinks } from "./remark-plugins/heading-anchor-links.mjs"; |
| 7 | +import { linkAliases } from "./remark-plugins/link-aliases.mjs"; |
| 8 | +import { sectionWrapper } from "./remark-plugins/section-wrapper.mjs"; |
| 9 | +import { tocSchemaMicrodata } from "./remark-plugins/toc-schema-microdata.mjs"; |
9 | 10 |
|
10 | 11 | export default defineConfig({ |
11 | | - site: 'https://syncpack.dev', |
12 | | - base: '/', |
13 | | - output: 'static', |
| 12 | + site: "https://syncpack.dev", |
| 13 | + base: "/", |
| 14 | + output: "static", |
14 | 15 | markdown: { |
15 | 16 | smartypants: false, |
16 | | - rehypePlugins: [rehypeHeadingIds, headingAnchorLinks, [rehypeExternalLinks, { rel: ['nofollow', 'noopener'] }]], |
| 17 | + rehypePlugins: [ |
| 18 | + rehypeHeadingIds, |
| 19 | + headingAnchorLinks, |
| 20 | + [rehypeExternalLinks, { rel: ["nofollow", "noopener"] }], |
| 21 | + ], |
17 | 22 | remarkPlugins: [sectionWrapper, linkAliases], |
18 | 23 | }, |
19 | 24 | integrations: [ |
| 25 | + astroBrokenLinksChecker({ |
| 26 | + checkExternalLinks: false, |
| 27 | + cacheExternalLinks: true, |
| 28 | + throwError: true, |
| 29 | + }), |
20 | 30 | tocSchemaMicrodata(), |
21 | 31 | starlight({ |
22 | | - title: 'Syncpack', |
| 32 | + title: "Syncpack", |
23 | 33 | lastUpdated: true, |
24 | 34 | markdown: { |
25 | 35 | headingLinks: false, |
26 | 36 | }, |
27 | | - routeMiddleware: './src/route-data.ts', |
| 37 | + routeMiddleware: "./src/route-data.ts", |
28 | 38 | social: [ |
29 | 39 | { |
30 | | - icon: 'github', |
31 | | - label: 'GitHub', |
32 | | - href: 'https://github.com/JamieMason/syncpack', |
| 40 | + icon: "github", |
| 41 | + label: "GitHub", |
| 42 | + href: "https://github.com/JamieMason/syncpack", |
33 | 43 | }, |
34 | 44 | { |
35 | | - icon: 'npm', |
36 | | - label: 'npm', |
37 | | - href: 'https://npmx.dev/package/syncpack', |
| 45 | + icon: "npm", |
| 46 | + label: "npm", |
| 47 | + href: "https://npmx.dev/package/syncpack", |
38 | 48 | }, |
39 | 49 | { |
40 | | - icon: 'blueSky', |
41 | | - label: 'Bluesky', |
42 | | - href: 'https://bsky.app/profile/foldleft.bsky.social', |
| 50 | + icon: "blueSky", |
| 51 | + label: "Bluesky", |
| 52 | + href: "https://bsky.app/profile/foldleft.bsky.social", |
43 | 53 | }, |
44 | 54 | ], |
45 | 55 | editLink: { |
46 | | - baseUrl: 'https://github.com/JamieMason/syncpack/edit/main/site/', |
| 56 | + baseUrl: "https://github.com/JamieMason/syncpack/edit/main/site/", |
47 | 57 | }, |
48 | | - favicon: '/favicon.ico', |
| 58 | + favicon: "/favicon.ico", |
49 | 59 | logo: { |
50 | | - src: './src/assets/logo.svg', |
| 60 | + src: "./src/assets/logo.svg", |
51 | 61 | }, |
52 | 62 | tableOfContents: { |
53 | 63 | minHeadingLevel: 2, |
54 | 64 | maxHeadingLevel: 4, |
55 | 65 | }, |
56 | 66 | expressiveCode: { |
57 | | - themes: ['everforest-dark', 'everforest-light'], |
| 67 | + themes: ["everforest-dark", "everforest-light"], |
58 | 68 | removeUnusedThemes: false, |
59 | 69 | frames: false, |
60 | 70 | styleOverrides: { |
61 | 71 | // Borders and spacing |
62 | | - borderRadius: '6px', |
63 | | - borderWidth: '1px', |
64 | | - borderColor: 'var(--sl-color-gray-5)', |
| 72 | + borderRadius: "6px", |
| 73 | + borderWidth: "1px", |
| 74 | + borderColor: "var(--sl-color-gray-5)", |
65 | 75 |
|
66 | 76 | // Code area |
67 | | - codeBackground: 'var(--sl-color-gray-6)', |
68 | | - codeFontFamily: 'var(--sl-font-mono)', |
69 | | - codeFontSize: '0.8rem', |
70 | | - codeLineHeight: '1.65', |
71 | | - codePaddingBlock: '1rem', |
72 | | - codePaddingInline: '1.35rem', |
73 | | - codeForeground: 'var(--sl-color-gray-2)', |
| 77 | + codeBackground: "var(--sl-color-gray-6)", |
| 78 | + codeFontFamily: "var(--sl-font-mono)", |
| 79 | + codeFontSize: "0.8rem", |
| 80 | + codeLineHeight: "1.65", |
| 81 | + codePaddingBlock: "1rem", |
| 82 | + codePaddingInline: "1.35rem", |
| 83 | + codeForeground: "var(--sl-color-gray-2)", |
74 | 84 |
|
75 | 85 | // Accent color for highlights |
76 | | - focusBorder: 'var(--sl-color-accent)', |
| 86 | + focusBorder: "var(--sl-color-accent)", |
77 | 87 | }, |
78 | 88 | }, |
79 | | - customCss: ['@fontsource-variable/inter', '@fontsource-variable/jetbrains-mono', './src/styles/custom.css'], |
| 89 | + customCss: [ |
| 90 | + "@fontsource-variable/inter", |
| 91 | + "@fontsource-variable/jetbrains-mono", |
| 92 | + "./src/styles/custom.css", |
| 93 | + ], |
80 | 94 | pagination: false, |
81 | 95 | sidebar: [ |
82 | 96 | { |
83 | | - label: 'Guides', |
84 | | - autogenerate: { directory: 'guide' }, |
| 97 | + label: "Guides", |
| 98 | + autogenerate: { directory: "guide" }, |
85 | 99 | }, |
86 | 100 | { |
87 | | - label: 'Commands', |
88 | | - autogenerate: { directory: 'command' }, |
| 101 | + label: "Commands", |
| 102 | + autogenerate: { directory: "command" }, |
89 | 103 | }, |
90 | 104 | { |
91 | | - label: 'Version Groups', |
92 | | - autogenerate: { directory: 'version-groups' }, |
| 105 | + label: "Version Groups", |
| 106 | + autogenerate: { directory: "version-groups" }, |
93 | 107 | }, |
94 | 108 | { |
95 | | - label: 'Semver Groups', |
96 | | - autogenerate: { directory: 'semver-groups' }, |
| 109 | + label: "Semver Groups", |
| 110 | + autogenerate: { directory: "semver-groups" }, |
97 | 111 | }, |
98 | 112 | { |
99 | | - label: 'Configuration File', |
| 113 | + label: "Configuration File", |
100 | 114 | items: [ |
101 | | - 'config/syncpackrc', |
102 | | - 'config/custom-types', |
103 | | - 'config/dependency-groups', |
104 | | - 'config/format-bugs', |
105 | | - 'config/format-repository', |
106 | | - 'config/indent', |
107 | | - 'config/max-concurrent-requests', |
108 | | - { label: 'semverGroups', link: '/semver-groups/' }, |
109 | | - 'config/sort-az', |
110 | | - 'config/sort-exports', |
111 | | - 'config/sort-first', |
112 | | - 'config/sort-packages', |
113 | | - 'config/source', |
114 | | - 'config/strict', |
115 | | - { label: 'versionGroups', link: '/version-groups/' }, |
| 115 | + "config/syncpackrc", |
| 116 | + "config/custom-types", |
| 117 | + "config/dependency-groups", |
| 118 | + "config/format-bugs", |
| 119 | + "config/format-repository", |
| 120 | + "config/indent", |
| 121 | + "config/max-concurrent-requests", |
| 122 | + { label: "semverGroups", link: "/semver-groups/" }, |
| 123 | + "config/sort-az", |
| 124 | + "config/sort-exports", |
| 125 | + "config/sort-first", |
| 126 | + "config/sort-packages", |
| 127 | + "config/source", |
| 128 | + "config/strict", |
| 129 | + { label: "versionGroups", link: "/version-groups/" }, |
116 | 130 | ], |
117 | 131 | }, |
118 | 132 | { |
119 | | - label: 'Reference', |
120 | | - autogenerate: { directory: 'reference' }, |
| 133 | + label: "Reference", |
| 134 | + autogenerate: { directory: "reference" }, |
121 | 135 | }, |
122 | 136 | ], |
123 | 137 | components: { |
124 | | - Footer: './src/components/Footer.astro', |
125 | | - Head: './src/components/Head.astro', |
126 | | - SocialIcons: './src/components/SocialIcons.astro', |
| 138 | + Footer: "./src/components/Footer.astro", |
| 139 | + Head: "./src/components/Head.astro", |
| 140 | + SocialIcons: "./src/components/SocialIcons.astro", |
127 | 141 | }, |
128 | 142 | head: [ |
129 | 143 | { |
130 | | - tag: 'link', |
| 144 | + tag: "link", |
131 | 145 | attrs: { |
132 | | - rel: 'apple-touch-icon', |
133 | | - href: '/apple-touch-icon-180x180.png', |
| 146 | + rel: "apple-touch-icon", |
| 147 | + href: "/apple-touch-icon-180x180.png", |
134 | 148 | }, |
135 | 149 | }, |
136 | 150 | { |
137 | | - tag: 'script', |
| 151 | + tag: "script", |
138 | 152 | attrs: { |
139 | 153 | async: true, |
140 | | - src: 'https://www.googletagmanager.com/gtag/js?id=G-DXPH5LLJ0N', |
| 154 | + src: "https://www.googletagmanager.com/gtag/js?id=G-DXPH5LLJ0N", |
141 | 155 | }, |
142 | 156 | }, |
143 | 157 | { |
144 | | - tag: 'script', |
| 158 | + tag: "script", |
145 | 159 | content: [ |
146 | | - 'window.dataLayer=window.dataLayer||[];', |
147 | | - 'function gtag(){dataLayer.push(arguments);}', |
| 160 | + "window.dataLayer=window.dataLayer||[];", |
| 161 | + "function gtag(){dataLayer.push(arguments);}", |
148 | 162 | `gtag('js', new Date());`, |
149 | 163 | `gtag('config', 'G-DXPH5LLJ0N');`, |
150 | | - ].join(''), |
| 164 | + ].join(""), |
151 | 165 | }, |
152 | 166 | ], |
153 | 167 | }), |
|
0 commit comments