11/* Directives & Plugins Imports */
2- import "vue-code-highlight/themes/prism-twilight.css" ;
3- import "vue-code-highlight/themes/window.css" ;
42import linkify from "vue-3-linkify" ;
53import { createMetaManager } from "vue-meta" ;
64import Vue3Sanitize from "vue-3-sanitize" ;
75import DOMPurify from "dompurify" ;
8-
9- /* App Core Imports - CHANGE THESE TO FACTORY FUNCTIONS */
106import { createMyRouter } from "@/router" ;
117import { createMyStore } from "@/store" ;
128import createVuetify from "@/plugins/vuetify" ;
139import { bootstrapApp , globalFilters } from "@/utils/setupUtils" ;
14-
1510/* Styles */
11+ import CodeBlock from "@/components/Static/APIDoc/CodeBlock.vue" ;
1612import "roboto-fontface/css/roboto/roboto-fontface.css" ;
1713import "@fortawesome/fontawesome-free/css/all.css" ;
1814import "vue-json-pretty/lib/styles.css" ;
@@ -21,7 +17,7 @@ export default async (pageContext) => {
2117 const { app } = pageContext ;
2218 const isServer = typeof window === "undefined" ;
2319
24- // 1. Create unique, isolated instances for this specific request
20+ // Create unique, isolated instances for this specific request
2521 const store = createMyStore ( ) ;
2622 const router = createMyRouter ( store ) ;
2723
@@ -30,15 +26,19 @@ export default async (pageContext) => {
3026
3127 await bootstrapApp ( store , router ) ;
3228
33- // 2. Safely sync the unique router instance to the current URL
29+ // Safely sync the unique router instance to the current URL
3430 if ( isServer ) {
3531 router . push ( pageContext . urlPathname ) ;
3632 }
3733
3834 // 3. Plugins that are SAFE for both Server and Client
39- app . use ( createVuetify ) . use ( createMetaManager ( ) ) . use ( Vue3Sanitize ) ;
35+ const vuetifyPlugin =
36+ typeof createVuetify === "function" ? createVuetify ( ) : createVuetify ;
37+ app . use ( vuetifyPlugin ) . use ( createMetaManager ( ) ) . use ( Vue3Sanitize ) ;
38+
39+ app . component ( "CodeBlock" , CodeBlock ) ;
4040
41- // 4. Plugins that MUST ONLY run in the Browser (Client)
41+ // Plugins that MUST ONLY run in the Browser (Client)
4242 if ( ! isServer ) {
4343 const { default : HighchartsVue } = await import ( "highcharts-vue" ) ;
4444 const { default : Highcharts } = await import ( "highcharts" ) ;
@@ -47,7 +47,6 @@ export default async (pageContext) => {
4747 ) ;
4848 const { default : SimpleAnalytics } = await import ( "simple-analytics-vue" ) ;
4949 // const { default: VueGtag } = await import("vue-gtag");
50- const { default : VueCodeHighlight } = await import ( "vue-code-highlight" ) ;
5150 const { default : VueScrollTo } = await import ( "vue-scrollto" ) ;
5251 const { default : Particles } = await import ( "@tsparticles/vue3" ) ;
5352 const { loadFull } = await import ( "tsparticles" ) ;
@@ -63,7 +62,6 @@ export default async (pageContext) => {
6362 } )
6463 . use ( HighchartsVue )
6564 . use ( VueScrollTo )
66- . use ( VueCodeHighlight )
6765 // .use(VueGtag, {
6866 // config: { id: import.meta.env.VUE_APP_ANALYTICS_ID },
6967 // })
@@ -81,6 +79,6 @@ export default async (pageContext) => {
8179 // Global Properties
8280 app . config . globalProperties . $filters = globalFilters ;
8381
84- // 5. Await the isolated router so the server waits for route components to resolve
82+ // Await the isolated router so the server waits for route components to resolve
8583 await router . isReady ( ) ;
8684} ;
0 commit comments