blinkfox / blinkfox.github.io

This is my personal blog repository.
https://blinkfox.github.io/
Apache License 2.0
45 stars 101 forks source link

闪烁之狐 #26

Open blinkfox opened 5 years ago

blinkfox commented 5 years ago

https://blinkfox.github.io/2018/09/28/2018/09/hexo-bo-ke-zhu-ti-zhi-hexo-theme-matery-de-jie-shao/

从来没有真正的绝境,只有心灵的迷途

blinkfox commented 5 years ago

@JXDhdlg1 图片可以放在source目录下吧,具体目录划分这些怎么放就看个人喜好了,引用就类似于/images/xxx/.../xxx.jpg就行。

我的图片都是用七牛云做的图床,然后引用图片链接就行,你也可以使用七牛云、又拍云、腾讯云之类的,每个月的访问流量和存储量不是特别大的话,基本上都是免费的。

FearlessPeople commented 5 years ago

@JXDhdlg1 图片应该保存在哪里?引用不到呢

一个ipic搞定

JXDhdlg1 commented 5 years ago

@blinkfox @JXDhdlg1 图片可以放在source目录下吧,具体目录划分这些怎么放就看个人喜好了,引用就类似于/images/xxx/.../xxx.jpg就行。

我的图片都是用七牛云做的图床,然后引用图片链接就行,你也可以使用七牛云、又拍云、腾讯云之类的,每个月的访问流量和存储量不是特别大的话,基本上都是免费的。

嗯嗯 搞定的

frogoscar commented 5 years ago

这个主题帅炸!谢谢

hahaDong commented 5 years ago

评论功能咋开呢

blinkfox commented 5 years ago

@TURBO1002 主题支持多种评论系统,如:Gitalkdisqusliverevaline等,你选一个自己喜欢的评论系统,然后大概搜索下在Hexo中如何集成,然后可以在主题的_config.yml中找到对应的配置信息,填入并激活配置项即可。

zhongchun commented 5 years ago

请问博主,gitalk怎么集成

blinkfox commented 5 years ago

@zhongchun 这个你搜索下“hexo集成Gitalk”就行了,很简单的,然后把相关的ownerrepoclientIdclientSecret等填入到主题的Gitalk中的配置项,然后激活配置即可。

Byron4j commented 5 years ago

使用了该主题,谢谢!

blinkfox commented 5 years ago

@DQSLILI 搜索这块儿用的第三方插件,暂时不会改了。评论主题支持Valine等多种第三方评论,看自己的风格喜欢什么样的配置就行,我个人比较注重Github里面的用户吧。

adangran commented 5 years ago

gitment登录都报[object ProgressEvent] 错误。这个应该怎么修复,你这个博客没有这个问题。

adangran commented 5 years ago

gitment登录都报[object ProgressEvent] 错误。这个应该怎么修复,你这个博客没有这个问题。

找到方法了。 打开 themes/hexo-theme-matery/source/libs/gitment/gitment.js,把“https://gh-oauth.imsun.net”改成“https://github.com/login/oauth/access_token

blinkfox commented 5 years ago

@adangran 嗯,解决了就好,我用的是Gitalk,没用GitmentGitalkGitment更好点儿吧。

adangran commented 5 years ago

请教一个问题,我不想要banner罩上颜色,并且颜色变来变动的效果,应该改哪里?

adangran commented 5 years ago

请教一个问题,我不想要banner罩上颜色,并且颜色变来变动的效果,应该改哪里?

怪我看得不够仔细,我知道改哪里了

bilibvivo commented 5 years ago

博主,在内容里插入video标签,在手机模式下显示不正常

blinkfox commented 5 years ago

@dume2007 好,我有空看看

DDDANBO commented 5 years ago

博主,这个主题的\layout_partial文件夹下没有article.ejs和comment.ejs

DDDANBO commented 5 years ago

还有博主,怎么对文章进行'SHA256'加密,还有Front-matter应该怎么写?

blinkfox commented 5 years ago

@DDDANBO 为啥要article.ejscomment.ejs这两个文件呢,对文章进行SHA256不行,只能对密码进行加密,Front-matter的示例:

