hexo 自带的 config.yml
优化 将原本主题的链接配置文件的第 21-23
行更改为以下文件有助于 SEO
1 2 3 url: https://www.bmyjacks.cn root: / permalink: :year/:title.html
NexT 主题的 next.yml
优化 这一个选项就比较多了,且听我细细道来
打开缓存与最小化 1 2 3 4 cache: enable: true minify: true
favicon 优化 favicon 图标文件最好为压缩过的,并且存放在诸如阿里云OSS
等
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 favicon: small: medium: apple_touch_icon: safari_pinned_tab: android_manifest: ms_browserconfig: avatar: url: rounded: false rotated: false
关闭一些不需要的功能 这种优化方法就因人而异了,请大家根据自己的需要进行选择
关闭动画 关闭动画之后你的网站上就没有过渡动画显示了,请考虑后在选择,将第 820
附近的代码 (819-835)
更改为
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 motion: enable: false async: false transition: post_block: fadeIn post_header: slideDownIn post_body: slideDownIn coll_header: slideLeftIn sidebar: slideUpIn
减少不必要的服务 如果您设置了两个评论系统,请您在优化时去掉一个,只留下最合适的那一个,并且进行以下配置 557-574
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 comments: style: tabs active: disqusjs storage: false lazyload: true nav:
关闭在线聊天,关闭掉如 chatra
的在线聊天系统
关闭 pace 1 2 3 4 5 6 pace: enable: false theme: minimal
关闭 three 1 2 3 4 5 three: enable: false three_waves: false canvas_lines: false canvas_sphere: false
使用 CDN 修改 874-986
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 vendors: _internal: lib anime: //cdn.jsdelivr.net/npm/[email protected] /lib/anime.min.js fontawesome: //cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css mathjax: //cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js katex: //cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css copy_tex_js: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.js copy_tex_css: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.css pjax: //cdn.jsdelivr.net/gh/theme-next/theme-next-pjax@0/pjax.min.js jquery: //cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js fancybox: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js fancybox_css: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css mediumzoom: //cdn.jsdelivr.net/npm/medium-zoom@1/dist/medium-zoom.min.js lazyload: //cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js pangu: //cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js quicklink: //cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js disqusjs_js: //cdn.jsdelivr.net/npm/disqusjs@1/dist/disqus.js disqusjs_css: //cdn.jsdelivr.net/npm/disqusjs@1/dist/disqusjs.css valine: //cdn.jsdelivr.net/npm/valine@1/dist/Valine.min.js gitalk_js: //cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js gitalk_css: //cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css algolia_search: //cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js instant_search: //cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js mermaid: //cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js velocity: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.min.js velocity_ui: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.ui.min.js pace: //cdn.jsdelivr.net/npm/pace-js@1/pace.min.js pace_css: //cdn.jsdelivr.net/npm/pace-js@1/themes/blue/pace-theme-minimal.css three: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/three.min.js three_waves: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/three-waves.min.js canvas_lines: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/canvas_lines.min.js canvas_sphere: //cdn.jsdelivr.net/gh/theme-next/theme-next-three@1/canvas_sphere.min.js canvas_ribbon: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-ribbon/canvas-ribbon.js