All Projects → letiantian → Huno

letiantian / Huno

A responsible theme for Hexo

Projects that are alternatives of or similar to Huno

Hexo Theme Freemind
Most powerful bootstrap theme for hexo.
Stars: ✭ 376 (-24.8%)
Mutual labels:  hexo
Hexo Theme Obsidian
🎨 A dark Hexo theme, it's responsive, simple but elegant.
Stars: ✭ 448 (-10.4%)
Mutual labels:  hexo
Hexo Theme Replica
Github style replication for hexo theme
Stars: ✭ 484 (-3.2%)
Mutual labels:  hexo
Hexo Theme Aircloud
A concise hexo theme
Stars: ✭ 394 (-21.2%)
Mutual labels:  hexo
Hexo Theme 3 Hexo
hexo主题:三段式设计、极简、方便 Hexo theme: three-stage design
Stars: ✭ 421 (-15.8%)
Mutual labels:  hexo
Hexo Theme Yilia Plus
一个简洁优雅的hexo主题 A simple and elegant theme for hexo.
Stars: ✭ 462 (-7.6%)
Mutual labels:  hexo
Hexo Theme Ocean
Ocean is a mobile-enabled Hexo theme based on the features in Hexo's default theme landscape.
Stars: ✭ 370 (-26%)
Mutual labels:  hexo
Hexo Theme Skapp
The hexo flat design theme(扁平化简约主题)
Stars: ✭ 490 (-2%)
Mutual labels:  hexo
Hexo Deployer Git
Git deployer plugin for Hexo.
Stars: ✭ 420 (-16%)
Mutual labels:  hexo
Hexo Theme Inside
🌈 SPA, Flat and clean theme for Hexo.
Stars: ✭ 480 (-4%)
Mutual labels:  hexo
Blog
🎯 个人博客
Stars: ✭ 394 (-21.2%)
Mutual labels:  hexo
Hexo Theme Material
Material Design theme for hexo.
Stars: ✭ 4,028 (+705.6%)
Mutual labels:  hexo
Awesome Hexo
A curated list of awesome things related to Hexo
Stars: ✭ 466 (-6.8%)
Mutual labels:  hexo
Hexo Theme Claudia
📌 Concisely designed & easy to config, match device dark mode, 90+ Lighthouse scoring
Stars: ✭ 379 (-24.2%)
Mutual labels:  hexo
Hexo Theme Keep
🌈 A simple and elegant theme for Hexo. It makes you more focused on writing.
Stars: ✭ 483 (-3.4%)
Mutual labels:  hexo
Theme Bmw
✋ Smart Voice: Voice for yourself | 微声: 请为自己发声
Stars: ✭ 373 (-25.4%)
Mutual labels:  hexo
Disqusjs
💬 Render Disqus comments in Mainland China using Disqus API
Stars: ✭ 455 (-9%)
Mutual labels:  hexo
Hexo Theme Icarus
A simple, delicate, and modern theme for the static site generator Hexo.
Stars: ✭ 5,045 (+909%)
Mutual labels:  hexo
Hexo Theme Suka
🎨Modern, powerful and simple theme for Hexo.
Stars: ✭ 487 (-2.6%)
Mutual labels:  hexo
Hexo Theme Yun
☁️ A fast & light & lovely theme for Hexo. 一个对可爱自以为是的 Hexo 主题。
Stars: ✭ 477 (-4.6%)
Mutual labels:  hexo

Huno

Huno是为Hexo编写的一个响应式的主题,该主题基于Uno

Demo

Huno's demo

安装

$ git clone git://github.com/someus/huno.git themes/huno

修改Hexo的配置文件_config.xml

theme: huno

兼容性

在Hexo 3.1.1测试正常。

配置示例

# Header
menu:
  首页: /#blog
  关于: /about
  归档: /archive

# Site favicon
favicon: /favicon.png

# Site logo
# logo: /avatar.png

# Enable Mathjax
mathjax: true

# Enable awesome-toc
awesome_toc: true

# Enable githubRepoWidget
github_repo_widget: false

menu中定义/#blog是必须的,示例中的/about/archive是两个页面。/archive会在下面的归档页面中介绍。

mathjax:

数学公式支持。其设置(layout/_scripts/mathjax.ejs)如下:

