前言
主题"hexo-theme-quiet: 🔥A simple, easy to read flat hexo theme. 扁平化简约Hexo主题"更新了!现在我的博客有了新的改进!在此对该主题的作者表示感谢!
同时我觉得这个主题还有一定问题, 记录一下并尝试自己解决。
正文
文章评论功能
这个功能要你自己创建一个 OAuth application..
大部分文章因为标题太长, 留言板功能会出现 Error: Validation Failed. , 有空再修orz看下面这个文章, 使用MD5解决了, 真机智啊!
css的优化, 界面的更新
这个表格看起来清爽多了!
我不太喜欢原主题白色背景, 黑色的代码框,于是我瞎鼓捣css, 改成接近jupyter notebook
的风格
这个代码居然不换行orz, 把旧版的jquery.min.js
里的内容替换了hljs.min.js
里的全部内容, 感觉好多了
显示图片效果的优化
现在显示图片可以一张一张地滚动。
显示照片的时候我感觉100%宽度有点太丰满了?改代码!source\css\public\article_cente.less
中修改img类:
img { max-width: 80%; cursor: pointer; margin: 8px auto; text-align: center; display: flex; border-radius: 10px; outline: none; border: 0; }
|
在此谢谢保罗同学😘~
标签点击跳转失败
目前点击推文上的标签会跳转失败, 分析了一下, 是layout\_partial\post_head.ejs
中第34行:
<% page.categories.data.map((cat)=>{ %> <a href="../../<%- cat.path %>" target="_blank" ><%- cat.name %></a> <% }) %>
|
cat.path
链接错误, 把它改成
<a href="/categories/<%- cat.name %>" target="_blank" ><%- cat.name %></a>
|
我真机智!
翻页丢失封面
不知道是我配置的问题还是原作者没意识到这件事orz, 翻页会导致所有封面地址错误导致显示不出来.
~~我有个感觉很笨的解决方法, ~~把layout\_partial\home.ejs
中第8行-第12行:
<% if(post.cover){ %> <img src="<%= post.cover %>" alt="Quiet"> <% }else{ %> <img src="<%- theme.default_cover %>" alt="Quiet"> <% } %>
|
改为:
<% if(post.cover){ %> <img src="<%= theme.menus.home + post.cover %>" alt="Cover"> <% }else{ %> <img src="<%- theme.default_cover %>" alt="Cover"> <% } %>
|
同理 40 行的那一坨也要改.不过这样会导致localhost
载入封面时也要尝试从github
载入封面导致浪费流量orz
编译错误
不知道是哪里导致执行命令hexo g
的时候会出错orz
但好像没啥影响?就是看着不爽orz
因为我写网页的技术太菜估计一时半会解决不了orz
既然解决不了就把它删了吧!
播放音乐
MoePlayer/hexo-tag-aplayer:在Hexo帖子/页面中嵌入播放器 (github.com)
hexo mathjax无法渲染
mathjax.js被拦截:
hexo mathjax无法渲染 - 简书 (jianshu.com) 脚本选择https...
照着archive.ejs
把tags.ejs
改了一遍..
<% page.title = __("标签:" + page.tag) %> <%- partial('_partial/header',{name:'tags'}) %> <% var years = {}; site.posts.sort('date').reverse().forEach(function(post){ const tags = post.tags; if(tags.length < 1) return tags.data.map((t)=>{ if(page.tag === t.name){ var year = post.date.year() if(years[year]===undefined){ years[year] = []; } years[year].push(post); } }) }); %>
<div class="tag"> <%- partial('_widget/header_body',{message:"文章标签:"+page.tag,icon:theme.headers.tags.icon}) %> <div class="tag-content" id="content"> <div class="tag-content-data"> <%- partial('_widget/grouping',{data:years,keys:Object.keys(years).reverse()}) %> </div> </div> </div>
|