Giter VIP home page Giter VIP logo

hexo-theme-ylion's Introduction

hexo-theme-ylion

😊 说不定是一个让你感到惊喜的hexo主题 🍻 🍬

在线预览 Preview

hexo-theme-ylion

Translate

Korean: README Korean

Features | 特点

  • jQuery Free,原生Javascript实现
  • 强大的CSS3动画
  • 文章过时提醒功能
  • 支持文章置顶
  • 网站公告功能
  • 增强的站内搜索
  • 首页图片懒加载
  • leancloud阅读人数统计与最受欢迎文章widget
  • 更强大的自定义
  • 主题本身无图片
  • 响应式
  • gitment集成
  • 支持双语对照功能
  • (我编不下去了,等待你去发现~)

TODO | 计划

  • 使用教程和开发Hexo主题教程
  • 更多的优化(说了和没说一样==)
  • 文章分类目录可展开
  • Javascript模块化
  • 多说的样式以拓展功能 (为多说默哀ing,已替换为gitment)
  • 数学公式支持 / updated: 2017/2/19,说明&注意事项
  • 便捷翻译和双语对照功能的使用教程
  • 你们来决定...:monkey:

Getting Started | 开始使用

⚠️ 如果你在此之前使用的是 Hexo 2.x 版本,为了避免未知的错误,请备份好数据,或者建立新的博客目录

Prerequisites | 前提条件

Node.js 环境、Git 环境以及 Hexo ,如果你尚未安装或者不了解 Hexo,请参考 官方教程 进行了解以及安装。

Dependencies | 依赖安装

因为 hexo-theme-ylion 使用了 ejs 模版引擎 、 Less CSS预编译语言以及在官方插件的基础上 进行功能的开发,依赖必不可少。

    ## 注意ejs的版本问题(见issue #5)
    npm install hexo-renderer-ejs hexo-renderer-less hexo-generator-feed hexo-generator-sitemap hexo-deployer-git hexo-util ejs@^1.0.0 moment utils-merge --save

Download | 下载主题文件

有两种方式下载主题--下载 *.zip 文件和通过 git ,无论哪种方式请确认下载的文件目录和博客站点的theme子目录中的landscape 目录同一个级别,如下:

    .
    ├── landscape
    └── ylion

Configure | 配置

接下来就是配置的问题了,分为主题配置和站点配置,主要是主题配置。

Theme Configure | 主题配置

各个设置项均在主题配置文件中以注释的形式进行说明。详情请见配置文件。

如果你对主题的配置文件格式有疑问或者不熟悉语法,参考 阮一峰老师的博客 或者提出issue

Site Configure | 站点配置

站点一般都保持默认,这里只讲主题相关的配置。

# Pagination
## Set per_page to 0 to disable pagination
## @per_page为了首页加载速度,请设置合理的数值
per_page: 10
pagination_dir: page

theme: ylion ### 主题文件在Theme目录下的命名

### search插件基于 https://github.com/PaicHyperionDev/hexo-generator-search
### 使用说明请参考该repo
search:
  path: search.xml
  field: all

### 代码高亮
highlight:
  enable: true
  line_number: true
  tab_replace:

Run | 运行预览

    hexo clean && hexo g && hexo s -p 4300

监听4300端口,使用浏览器打开地址http://localhost:4300进行预览。

Tips:

如果你为了更好地写博客,推荐两个Hexo插件:hexo-browsersynchexo-admin

    npm install hexo-browsersync --save
    npm install hexo-admin --save

hexo-browsersync 主要用于监听刷新,hexo-admin 提供类似后台的功能。

前者无需配置,按照平常启用server预览即可。hexo-admin 的使用参考官方Repo

最后,Enjoy it!!!:kissing_heart:

Languages | 支持的语言

支持英语,简体中文和繁体中文。能力有限,欢迎翻译其他语言。

Compatibility | 兼容性

IE9+*、Chrome、Firefox、Safari

说明: IE9 支持基本功能,无动画效果以及 leancloud无法正常使用统计功能

Contribute | 贡献

主题的测试基本通过,个人使用基本没有问题,但难免会有纰漏。如果大家在使用的过程发现bug或者有改进性的建议,欢迎提出~

接受各种形式的贡献,包括不限于提交问题与需求,修复代码。期待Fork和PR~

如果喜欢该款主题,还希望不吝啬你的star~:satisfied:

Thanks | 感谢

作为一个设计天分上辈子都用光了的小前端,在设计这款主题的时候参考了好多主题和博客的设计和创意, 才能在这么短的时间内成型一个博客主题,真的特别感谢!比心 ❤️

排名不分前后:

CHANGELOG

MIT

hexo-theme-ylion's People

Contributors

ganymedenil avatar geekaholiclin avatar kneep avatar mosdeo avatar nunch-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexo-theme-ylion's Issues

