1
1
// .vuepress/config.js
2
2
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" ;
9
6
10
7
module . exports = {
11
- plugins : [ shiki ( { langs : [ "asm" ] } ) ] ,
8
+ plugins : [ shikiPlugin ( { langs : [ "asm" ] } ) ] ,
12
9
title : "gbdev.io" ,
13
10
description : "game boy development scene" ,
14
11
head : [
15
- [ 'script' , { } , `
12
+ [
13
+ "script" ,
14
+ { } ,
15
+ `
16
16
var _paq = window._paq = window._paq || [];
17
17
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
18
18
_paq.push(['trackPageView']);
@@ -24,7 +24,8 @@ module.exports = {
24
24
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
25
25
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
26
26
})();
27
- ` ] ,
27
+ ` ,
28
+ ] ,
28
29
[
29
30
"link" ,
30
31
{
@@ -115,11 +116,11 @@ module.exports = {
115
116
} ,
116
117
{
117
118
link : "https://evie.gbdev.io/blog/interrupts.html" ,
118
- text : "Interrupts tutorial"
119
+ text : "Interrupts tutorial" ,
119
120
} ,
120
121
{
121
122
link : "https://evie.gbdev.io/blog/understanding-structures.html" ,
122
- text : "Understanding Structures"
123
+ text : "Understanding Structures" ,
123
124
} ,
124
125
{ link : "/guides/deadcscroll" , text : "Dead C Scroll" } ,
125
126
{
@@ -136,7 +137,17 @@ module.exports = {
136
137
137
138
bundler : viteBundler ( {
138
139
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
+ ] ,
140
151
resolve : {
141
152
alias : {
142
153
"@" : __dirname , // Alias to the `.vuepress` folder
0 commit comments