---
title: typora-vue-theme主题介绍
date: 2018-09-07 09:25:00
author: 赵奇
 # 图片推荐使用图床(腾讯云、七牛云、又拍云等)来做图片的路径.如:http://xxx.com/xxx.jpg
img: /source/images/xxx.jpg
# 如果top值为true,则会是首页推荐文章
top: true
# 如果要对文章设置阅读验证密码的话,就可以在设置password的值,该值必须是用SHA256加密后的密码,防止被他人识破
password: 8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92
# 本文章是否开启mathjax,且需要在主题的_config.yml文件中也需要开启才行
mathjax: false
summary: 这是你自定义的文章摘要内容,如果这个属性有值,文章卡片摘要就显示这段文字,否则程序会自动截取文章的部分内容作为摘要
categories: Markdown
tags:
  - Typora
  - Markdown
---
DDDANBO commented 5 years ago

@blinkfox @DDDANBO 为啥要article.ejscomment.ejs这两个文件呢,对文章进行SHA256不行,只能对密码进行加密,Front-matter的示例:

---
title: typora-vue-theme主题介绍
date: 2018-09-07 09:25:00
author: 赵奇
 # 图片推荐使用图床(腾讯云、七牛云、又拍云等)来做图片的路径.如:http://xxx.com/xxx.jpg
img: /source/images/xxx.jpg
# 如果top值为true,则会是首页推荐文章
top: true
# 如果要对文章设置阅读验证密码的话,就可以在设置password的值,该值必须是用SHA256加密后的密码,防止被他人识破
password: 8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92
# 本文章是否开启mathjax,且需要在主题的_config.yml文件中也需要开启才行
mathjax: false
summary: 这是你自定义的文章摘要内容,如果这个属性有值,文章卡片摘要就显示这段文字,否则程序会自动截取文章的部分内容作为摘要
categories: Markdown
tags:
  - Typora
  - Markdown
---

(1)博主好,那读者怎么输入密码呢。 (2)还有博客中右边的目录索引和左边显示的内容不能对齐——就是说目录显示“配置”,左边的内容却是“特性”。——之前因为一些配置true和false弄乱了(已经把highlight设置为false)。——我使用了hexo-blog-encrypt插件就出现目录和文章内容对不齐的问题。

DDDANBO commented 5 years ago

博主,toc目录标题和文章显示的内容不一致怎么办,就像这样:https://user-images.githubusercontent.com/46922471/52909717-04fc4380-32c8-11e9-9969-90e998690e96.jpg

fadfadfafsfasd commented 5 years ago

请问,my-gallery.ejs下的相片路径能更改吗?我尝试了但无效。

<%
// the gallery photos of theme _config.yml.
var gallery = theme.myGallery.data;//就是这个路径,能改吗?我想把它单独列成一个文件,但不会弄。
//var gallery = theme.gallerylink;
//var gallery = theme.Gallery.myGallery.data;
%>
<div id="myGallery" class="my-gallery">
    <div class="title center-align" data-aos="zoom-in-up">
        <i class="fa fa-photo"></i>&nbsp;&nbsp;<%- __('gallery') %>
    </div>
    <div class="row">
        <% if (gallery) { %>
        <% Object.keys(gallery).forEach(function(photo) { %>
        <div class="photo col s12 m6 l4" data-aos="fade-up">
            <div class="img-item" data-src="<%- gallery[photo] %>">
                <img src="<%- gallery[photo] %>" class="responsive-img">
            </div>
        </div>
        <% }); %>
        <% } %>
    </div>
</div>
blinkfox commented 5 years ago

@CdqPT var gallery = theme.myGallery.data; 这个又不是相片的路径,只是读取的主题文件 _config.yml 中的 myGallery.data 中的数据而已,下面的数据的相片路径你可以换的。

o0o0oo00 commented 5 years ago

前排露脸

Jason0816 commented 5 years ago

博主,你好,首先感谢您发布的主题。我在使用过程中遇到了一个问题,我的TOC目录有显示出来,但是没有随着文章滚动而发生变化。我clone了最新的文件,测试之后依然不行,请问这个TOC目录需要额外的设置吗?

Jason0816 commented 5 years ago

