We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a9daa8 commit 1c3c89bCopy full SHA for 1c3c89b
docs/index.html
@@ -28,6 +28,18 @@
28
noData: '找不到结果!',
29
},
30
relativePath: true,
31
+ plugins: [
32
+ function(hook) {
33
+ hook.beforeEach(function(content) {
34
+ // Check if on GitHub Pages
35
+ if (window.location.hostname === 'datawhalechina.github.io') {
36
+ // Rewrite image paths to include the base URL '/fun-rec'
37
+ return content.replace(/src="(\.\.\/)*imgs\//g, 'src="/fun-rec/imgs/');
38
+ }
39
+ return content;
40
+ });
41
42
+ ]
43
}
44
</script>
45
0 commit comments