slidev-addon-notecell
Version:
A Slidev addon for interactive Jupyter notebook cells with code execution capabilities
51 lines (49 loc) • 1.43 kB
text/typescript
import MdItAdmon from 'markdown-it-admon';
import { full as emoji } from 'markdown-it-emoji';
import UnoCSS from 'unocss/vite';
import { defineConfig } from 'vite';
export default defineConfig({
server: {
fs: {
strict: false,
allow: [
'..',
'../node_modules'
]
},
proxy: {
'/thebe': {
target: 'http://127.0.0.1:8080/course/fa/aaron',
changeOrigin: true,
ws: true,
rewrite: (path) => {
// Forward /thebe/path to /course/fa/aaron/path
// console.log('Proxying:', path, 'to', path.replace(/^\/thebe/, ''));
return path.replace(/^\/thebe/, '');
}
}
}
},
slidev: {
vue: {
/* vue options */
template: {
compilerOptions: {
whitespace: 'preserve'
}
}
},
markdown: {
/* markdown-it options */
markdownItSetup(md) {
/* custom markdown-it plugins */
// md.use(require('markdown-it-admon'));
// md.use(require('markdown-it-container'), 'takeaway');
md.use(emoji);
md.use(MdItAdmon);
},
},
}, plugins: [
UnoCSS()
]
})