chore(*): minor fixes and prepare for v2 pre-release
parent
9a94031465
commit
20de91ba69
|
@ -1,11 +1,4 @@
|
||||||
Please make sure these boxes are checked before submitting your issue. Thank you!
|
Please make sure you took care of the following things before you submit this issue. Thank you!
|
||||||
|
|
||||||
- [ ] I have setuped and configurated the blog according to [Hexo official documentation](https://hexo.io/);
|
- [ ] I have set up and configured my blog according to [Hexo documentation](https://hexo.io/) and [Icarus Documentation](https://github.com/ppoffice/hexo-theme-icarus/wiki);
|
||||||
- [ ] I have read the [Theme Wiki](https://github.com/ppoffice/hexo-theme-icarus/wiki) carefully and created my own configuration file(_config.yml);
|
- [ ] I have looked up the [Github Issues](https://github.com/ppoffice/hexo-theme-icarus/issues) and found no solutions to my problems.
|
||||||
- [ ] I have looked up the [Issues](https://github.com/ppoffice/hexo-theme-icarus/issues) and found no duplicate issues.
|
|
||||||
|
|
||||||
请在发布新Issue之前确保你已经进行了如下工作,谢谢!
|
|
||||||
|
|
||||||
- [ ] 我已经按照[Hexo官方文档](https://hexo.io/)中的步骤安装与配置了Hexo;
|
|
||||||
- [ ] 我已经仔细地阅读了[主题Wiki](https://github.com/ppoffice/hexo-theme-icarus/wiki)并创建了自己的配置文件(_config.yml);
|
|
||||||
- [ ] 我已经搜索了[Issues](https://github.com/ppoffice/hexo-theme-icarus/issues),并且没有找到类似的问题。
|
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
<p align="center" class="has-mb-6">
|
<p align="center" class="has-mb-6">
|
||||||
<img class="not-gallery-item" style="height:48px" src="/hexo-theme-icarus/images/logo.svg">
|
<img class="not-gallery-item" style="height:48px" src="/hexo-theme-icarus/images/logo.svg">
|
||||||
<br> A modern, simple, and delicate theme for the static site generator Hexo.
|
<br> A simple, delicate, and modern theme for the static site generator Hexo.
|
||||||
<br>
|
<br>
|
||||||
<a href="http://ppoffice.github.io/hexo-theme-icarus/">Preview</a> |
|
<a href="http://ppoffice.github.io/hexo-theme-icarus/">Preview</a> |
|
||||||
<a href="http://ppoffice.github.io/hexo-theme-icarus/categories/">Documentation</a> |
|
<a href="http://ppoffice.github.io/hexo-theme-icarus/categories/">Documentation</a> |
|
||||||
<a href="https://github.com/ppoffice/hexo-theme-icarus/archive/master.zip">Download</a>
|
<a href="https://github.com/ppoffice/hexo-theme-icarus/archive/master.zip">Download</a>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
[](https://github.com/ppoffice/hexo-theme-icarus)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||

|

|
||||||
|
@ -113,9 +116,10 @@ layout across multiple viewpoints.
|
||||||
|
|
||||||
This project is built with
|
This project is built with
|
||||||
|
|
||||||
- Hexo 3.6.0
|
- Hexo 3.7.1
|
||||||
- Ejs
|
- Ejs
|
||||||
- Stylus
|
- Stylus
|
||||||
|
- Bulma 0.7.2
|
||||||
|
|
||||||
Please refer to the documentation for Icarus implementation details.
|
Please refer to the documentation for Icarus implementation details.
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,13 @@ module.exports = function (hexo) {
|
||||||
hexo.extend.generator.register('insight', function (locals) {
|
hexo.extend.generator.register('insight', function (locals) {
|
||||||
const url_for = hexo.extend.helper.get('url_for').bind(this);
|
const url_for = hexo.extend.helper.get('url_for').bind(this);
|
||||||
function minify(str) {
|
function minify(str) {
|
||||||
return util.stripHTML(str).trim().replace(/\n/g, ' ').replace(/\s+/g, ' ');
|
return util.stripHTML(str).trim().replace(/\n/g, ' ').replace(/\s+/g, ' ')
|
||||||
|
.replace(/&#x([\da-fA-F]+);/g, function (match, hex) {
|
||||||
|
return String.fromCharCode(parseInt(hex, 16));
|
||||||
|
})
|
||||||
|
.replace(/&#([\d]+);/g, function (match, dec) {
|
||||||
|
return String.fromCharCode(dec);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function postMapper(post) {
|
function postMapper(post) {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
* <%- _list_tags() %>
|
* <%- _list_tags() %>
|
||||||
* <%- _toc() %>
|
* <%- _toc() %>
|
||||||
*/
|
*/
|
||||||
const _ = require('lodash');
|
|
||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
module.exports = function (hexo) {
|
module.exports = function (hexo) {
|
||||||
|
@ -94,7 +93,7 @@ module.exports = function (hexo) {
|
||||||
$(tags.join(',')).each(function () {
|
$(tags.join(',')).each(function () {
|
||||||
const level = tags.indexOf(this.name);
|
const level = tags.indexOf(this.name);
|
||||||
const id = $(this).attr('id');
|
const id = $(this).attr('id');
|
||||||
const text = _.escape($(this).text());
|
const text = $(this).text();
|
||||||
|
|
||||||
for (let i = 0; i < levels.length; i++) {
|
for (let i = 0; i < levels.length; i++) {
|
||||||
if (i > level) {
|
if (i > level) {
|
||||||
|
|
|
@ -14,7 +14,6 @@ logger.info('Checking dependencies');
|
||||||
const missingDeps = [
|
const missingDeps = [
|
||||||
'js-yaml',
|
'js-yaml',
|
||||||
'moment',
|
'moment',
|
||||||
'lodash',
|
|
||||||
'cheerio',
|
'cheerio',
|
||||||
'hexo-util',
|
'hexo-util',
|
||||||
'hexo-log',
|
'hexo-log',
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="level-end">
|
<div class="level-end">
|
||||||
<% if (has_config('footer.links')) { %>
|
<% if (has_config('footer.links')) { %>
|
||||||
<div class="field has-addons is-flex-center-mobile has-mt-5-mobile">
|
<div class="field has-addons is-flex-center-mobile has-mt-5-mobile is-flex-wrap is-flex-middle">
|
||||||
<% let links = get_config('footer.links'); %>
|
<% let links = get_config('footer.links'); %>
|
||||||
<% for (let name in links) {
|
<% for (let name in links) {
|
||||||
let link = links[name]; %>
|
let link = links[name]; %>
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<a class="button is-white is-large" target="_blank" title="<%= name %>" href="<%= url_for(typeof(link) === 'string' ? link : link.url) %>">
|
<a class="button is-white <%= typeof(link) !== 'string' ? 'is-large' : '' %>" target="_blank" title="<%= name %>" href="<%= url_for(typeof(link) === 'string' ? link : link.url) %>">
|
||||||
<% if (typeof(link) === 'string') { %>
|
<% if (typeof(link) === 'string') { %>
|
||||||
<%= name %>
|
<%= name %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<% for (let i in links) { %>
|
<% for (let i in links) { %>
|
||||||
<li>
|
<li>
|
||||||
<a class="level" href="<%- links[i] %>">
|
<a class="level" href="<%- links[i] %>" target="_blank">
|
||||||
<span class="level-left">
|
<span class="level-left">
|
||||||
<span class="level-item"><%= i %></span>
|
<span class="level-item"><%= i %></span>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% if (get_config('toc') === true) {
|
<% if (get_config('toc') === true && (post.layout === 'page' || post.layout === 'post')) {
|
||||||
function buildToc(toc) {
|
function buildToc(toc) {
|
||||||
let result = '';
|
let result = '';
|
||||||
if (toc.hasOwnProperty('id') && toc.hasOwnProperty('index') && toc.hasOwnProperty('text')) {
|
if (toc.hasOwnProperty('id') && toc.hasOwnProperty('index') && toc.hasOwnProperty('text')) {
|
||||||
|
|
|
@ -205,6 +205,9 @@ img.thumbnail
|
||||||
.is-flex-center
|
.is-flex-center
|
||||||
justify-content: center !important
|
justify-content: center !important
|
||||||
|
|
||||||
|
.is-flex-middle
|
||||||
|
align-items: center !important
|
||||||
|
|
||||||
.has-order-1
|
.has-order-1
|
||||||
order: 1
|
order: 1
|
||||||
|
|
||||||
|
@ -269,8 +272,9 @@ img.thumbnail
|
||||||
font-size: 0.85em
|
font-size: 0.85em
|
||||||
font-family: family-mono
|
font-family: family-mono
|
||||||
code
|
code
|
||||||
border-radius: 2px
|
|
||||||
color: hsl(348, 100%, 61%)
|
color: hsl(348, 100%, 61%)
|
||||||
|
background: transparent
|
||||||
|
padding: 0
|
||||||
blockquote
|
blockquote
|
||||||
footer
|
footer
|
||||||
strong + cite
|
strong + cite
|
||||||
|
|
Loading…
Reference in New Issue