本文主要介绍了hexo博客怎么搭建
deploy:
type: git
repository: http://github.com/用户名/用户名.github.io.git
branch: master
前提安装了插件Markdown All In One
ctrl+shift+P 找到 Markdown Preview Enhanced: Extend Parser,打开 parser.js
onWillParseMarkdown: async function(markdown) {
return new Promise((resolve, reject)=> {
/** 处理 {% asset_img xxx%}**/
// markdown = markdown.replace(
// /\{%\s*asset_img\s*(.*)\s*%\}/g,
// (whole, content) => (`/)[1]}/${content})`)
// )
/** 处理 [](xxx.html/xxx)**/
// markdown = markdown.replace(
// /\[.*]\(.*\.html\/.*\)/g,
// (whole, content) => (`${whole}`.replace(/\.html\//g,'.md/'))
// )
/** 处理 [](xxx/xxxx.png)**/
// markdown = markdown.replace(
// /!\[.*]\(.*\.(png|jpg|gif)\)/g,
// (whole, content) => (`${whole}`.replace(/]\(/g,'](/docs/.vuepress/public/'))
// )
/** 处理 [](xxxx.png)**/
markdown = markdown.replace(
/!\[.*]\(.*\.(png|jpg|gif)\)/g,
(whole, content) => (`${whole}`.replace(/]\(/g,`](./${markdown.match(/title\: (\S*)/)[1]}/`))
)
return resolve(markdown)
})
},
本文主要介绍了hexo博客的搭建,如果有任何疑问欢迎私信或者评论