commit
8febc7f6d0
21 changed files with 1017 additions and 805 deletions
@ -0,0 +1,82 @@ |
||||
--- |
||||
name: 帮助流程A:使用遇到问题(主题未经修改) |
||||
about: 此流程适用于直接使用主题搭建博客的用户,在仅仅修改了主题配置文件、Hexo配置文件、增加了自己的文章,这种情况下无法成功搭建或者部署的问题。 |
||||
title: '' |
||||
labels: 'help-a' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
<!-- 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 --> |
||||
|
||||
## 自检报告 |
||||
|
||||
分类:使用遇到问题(主题未经修改) |
||||
|
||||
<!-- 如果您未按照模板中的步骤进行自检,我们可能不会阅读您的 Issue。 --> |
||||
<!-- 90% 的问题可通过自检解决。 --> |
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来完成选择) --> |
||||
|
||||
### 第一步 <!-- 60% 的问题通过这一步就解决了。 --> |
||||
|
||||
- [ ] 在 [Volantis](https://volantis.js.org) 文档中搜索关键词,并未找到相关内容。 |
||||
- [ ] 在 [Hexo](https://hexo.io/zh-cn/docs/) 官方文档 中搜索关键词,并未找到相关内容。 |
||||
|
||||
### 第二步 <!-- 30% 的问题通过这一步就解决了。 --> |
||||
|
||||
下载[文档源码](https://github.com/xaoxuu/volantis-docs/),然后下载主题源码到 themes/volantis ,执行 `npm install` 安装依赖包,执行 `hexo s` 运行,查看结果是否存在相同的问题。 |
||||
|
||||
- A. 如果正常,请一步一步将配置文件修改为您原来的设定,直至找到出问题的地方。 |
||||
- B. 如果依然存在异常,请检查 Hexo 环境配置,或者重新安装 Hexo。 |
||||
|
||||
- [ ] 我已完成上述操作,结果是:____ |
||||
|
||||
### 第三步 |
||||
|
||||
- [ ] 我已经将主题升级到最新版本。 |
||||
|
||||
## 问题描述 |
||||
|
||||
<!-- 尽可能详细地描述您的问题 --> |
||||
|
||||
## 环境信息 |
||||
|
||||
<!-- 请务必提供以下信息 --> |
||||
|
||||
### 复现地址: |
||||
<!-- 如果使用文档官网源码本地运行也存在异常,可以不用提供复现地址。 --> |
||||
|
||||
### 截图: |
||||
<!-- 不同系统、浏览器效果可能不同,提供截图有助于发现问题所在。 --> |
||||
|
||||
### 浏览器、操作系统 |
||||
|
||||
|
||||
### 站点配置文件 |
||||
<!-- 只粘贴 `blog/_config.yml` 中修改过的部分 --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
### 主题配置文件 |
||||
<!-- 只粘贴 `themes/volantis/_config.yml` 中修改过的部分 --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
#### 更多信息 |
||||
|
||||
<!-- 要求提供时再回来补全即可 --> |
||||
|
||||
#### node.js & npm |
||||
<!-- 粘贴 `node -v && npm -v` 输出的信息 --> |
||||
``` |
||||
|
||||
``` |
||||
|
||||
#### package.json |
||||
<!-- 粘贴 `npm ls --depth 0` 输出的信息 --> |
||||
``` |
||||
|
||||
``` |
@ -0,0 +1,80 @@ |
||||
--- |
||||
name: 帮助流程B:使用遇到问题(主题文件 ejs、js、css、第三方插件等有修改) |
||||
about: 此流程适用于 fork 主题并对主题文件(ejs、js、css 等)进行了修改后搭建博客的用户,无法成功搭建或者部署的问题。 |
||||
title: '' |
||||
labels: 'help-b' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
<!-- 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 --> |
||||
|
||||
## 自检报告 |
||||
|
||||
分类:使用遇到问题(主题文件 ejs、js、css、第三方插件等有修改) |
||||
|
||||
<!-- 如果您未按照模板中的步骤进行自检,我们可能不会阅读您的 Issue。 --> |
||||
<!-- 80% 的问题可通过自检解决。 --> |
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来完成选择) --> |
||||
|
||||
### 第一步 <!-- 80% 的问题通过这一步就解决了。 --> |
||||
|
||||
查看未经修改的主题是否也存在此问题: |
||||
|
||||
- A. 未经修改的主题也存在此问题,请使用 issue 模板「帮助流程A. 使用遇到问题(主题未经修改)」。 |
||||
- B. 未经修改的主题不存在此问题,在 git 历史中新建分支还原修改,直至找到出问题的地方。 |
||||
|
||||
- [ ] 我已完成上述操作,结果是:____ |
||||
|
||||
### 第二步 |
||||
|
||||
这部分内容是否与第三方插件有关? |
||||
|
||||
- A. 是主题文档中提到过的第三方插件(意味着有主动兼容),请在问题描述中描述清楚。 |
||||
- B. 是主题文档中没有提到过的第三方插件,可能存在没有兼容的情况,请使用 issue 模板「提交一个建议」。 |
||||
|
||||
## 问题描述 |
||||
|
||||
<!-- 尽可能详细地描述您的问题 --> |
||||
|
||||
## 环境信息 |
||||
|
||||
<!-- 请务必提供以下信息 --> |
||||
|
||||
### 复现地址: |
||||
<!-- 如果使用文档官网源码本地运行也存在异常,可以不用提供复现地址。 --> |
||||
|
||||
### 截图: |
||||
<!-- 不同系统、浏览器效果可能不同,提供截图有助于发现问题所在。 --> |
||||
|
||||
### 浏览器、操作系统 |
||||
|
||||
|
||||
### 站点配置文件 |
||||
<!-- 只粘贴 `blog/_config.yml` 中修改过的部分 --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
### 主题配置文件 |
||||
<!-- 只粘贴 `themes/volantis/_config.yml` 中修改过的部分 --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
#### 更多信息 |
||||
|
||||
<!-- 要求提供时再回来补全即可 --> |
||||
|
||||
#### node.js & npm |
||||
<!-- 粘贴 `node -v && npm -v` 输出的信息 --> |
||||
``` |
||||
|
||||
``` |
||||
|
||||
#### package.json |
||||
<!-- 粘贴 `npm ls --depth 0` 输出的信息 --> |
||||
``` |
||||
|
||||
``` |
@ -1,67 +1,72 @@ |
||||
--- |
||||
name: Bug Report |
||||
about: Something isn't working as expected |
||||
name: 反馈一个明确的BUG |
||||
about: 此流程适用于您已经定位到了问题的具体所在,不需要协助定位问题。希望开发者予以修正。 |
||||
title: '' |
||||
labels: 'new,question' |
||||
labels: 'bug-report' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
If you delete this template, we may close your issue without conducting an investigation. |
||||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 |
||||
<!-- 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 --> |
||||
|
||||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. |
||||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 |
||||
## BUG描述 |
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 --> |
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> |
||||
<!-- 尽可能详细地描述您的问题,包括预期与实际表现的区别 --> |
||||
|
||||
- [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-volantis/releases/latest) version of Volantis. |
||||
- [ ] I have reviewed [guidelines for Volantis](https://volantis.js.org), which does not help me. |
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me. |
||||
## 复现报告 |
||||
|
||||
*** |
||||
分类:反馈一个明确的BUG |
||||
|
||||
## Expected behavior <!-- 预期行为 --> |
||||
<!-- 如果您未按照模板中的步骤进行自检,我们可能不会阅读您的 Issue。 --> |
||||
|
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来完成选择) --> |
||||
|
||||
## Actual behavior <!-- 实际行为 --> |
||||
<!-- Please provide at least one of the following information (请至少提供以下的一项信息) --> |
||||
- [ ] 将主题升级至最新版本。 |
||||
- [ ] 下载主题官网源码运行,经过一定的步骤,可以复现此BUG。 |
||||
|
||||
- Links to demo site with this issue: N/A |
||||
- Links to repository or source code of the blog: N/A |
||||
### 复现步骤 |
||||
|
||||
1. xxx |
||||
2. xxx |
||||
3. xxx |
||||
|
||||
## Steps to reproduce the behavior <!-- 重现步骤 --> |
||||
1. N/A |
||||
2. N/A |
||||
3. N/A |
||||
## 环境信息 |
||||
|
||||
<!-- 请务必提供以下信息 --> |
||||
|
||||
## Environment Information |
||||
### 复现地址: |
||||
<!-- 如果使用文档官网源码本地运行也存在异常,可以不用提供复现地址。 --> |
||||
|
||||
### Node.js and NPM Information |
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) --> |
||||
``` |
||||
### 截图: |
||||
<!-- 不同系统、浏览器效果可能不同,提供截图有助于发现问题所在。 --> |
||||
|
||||
``` |
||||
### 浏览器、操作系统 |
||||
|
||||
### Package dependencies Information |
||||
<!-- Paste output from `npm ls --depth 0` (粘贴 `npm ls --depth 0` 输出的信息) --> |
||||
``` |
||||
|
||||
### 站点配置文件 |
||||
<!-- 只粘贴 `blog/_config.yml` 中修改过的部分 --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
### Hexo Configuration |
||||
<!-- Paste configuration from Hexo `_config.yml` (粘贴 Hexo `_config.yml` 中的内容) --> |
||||
### 主题配置文件 |
||||
<!-- 只粘贴 `themes/volantis/_config.yml` 中修改过的部分 --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
### Volantis Configuration |
||||
<!-- Paste ONLY CHANGED CONFIGURATION from Volantis `_config.yml` (只粘贴 Volantis 主题配置文件 `_config.yml` 中修改过的部分) --> |
||||
```yml |
||||
#### 更多信息 |
||||
|
||||
<!-- 要求提供时再回来补全即可 --> |
||||
|
||||
#### node.js & npm |
||||
<!-- 粘贴 `node -v && npm -v` 输出的信息 --> |
||||
``` |
||||
|
||||
``` |
||||
|
||||
## Other Information <!-- (Like Browser, System, Screenshots) --> |
||||
#### package.json |
||||
<!-- 粘贴 `npm ls --depth 0` 输出的信息 --> |
||||
``` |
||||
|
||||
``` |
||||
|
@ -1,21 +1,21 @@ |
||||
--- |
||||
name: Feature Request |
||||
about: Suggest an idea for this project |
||||
name: 提交一个建议 |
||||
about: 希望增加或者调整某项功能 |
||||
title: '' |
||||
labels: 'new,suggest' |
||||
labels: 'suggest' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
If you delete this template, we may close your issue without conducting an investigation. |
||||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 |
||||
<!-- 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 --> |
||||
|
||||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. |
||||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 |
||||
### 自检报告 |
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 --> |
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> |
||||
|
||||
- [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-volantis/releases/latest) version of Volantis. |
||||
- [ ] I have reviewed [guidelines for Volantis](https://volantis.js.org), which does not help me. |
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me. |
||||
- [ ] 我已阅读主题文档,确认不存在此功能。 |
||||
- [ ] 我已阅读Hexo官方文档,确认不存在此功能。 |
||||
|
||||
## 需求描述 |
||||
|
||||
<!-- 如果能够提供参考链接或者示意图更好 --> |
||||
|
@ -1,21 +1,14 @@ |
||||
--- |
||||
name: Other Issue |
||||
about: Others |
||||
about: 要表述的内容不属于上述模板的范围 |
||||
title: '' |
||||
labels: 'new' |
||||
labels: '' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
If you delete this template, we may close your issue without conducting an investigation. |
||||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 |
||||
<!-- 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 --> |
||||
|
||||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. |
||||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 |
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 --> |
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> |
||||
|
||||
- [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-volantis/releases/latest) version of Volantis. |
||||
- [ ] I have reviewed [guidelines for Volantis](https://volantis.js.org), which does not help me. |
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me. |
||||
- [ ] 我要说的内容与帮助或者BUG、建议都无关。(如果有关,请使用相关模板) |
||||
|
@ -1,55 +0,0 @@ |
||||
--- |
||||
name: Question Report |
||||
about: I have a question for Volantis (e.g. Customize) |
||||
title: '' |
||||
labels: 'new,question' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
If you delete this template, we may close your issue without conducting an investigation. |
||||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 |
||||
|
||||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. |
||||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 |
||||
|
||||
## Issue Checklist <!-- 我确认我已经查看了 --> |
||||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> |
||||
|
||||
- [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-volantis/releases/latest) version of Volantis. |
||||
- [ ] I have reviewed [guidelines for Volantis](https://volantis.js.org), which does not help me. |
||||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me. |
||||
|
||||
*** |
||||
|
||||
## Describe your question <!-- 描述您的问题 --> |
||||
|
||||
|
||||
|
||||
## Environment Information |
||||
|
||||
### Node.js and NPM Information |
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) --> |
||||
``` |
||||
|
||||
``` |
||||
|
||||
### Package dependencies Information |
||||
<!-- Paste output from `npm ls --depth 0` (粘贴 `npm ls --depth 0` 输出的信息) --> |
||||
``` |
||||
|
||||
``` |
||||
|
||||
### Hexo Configuration |
||||
<!-- Paste configuration from Hexo `_config.yml` (粘贴 Hexo `_config.yml` 中的内容) --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
### Volantis Configuration |
||||
<!-- Paste ONLY CHANGED CONFIGURATION from Volantis `_config.yml` (只粘贴 Volantis 主题配置文件 `_config.yml` 中修改过的部分) --> |
||||
```yml |
||||
|
||||
``` |
||||
|
||||
## Other Information <!-- (Like Browser, System, Screenshots) --> |
@ -1,18 +1,43 @@ |
||||
<script src="<%- theme.plugins.fancybox.js %>"></script> |
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script> |
||||
<script> |
||||
let LAZY_LOAD_IMAGE = "<%- config.lazyload %>"; |
||||
$(".article-entry").find("div.fancybox").find("img").each(function () { |
||||
var element = document.createElement("a"); |
||||
$(element).attr("data-fancybox", "gallery"); |
||||
function pjax_fancybox() { |
||||
$(".article-entry").find("img").not('.inline').not('a img').each(function () { //渲染 fancybox |
||||
var element = document.createElement("a"); // a 标签 |
||||
$(element).attr("pjax-fancybox", ""); // 过滤 pjax |
||||
$(element).attr("href", $(this).attr("src")); |
||||
/* 图片采用懒加载处理时, |
||||
* 一般图片标签内会有个属性名来存放图片的真实地址,比如 data-original, |
||||
* 那么此处将原本的属性名src替换为对应属性名data-original, |
||||
* 修改如下 |
||||
*/ |
||||
if (LAZY_LOAD_IMAGE) { |
||||
$(element).attr("href", $(this).attr("data-original")); |
||||
} |
||||
$(this).wrap(element); |
||||
if ($(this).attr("data-original")) { |
||||
$(element).attr("href", $(this).attr("data-original")); |
||||
} |
||||
$(element).attr("data-fancybox", "images"); |
||||
var caption = ""; // 描述信息 |
||||
if ($(this).attr('alt')) { // 标准 markdown 描述信息 |
||||
$(element).attr('data-caption', $(this).attr('alt')); |
||||
caption = $(this).attr('alt'); |
||||
} |
||||
var div = document.createElement("div"); |
||||
$(div).addClass("fancybox"); |
||||
$(this).wrap(div); // 最外层套 div ,其实主要作用还是 class 样式 |
||||
var span = document.createElement("span"); |
||||
$(span).addClass("image-caption"); |
||||
$(span).text(caption); // 加描述 |
||||
$(this).after(span); // 再套一层描述 |
||||
$(this).wrap(element); // 最后套 a 标签 |
||||
}) |
||||
$(".article-entry").find("img").fancybox({ |
||||
selector: '[data-fancybox="images"]', |
||||
hash: false, |
||||
loop: false, |
||||
closeClick: true, |
||||
helpers: { |
||||
overlay: {closeClick: true} |
||||
}, |
||||
buttons: [ |
||||
"zoom", |
||||
"close" |
||||
] |
||||
}); |
||||
}; |
||||
$(function () { |
||||
pjax_fancybox(); |
||||
}); |
||||
</script> |
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue