11// .vuepress/config.js
22
3- //const { path } = require("@vuepress/utils");
4-
5- import markdownRawPlugin from "vite-raw-plugin" ;
6- import { defaultTheme } from "vuepress" ;
7- import { viteBundler } from "vuepress" ;
8- import shiki from "vuepress-plugin-shiki" ;
3+ import { defaultTheme } from "@vuepress/theme-default" ;
4+ import { viteBundler } from "@vuepress/bundler-vite" ;
5+ import { shikiPlugin } from "@vuepress/plugin-shiki" ;
96
107module . exports = {
11- plugins : [ shiki ( { langs : [ "asm" ] } ) ] ,
8+ plugins : [ shikiPlugin ( { langs : [ "asm" ] } ) ] ,
129 title : "gbdev.io" ,
1310 description : "game boy development scene" ,
1411 head : [
15- [ 'script' , { } , `
12+ [
13+ "script" ,
14+ { } ,
15+ `
1616 var _paq = window._paq = window._paq || [];
1717 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
1818 _paq.push(['trackPageView']);
@@ -24,7 +24,8 @@ module.exports = {
2424 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
2525 g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
2626 })();
27- ` ] ,
27+ ` ,
28+ ] ,
2829 [
2930 "link" ,
3031 {
@@ -115,11 +116,11 @@ module.exports = {
115116 } ,
116117 {
117118 link : "https://evie.gbdev.io/blog/interrupts.html" ,
118- text : "Interrupts tutorial"
119+ text : "Interrupts tutorial" ,
119120 } ,
120121 {
121122 link : "https://evie.gbdev.io/blog/understanding-structures.html" ,
122- text : "Understanding Structures"
123+ text : "Understanding Structures" ,
123124 } ,
124125 { link : "/guides/deadcscroll" , text : "Dead C Scroll" } ,
125126 {
@@ -136,7 +137,17 @@ module.exports = {
136137
137138 bundler : viteBundler ( {
138139 viteOptions : {
139- plugins : [ markdownRawPlugin ( { fileRegex : / \. a s m $ / } ) ] ,
140+ plugins : [
141+ {
142+ name : "raw-asm-loader" ,
143+ enforce : "pre" ,
144+ transform ( code , id ) {
145+ if ( id . endsWith ( ".asm" ) ) {
146+ return `export default ${ JSON . stringify ( code ) } ;` ;
147+ }
148+ } ,
149+ } ,
150+ ] ,
140151 resolve : {
141152 alias : {
142153 "@" : __dirname , // Alias to the `.vuepress` folder
0 commit comments