File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ onBeforeMount(async () => {
7171 },
7272 code({ text }) {
7373 return ` <code class="language-bash">${shiki .codeToHtml (text , {
74- theme: colorMode .value === ' dark' ? ' github-dark' : ' github-light' ,
74+ theme: colorMode .preference === ' dark' ? ' github-dark' : ' github-light' ,
7575 lang: ' bash' ,
7676 })}</code> `
7777 },
@@ -81,7 +81,7 @@ onBeforeMount(async () => {
8181})
8282
8383onBeforeUnmount (() => {
84- shiki .dispose ()
84+ shiki ? .dispose ()
8585})
8686
8787// Pagination
Original file line number Diff line number Diff line change @@ -23,21 +23,17 @@ const route = useRoute()
2323 <UButton
2424 aria-label =" Toggle theme"
2525 :icon ="
26- colorMode.preference === 'dark'
27- ? 'ph-moon'
28- : colorMode.preference === 'light'
29- ? 'ph-sun'
30- : 'ph-moon-stars'
26+ colorMode.preference === 'light'
27+ ? 'ph-sun'
28+ : 'ph-moon-stars'
3129 "
3230 color =" neutral"
3331 variant =" link"
3432 @click ="
3533 colorMode.preference
3634 = colorMode.preference === 'dark'
37- ? 'system'
38- : colorMode.preference === 'system'
39- ? 'light'
40- : 'dark'
35+ ? 'light'
36+ : 'dark'
4137 "
4238 />
4339 <template #fallback >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { resolve } from 'pathe'
33
44// https://nuxt.com/docs/api/configuration/nuxt-config
55export default defineNuxtConfig ( {
6+ sourcemap : true ,
67 compatibilityDate : '2024-07-30' ,
78
89 // https://nuxt.com/docs/getting-started/upgrade#testing-nuxt-4
@@ -32,7 +33,6 @@ export default defineNuxtConfig({
3233 preset : 'cloudflare-pages' ,
3334 sourceMap : 'inline' ,
3435 compatibilityDate : '2024-09-19' ,
35- // modules: ["nitro-cloudflare-dev"],
3636 externals : {
3737 inline : [
3838 '@octokit' ,
@@ -51,11 +51,13 @@ export default defineNuxtConfig({
5151 } ,
5252
5353 runtimeConfig : {
54+ nitro : {
55+ envPrefix : 'NITRO_' ,
56+ } ,
5457 appId : '' ,
5558 webhookSecret : '' ,
5659 privateKey : '' ,
5760 rmStaleKey : '' ,
58- githubToken : '' ,
5961 ghBaseUrl : 'https://api.github.com' ,
6062 test : '' ,
6163 } ,
Original file line number Diff line number Diff line change 1+ // This plugin ensures runtime config is properly initialized early in the request lifecycle
2+ export default defineNitroPlugin ( ( nitro ) => {
3+ nitro . hooks . hook ( 'request' , async ( event ) => {
4+ try {
5+ // Pre-load the configuration to ensure it's initialized
6+ const config = useRuntimeConfig ( event )
7+ // eslint-disable-next-line no-console
8+ console . log (
9+ 'Runtime config initialized successfully:' ,
10+ Object . keys ( config ) ,
11+ )
12+ }
13+ catch ( error ) {
14+ console . error ( 'Failed to initialize runtime config:' , error )
15+ }
16+ } )
17+ } )
Original file line number Diff line number Diff line change 11compatibility_date = " 2024-03-14"
22logpush = true
3+ upload_source_maps = true
34
45[[r2_buckets ]]
56binding = " CR_BUCKET"
You can’t perform that action at this time.
0 commit comments