评论框无法初始化

你好

我的gitment配置如下:

gitment:
  enable: true
  owner: tidyjiang8
  repo: tidyjiang8.github.io
  client_id: 87e70869759a2eb97020
  client_secret: d2c9da2115c778a45072b1b485763d7a5a5851ce
  labels: "blog,gitment"
  perPage: 20
  maxCommentHeight:

创建应用时的参数如下:

Client ID
    87e70869759a2eb97020
Client Secret
    d2c9da2115c778a45072b1b485763d7a5a5851ce
Homepage URL
    https://tidyjiang8.github.io/
Authorization callback URL
    https://tidyjiang8.github.io/

但是在评论框中,Login授权后,无法初始化。评论框地址是:

不知道哪里出了问题,需求帮助~~

請問如何自訂 404 error page?

因為我是從原本的WP搬到 Hexo來,現在搜尋引擎上的收錄結果都還是原本舊的連結
所以我想要放一個404 error page 導引user到首頁去作搜尋
我下了 hexo new page 404
然後修改 source/404/index.md


title: 404 Not Found:頁面無法顯示
toc: false
comments: false
permalink: /404

網頁內文...

現在開啟錯誤的網址時,是會導到 http://mydomain.com/404沒錯,但是內容是空白的,顯示不出我設定的內文,像底下這張圖這樣
2017-07-19_17-02-38

我翻了一下config.yml,好像沒有看到有特別針對 404作處理?請教我應該在這個主題底下去自訂404 page?

替换开发技术栈以优化开发流程

打算引入Webpack等。

待考虑,最大的问题是开发和发布的分开,开发后需要生成另外一套?还是push到不同分支?如果相同分支会不会使得用户pull无用代码?

Disqus 設定後不能正常建置

我的設置是這樣

## comments -- 评论框
### disqus
disqus_shortname: mosdeo-github-io
### duoshuo
duoshuo_shortname:
### gitment
gitment:

hexo g 每一篇文章都會出現如下錯誤

ERROR /home/LKY/mosdeo_github_io/themes/ylion/layout/layout.ejs:1
 >> 1| <%- partial('_partial/head') %>
    2| <body id="<%= "404 Not Found" === (page.title && page.title.trim()) ? 'error-page' : 'normal'%>">
    3| <%- partial('_partial/_head-sections/IE',null,{cache: !config.relative_link}) %>
    4| <div id="wrap">

/home/LKY/mosdeo_github_io/themes/ylion/layout/_partial/head.ejs:17
    15|     <%- partial('_head-sections/title') %>
    16|     <%- partial('_head-sections/style') %>
 >> 17|     <%- partial('_head-sections/script') %>
    18|     <%- partial('_thirdParty/baidu_an') %>
    19|     <%- partial('_thirdParty/google_analytics') %>
    20| </head>

