hexo-记录博客用到的自定义js
感谢 https://github.com/lzuliuyun/hexo-image-cdn
感谢 https://github.com/2-3-5-7/hexo-relative-link
此代码参考了 hexo-image-link、hexo-asset-link
1 | 如果使用了hexo g |
page_path
1 | // hello_my_posts.md文件中的引用为:[other_post](/hexo-%E8%AE%B0%E5%BD%95%E5%8D%9A%E5%AE%A2%E7%94%A8%E5%88%B0%E7%9A%84%E8%87%AA%E5%AE%9A%E4%B9%89js/../../life/internet) |
1 | // \S+匹配1或多个非空白字符 |
1 | // page_path获取当前 md 文件同名路径 |