$(document).ready(function(){
    MathJax.Hub.Config({ 
        tex2jax: {inlineMath: [['[latex]','[/latex]'], ['\\(','\\)']]} 
    });
});

官网:mathjax

awesome_toc:

为文章生成目录。

官网:awesome-toc

github_repo_widget:

可视化显示github中的项目。

官网:GitHub-jQuery-Repo-Widget

侧边栏图片

侧边栏图片URL定义在source/css/uno.css中下面的这段代码中:

.panel-cover {
  display: block;
  position: fixed;
  z-index: 900;
  width: 100%;
  max-width: none;
  height: 100%;
  background: url(../images/background-cover.jpg) top left no-repeat #666666;
  background-size: cover; }

可以看出图片路径是source/images/background-cover.jpg。可以根据需要替换成不同的图片,或者修改图片URL。例如修改成CDN中的某个图片(#28):

background: url("//img.alicdn.com/tps/TB1UC8nJVXXXXbRXpXXXXXXXXXX-1920-1200.jpg") top left no-repeat #666666;

归档页面

归档页面会显示分类、标签云以及基于日期的归档。

在主题的配置文件_config.yml中:

# Header
menu:
  首页: /#blog
  关于: /about
  归档: /archive

创建新的page:

$ hexo new page archive
$ cd source/archive
$ vim index.md

内容修改为:

title: 归档
layout: page-archive
---

浏览器访问http://127.0.0.1:4000/archive/即可。

!! hexo 默认有一个/archives,如果您认为归档页面的url(/archive)和这个冲突,可以选更加合适的名称😊。

评论系统

将评论系统(例如Disqus、多说、友言、畅言等)提供的代码片段粘贴在layout/_partials/comments.js中即可。

Social Icon

默认提供了Github的图标,Github用户名请在Hexo的配置文件_config.yml中配置,例如:

# Social
social:
  github: someus

可以根据需要在layout/_partials/social.ejs中添加更多的图标。

China Social Icon

这套字体来自 设计素材:国内常用社交图标的web字体, 版权归原作者所有。在huno中CSS文件做了些修改。

这套字体和上面Social Icon的设计得并不一样,如果混用,排版效果会略差。例如,在layout/_partials/social.ejs加上:

<li class="navigation__item">
  <a href="" title="">
    <i class='icon cs-icon-douban'></i>
    <span class="label">Douban</span>
  </a>
</li>

<li class="navigation__item">
  <a href="" title="">
    <i class='icon cs-icon-weibo'></i>
    <span class="label">Weibo</span>
  </a>
</li>

效果如下:

字体文件位于source/fonts/china-social/中,对应的css文件是source/css/china-social-icon.css

网站统计

将网站统计(如Google analysis、CNZZ、百度统计等)代码放入layout/_scripts/site-analytics.ejs即可。

如何将Huno生成的静态网站放在某网站子目录

例如要将其放入http://hi.letiantian.xyz/huno/下,则需要:

修改Hexo配置文件_config.yml:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://hi.letiantian.xyz/huno
root: /huno/

修改主题的配置文件_config.yml:

# Header
menu:
  首页: /huno/#blog
  关于: /huno/about
  归档: /huno/archive

# Site favicon
favicon: /huno/favicon.png

修改huno/source/js/main.js:

if (window.location.pathname != "/") {
  $('.panel-cover').addClass('panel-cover--collapsed');
}

修改为

if (window.location.pathname != "/huno/") {
  $('.panel-cover').addClass('panel-cover--collapsed');
}

修改huno/layout/_partials/side-panel.ejs:

<% for (var i in theme.menu){ %>
  <%
    if (theme.menu[i]+'' == '/#blog') {
      nav_btn_class = 'blog-button';
    } else {
      nav_btn_class = '';
    }
  %>

修改为:

<% for (var i in theme.menu){ %>
  <%
    if (theme.menu[i]+'' == '/huno/#blog') {
      nav_btn_class = 'blog-button';
    } else {
      nav_btn_class = '';
    }
  %>

其他

如果在中国大陆使用该主题后,访问速度变慢,可以考虑注释掉source/css/uno.css的第一行。

License

Creative Commons Attribution 4.0 International

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].