/home/LKY/mosdeo_github_io/themes/ylion/layout/_partial/_head-sections/script.ejs:24
    22| <!--<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>-->
    23|
 >> 24| <% if(theme.gitment.enable && is_post()){ %>
    25| <%- js("/js/thirdParty/gitment.browser.min.js") %>
    26| <script>
    27|   var labels = "<%= theme.gitment.labels %>";

Cannot read property 'enable' of null

Markdown文档格式

博主把文档格式也上传一份吧,方便应用。谢谢!
比如首页标题处的预览图片链接如何添加标签问题等。
<div class="article-img img-ajax" data-src= http://7xobsp.com1.z0.glb.clouddn.com/346.jpg>

或者可以把却省的图片缩略图为一个固定链接(有实际地址),这样就避免了没有指定链接时,图片位置一直加载问题。

翻译文章的增强功能

初步设想是想通过pandoc将html文件转换为markdown,然后在markdown中按照一定的格式直接翻译,在hexo g命令运行的时候,将英文作为对应中文的title attr显示,具体效果参考vuejs双语对照网站。

目前的难点在于:

  • 如何确保一些特殊情况也能一一对应?(eg.标签的多种多样)
  • "按照一定的格式直接翻译"是按照什么格式比较方便地翻译?

thumbnail是不是介绍中的首页图片加载?

---
title: (译)What do the following phrases mean in C++:zero-, default- and value-initialization?(03 98)
date: 2017-08-02 17:57:16
tags: translation
thumbnail: http://i.stack.imgur.com/oURrw.png
categories: c/c++
bgimage: http://i.stack.imgur.com/oURrw.png
---

这是一个示例, 我希望能在每篇文章的左边有能加载出thumbnail/bgimage里面的图片, 但是打开我的博客基本都处于加载状态, 请问如何解决

請問怎麼修改字體大小呢?

不知道是不是我用 2k 螢幕(surface pro 3)的關係,我會覺得字體太小,閱讀體驗不佳。
可以在哪個設定裡把字體改大嗎? #

iframe 沒辦法置中

在你這個主題裏面,圖片不論是用 markdown 或是 "" 都可以自動置中。我希望放影片也可以置中,但是 iframe 沒辦法置中,我自己加上 align="middle" 這個屬性設定也不行。

這篇文章

原檔案

最开始打开时页面位置问题

我新建了两篇博客,hexo s 之后在本地预览,打开发现右侧滚动条自动滚动到最下面,然而不是必现的,偶尔会出现,放到github上之后也存在同样的问题,目测是个bug吧?

对于ylion 更换代码主题的小疑惑

### highlight{@highlightStyle:[github,solarized-light]}
### 内置两款代码主题
#highlightStyle: github

我想使用 highlight 的 monokai-sublime

我把 ↓ ↓ ↓ 这些代码 放入了layout.ejs 文件中 但是没反应 那里错了

<link rel="stylesheet"
      href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/monokai-sublime.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<script >hljs.initHighlightingOnLoad();</script> 

hexo g "color is required!" error

hexo g 每一篇文章會出現如下錯誤

ERROR /home/LKY/mosdeo_github_io/themes/ylion/layout/layout.ejs:7
    5|     <%- partial('_partial/header') %>
    6|     <div id="container">
 >> 7|         <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
    8|         <%- body %>
    9|     </div>
    10|     <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>

/home/LKY/mosdeo_github_io/themes/ylion/layout/_partial/sidebar.ejs:4
    2| <ul id="sidebar">
    3|     <% theme.widgets.forEach(function(widget){ %>
 >> 4|     <%- partial('_widget/' + widget) %>
    5|     <% }) %>
    6| </ul>
    7| 

/home/LKY/mosdeo_github_io/themes/ylion/layout/_widget/tagcloud.ejs:6
    4|   <div class="tagcloud-content">
    5|     <% var tagcloud_config = theme.tagcloud_config;%>
 >> 6|       <%-tagcloud({
    7|           min_font: tagcloud_config.min_font,
    8|           max_font: tagcloud_config.max_font,
    9|           unit: tagcloud_config.unit,

color is required!
TypeError: /home/LKY/mosdeo_github_io/themes/ylion/layout/layout.ejs:7
    5|     <%- partial('_partial/header') %>
    6|     <div id="container">
 >> 7|         <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
    8|         <%- body %>
    9|     </div>
    10|     <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>

/home/LKY/mosdeo_github_io/themes/ylion/layout/_partial/sidebar.ejs:4
    2| <ul id="sidebar">
    3|     <% theme.widgets.forEach(function(widget){ %>
 >> 4|     <%- partial('_widget/' + widget) %>
    5|     <% }) %>
    6| </ul>
    7| 

/home/LKY/mosdeo_github_io/themes/ylion/layout/_widget/tagcloud.ejs:6
    4|   <div class="tagcloud-content">
    5|     <% var tagcloud_config = theme.tagcloud_config;%>
 >> 6|       <%-tagcloud({
    7|           min_font: tagcloud_config.min_font,
    8|           max_font: tagcloud_config.max_font,
    9|           unit: tagcloud_config.unit,

color is required!
    at new Color (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/plugins/helper/tagcloud.js:241:11)
    at Object.tagcloudHelper (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/plugins/helper/tagcloud.js:182:18)
    at Object.wrapper [as tagcloud] (/home/LKY/mosdeo_github_io/node_modules/lodash/lodash.js:4941:19)
    at eval (eval at compile (/home/LKY/mosdeo_github_io/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:18:16)
    at returnedFn (/home/LKY/mosdeo_github_io/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/theme/view.js:120:22)
    at Theme._View.View.View.renderSync (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/theme/view.js:48:23)
    at Object.partial (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/plugins/helper/partial.js:39:15)
    at Object.wrapper [as partial] (/home/LKY/mosdeo_github_io/node_modules/lodash/lodash.js:4941:19)
    at eval (eval at compile (/home/LKY/mosdeo_github_io/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:15:17)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (/home/LKY/mosdeo_github_io/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:12:22)
    at returnedFn (/home/LKY/mosdeo_github_io/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/theme/view.js:120:22)
    at Theme._View.View.View.renderSync (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/theme/view.js:48:23)
    at fragment_cache (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/plugins/helper/partial.js:36:52)
    at Object.fragmentCache (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/plugins/helper/fragment_cache.js:9:32)
    at Object.wrapper [as fragment_cache] (/home/LKY/mosdeo_github_io/node_modules/lodash/lodash.js:4941:19)
    at Object.partial (/home/LKY/mosdeo_github_io/node_modules/hexo/lib/plugins/helper/partial.js:36:17)
    at Object.wrapper [as partial] (/home/LKY/mosdeo_github_io/node_modules/lodash/lodash.js:4941:19)
    at eval (eval at compile (/home/LKY/mosdeo_github_io/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:21:17)
    at returnedFn (/home/LKY/mosdeo_github_io/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:615:17)

看起來應該是 _config.yml 裡面的 tagcloud_config 區塊有錯,不過這邊我都沒動過,都照你原版的。也做過 YAML check 通過。所以想不到還有哪裡可能出錯?

can not achieve search function

Hi, I am here again, I have tried many methods, but the search function is still cannot be finished.
6211363e-6f24-4376-8a2a-31c710f9108b
d6cad136-32b4-4973-ae73-5f872d4b6158
I always get this issue.

And I have installed search plugin, and search.xml has been generated.
6ff00c82-be78-44c1-a793-0f68625399ff

When you have time, can you help me? Thx!!!!!

leancloud统计有问题

我在手机上查看文章会有与阅读数,但是只能从0变到1,换设备查看同一篇文章阅读数不变。pc端阅读量不显示,一直是那个旋转的圈圈。我想请问一下我是什么地方设置错误吗

应用主题报错

`
$ hexo g

ERROR Script load failed: themes\hexo-theme-ylion\scripts\generator\index.js
TypeError: Cannot set property 'cdata' of undefined
at Object. (F:\Githexo\themes\hexo-theme-ylion\scripts\generator\lib\generator.js:5:19)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (F:\Githexo\node_modules\hexo\lib\hexo\index.js:216:21)
at F:\Githexo\themes\hexo-theme-ylion\scripts\generator\index.js:19:42
at F:\Githexo\node_modules\hexo\lib\hexo\index.js:232:12
at tryCatcher (F:\Githexo\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (F:\Githexo\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (F:\Githexo\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (F:\Githexo\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (F:\Githexo\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (F:\Githexo\node_modules\bluebird\js\release\promise.js:638:18)
at Promise._resolveCallback (F:\Githexo\node_modules\bluebird\js\release\promise.js:432:57)
at Promise._settlePromiseFromHandler (F:\Githexo\node_modules\bluebird\js\release\promise.js:524:17)
at Promise._settlePromise (F:\Githexo\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (F:\Githexo\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (F:\Githexo\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (F:\Githexo\node_modules\bluebird\js\release\promise.js:638:18)
at F:\Githexo\node_modules\bluebird\js\release\nodeback.js:42:21
at F:\Githexo\node_modules\graceful-fs\graceful-fs.js:78:16
at tryToString (fs.js:455:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)
ERROR Script load failed: themes\hexo-theme-ylion\scripts\generator\lib\generator.js
TypeError: Cannot set property 'cdata' of undefined
at F:\Githexo\themes\hexo-theme-ylion\scripts\generator\lib\generator.js:5:19
at F:\Githexo\node_modules\hexo\lib\hexo\index.js:232:12
at tryCatcher (F:\Githexo\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (F:\Githexo\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (F:\Githexo\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (F:\Githexo\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (F:\Githexo\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (F:\Githexo\node_modules\bluebird\js\release\promise.js:638:18)
at Promise._resolveCallback (F:\Githexo\node_modules\bluebird\js\release\promise.js:432:57)
at Promise._settlePromiseFromHandler (F:\Githexo\node_modules\bluebird\js\release\promise.js:524:17)
at Promise._settlePromise (F:\Githexo\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (F:\Githexo\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (F:\Githexo\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (F:\Githexo\node_modules\bluebird\js\release\promise.js:638:18)
at F:\Githexo\node_modules\bluebird\js\release\nodeback.js:42:21
at F:\Githexo\node_modules\graceful-fs\graceful-fs.js:78:16
at tryToString (fs.js:455:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)
INFO Start processing
INFO Files loaded in 197 ms
INFO Generated: 2017/05/11/hello-world/index.html
INFO Generated: archives/index.html
INFO Generated: archives/2017/05/index.html
INFO Generated: archives/2017/index.html
INFO Generated: index.html
INFO 5 files generated in 169 ms
`
博主看一下是什么原因导致的主题更换不成功。

可以部分文章指定縮圖嗎?

目前縮圖是從文章裡隨機挑選,但是有些文章我會想要指定縮圖,讓讀者在預覽階段就比較有"感覺"。這是我很想要的功能,請問目前有辦法做到嗎?

這個功能我願意打賞 1000 TWD@GeekaholicLin

請問該如何修改程式碼部份的顯示?

因為我的網站上會有很多程式碼
但是現在的樣式,沒有刻意強調程式碼的部份,所以突顯不出來
像這樣
2017-08-15_11-28-33

請問我如果要修改這部份,應該要改哪邊?

Translation

Is that possible to have a English Readme please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.