我想我找到原因了,markdown标题标签要与上一段中间空出一行才能有目录效果,如果没有空行,就会丢失滚动效果

blinkfox commented 5 years ago

@2572880761 嗯,应该是Hexo生成的标题也有些问题吧,Markdown文件中的标题、段落、代码块等块级元素上下都要空一行的。

Qingfengchuiwoxin commented 5 years ago

博主,使用了您的主题。但是为什么音乐按照您的设置无法播放呢?出现an audio error错误

Qingfengchuiwoxin commented 5 years ago

通过控制台查看,您音乐的地址是:http://static.blinkfox.com/music1.mp3 。而我使用的是网易云生成的外链接:http://music.163.com/outchain/player?type=2&id=456456745 。 我把链接改为您的,,就可以用了。不知道这是什么原因。如何解决呢?还有就是,博主的音乐是放在服务器上的么?

blinkfox commented 5 years ago

@Qingfengchuiwoxin 用不了网易云的,你可以放在七牛云、又拍云、腾讯云等里面。

fadfadfafsfasd commented 5 years ago

能单独做个相册功能吗[转圈哭.gif]?

whiteice-c commented 5 years ago

博主,我更换了主题之后出现页面空白的问题可能是什么原因,在本地访问也一样的。。。

blinkfox commented 5 years ago

@CdqPT 以后有时间考虑做这个吧,最近是没时间了。

blinkfox commented 5 years ago

@baibing0819 页面出现空白得分析具体原因吧,一看NodeJS控制台有没有报错,而看浏览器控制台有没有什么报错,然后根据错误信息解决呗。

techeaven commented 5 years ago

您好 这个评论功能怎么添加进去啊

blinkfox commented 5 years ago

@techeaven 搜索引擎搜索下 Hexo 集成 Gitalk,然后获取到几个关键配置信息,然后在我主题的 _config.yml 中填入即可。

zhengnianli commented 5 years ago

博主,主题不起作用怎么破。用其他主题是可以的

techeaven commented 5 years ago

谢谢博主,请问如果写有目录的文章啊?我看写的都是支持目录功能的

blinkfox commented 5 years ago

@zhengnianli 你得具体说明怎么不起作用,哪里报错了,我才能排查,不然没啥用。

blinkfox commented 5 years ago

@techeaven 你是说要怎么写有目录的文章?文章TOC目录是默认开启的,只要你的Markdown有二、三、四号标题就行。

Qingfengchuiwoxin commented 5 years ago

@blinkfox @Qingfengchuiwoxin 用不了网易云的,你可以放在七牛云、又拍云、腾讯云等里面。

恩恩,感谢博主,问题解决了,我用的阿里云的oss文件存储

feng1632009 commented 5 years ago

你好博主,集成音乐插件的时候 按照你配置写入配置建立文件 重新生成静态页 但页面并没有音乐栏目出现 也没有报错信息 这个情况应该怎么解决?

blinkfox commented 5 years ago

@feng1632009 这个肯定是哪里配置有问题了,我们的都是这样配的就行,你得再试试,多找找原因。

feng1632009 commented 5 years ago

@blinkfox 是我自己粗心了 没在皮肤目录下那个配置文件操作 而在全局的操作 已经可以了 谢谢

Qingfengchuiwoxin commented 5 years ago

博主,您好,还有一个问题。就是设置完keywords 为什么还是无法在百度里面搜索到自己的博客呢?:smile:

gc-china commented 5 years ago

博主,这个该怎么去优化加载速度啊 访问你博客访问很快,但是自己却特别慢!

blinkfox commented 5 years ago

@gc-china 我也没有优化,第一次是比较慢,一些静态资源文件你可以改用CDN,图片资源存到云服务器上去。

SkyzcYou commented 5 years ago

好棒的主题!!!

Jason0816 commented 5 years ago

博主你好,请问是否可以将默认的summary限制为两行,我在使用过程中发现,如果博客内容为英文,默认的summary为两行,但是如果是中文的话,就会显示4行,这就导致排版无法对其,显示效果不太好,但是自己指定summary的话,就需要想办法凑到两行字,不便于使用,希望能够解决