This is a plug-in that allows vuepress to support image magnification.
And it needs to cooperate with fancybox.
Add fancybox to .vuepress/config.js
module.exports = {
head: [
// add jquert and fancybox
['script', { src: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js' }],
['script', { src: 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.js' }],
['link', { rel: 'stylesheet', type: 'text/css', href: 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.css' }]
],
themeConfig: {
// your config
}
}
Open the command, imput img format
or img reset format
, the markdown of the picture will be formatted。
Or you can use shortcut keys:
Shortcut keys | format | reset format |
---|---|---|
Windows/Linux | Ctrl + Shift +8 | Ctrl + Shift + 8 |
Mac | Cmd + Shift + 8 | Cmd + Shift + 9 |
Finally, you can see the effect.
Enjoy it !