# 后续

  1. 压缩图片(删除未引用的图片)
  2. 代码的正确展示
  3. 数学公式的正确展示
  4. SEO 检索
  5. CDN 加速

# 2024/7

基于 algolia 的搜索功能

开放评论区

# 2024/4/9

引入 pdf 模块(使用 web / 手机端):

下载 pdf.js 解压到 /source/pdfjs

_config.yml 文件中加入:

1
2
skip_render:
- 'pdfjs/**/*'

/source/pdfjs/web/viewer/mjs 注释掉以下几行:

1
2
3
//if (fileOrigin !== viewerOrigin) {
// throw new Error("file origin does not match viewer's");
//}

source 文件夹下建立 pdf 目录,用于存放 pdf 资源

展示 pdf:

1
2
3
4
{% raw %}
<iframe src="/pdfjs/web/viewer.html?file=/pdf/file.pdf" style='width:100%;height:800px'>
</iframe>
{% endraw %}

为避免无法正常展示的情况,加入以下内容:

1
如果pdf预览不能正常加载,戳[这里](/pdf/how-to-build-your-own-blog.pdf)下载

注:原本打算使用相对路径引用资源,但未能成功,留待以后解决

# 2024/4/8

解决了 hexo 不是内部或外部命令的问题:环境变量 PATH 加入

1
C:\Users\Username\AppData\Roaming\npm

# 2024/3/30

解决了 typora 与 hexo 图片的显示问题

使用了 hexo-asset-img 包

待解决:搜索引擎 solved

Views times