Coder Social home page Coder Social logo

shanamaid / hexo-theme-shana Goto Github PK

View Code? Open in Web Editor NEW
178.0 7.0 36.0 3.36 MB

what's a cool hexo theme!

Home Page: https://shanamaid.github.io/

License: MIT License

JavaScript 27.23% CSS 7.48% EJS 24.39% Stylus 40.89%
hexo hexo-theme hexo-site blog blog-theme static-site shana hexo-theme-shana

hexo-theme-shana's Introduction

hexo-theme-shana

shana是以hexo 3.2为基础制作的主题,为庆贺夏娜酱2016年加冕萌王而诞生的,由于比较多的animation,低配手机在移动端访问的时候可能会出现卡顿。你可以访问我的博客观看效果 夏娜酱2016年加冕萌王 ——————————————————————————————————

关于主题

  • shana主题不考虑兼容低版本浏览器
  • 追求PC端体验,移动端次之
  • 打造二次元主题

效果图

首页 归档页 标签页 代码高亮 GalMenu菜单

动态特效请访问我的博客观看效果,右键调出GalMenu

使用

安装

 git clone https://github.com/ShanaMaid/hexo-theme-shana themes/shana

配置

修改hexo根目录下的 _config.yml

`language: zh-CN`

`theme: shana`

同时将themes/shana/_source/tagscategories文件夹拷贝到hexo根目录下的source文件夹下

更新

cd themes/shana

git pull origin master

配置文件

# Header
menu:
  Home: /
  Archives: /archives
  Categories: /categories
  Tags: /tags
rss: /atom.xml

# Content
excerpt_link: Read More
fancybox: true

# Sidebar
sidebar: left
widgets:
- nav
- about

# display widgets at the bottom of index pages (pagination == 2)
index_widgets:
# - category
# - tagcloud
# - archive

# widget behavior
archive_type: 'monthly'
show_count: false

# Miscellaneous
google_analytics:
favicon: /favicon.png
twitter:
google_plus:
fb_admins:
fb_app_id:


# GalMenu - PC端右键调出,移动端长按
# galmenu决定是否开启
# mp3play决定是否开启音效
galmenu: true
mp3play: false
gaymenu_item:
- name: 首页
  url : /
- name: 标签
  url : /tags
- name: 分类
  url : /categories
- name: 归档
  url : /archives
- name: xxx
  url : xxxxxxxxx
- name: xxxx
  url : xxxxxxx

# 社交链接
social:
- url: http://github.com/ShanaMaid
  name: Github

# 友情链接
# name : url
link_title: 友情链接
links:
  ShanaMaid: http://blog.shanamaid.top/


# Sidebar Avatar
# in theme directory(source/images): /images/avatar.jpg
# in site  directory(source/uploads): /uploads/avatar.jpg
# 头像
avatar: https://avatars0.githubusercontent.com/u/20333903?v=3&s=460


# 网站统计
# 站长统计 填写id
# eg: 
# CNZZ: 123456789
CNZZ: 

# 评论
# 评论
# 友言uid
uyan: 

# leadcloud访问次数统计
# 
leancloud_visitors:
  enable: false
  app_id: 
  app_key: 

启用数学公式

卸载hexo-renderer-marked,替换为hexo-renderer-markdown-it-plus

npm un hexo-renderer-marked --save
npm i hexo-renderer-markdown-it-plus --save

在需要启用数学公式的博客的head添加math: true

编辑站点的配置文件

# hexo/_config.yml
markdown_it_plus:
  highlight: true
  html: true
  xhtmlOut: true
  breaks: true
  langPrefix:
  linkify: true
  typographer:
  quotes: “”‘’
  pre_class: highlight

自定义代码高亮

hexo-theme-shana\source\css_partial\highlight.styl

自定义背景图片

hexo-theme-shana\source\plugin\bganimation\bg.css

替换里面的图片url就可以了

关于三方评论

由于网易云倒闭,三方评论替换为友言。

友言评论不支持https协议,所以挂了小绿锁的博客即使填写了配置中的uyan也无效。

不考虑搜狐畅言的原因是因为使用需要填写备案号,github pages是没有备案号的。

如果需要自定义的三方评论的请自行修改hexo-theme-shana\layout\_partial\article.ejs中的最后一部分

<% if (!index && post.comments && theme.uyan){ %>
  <div id="comments" class="comments">
    <div id="uyan_frame"></div>
  </div>
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid=<%- theme.uyan %>"></script>
<% } %>

博主博客挂了小绿锁因此很长一段时间不会支持评论了,任何有关主题的问题直接在该项目下发issue吧!

支持与改进

你可以通过发起issue来反映主题的BUG或者提出改进建议以及你的疑问

hexo-theme-shana's People

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

hexo-theme-shana's Issues

shana 主题使用过程中的一些问题

  1. 主页 显示的是一篇篇完整的文章,不像你的主页那有还有 readMore
    <img width="804" alt="71506341-b69b-415f-a112-7dfcbd4a7581"

  2. Markdown 语法貌似有点问题,代码块背景色咋调成纯黑色哇

ca6ffaf8-209a-45c4-a098-5ab6c4910b84

希望解答一哈谢谢😆

路径不对

文章,分类,标签这些路径都不对,点击显示无法访问此网页

小姐姐有个手机兼容问题

1.手机上查看时会有左右可以拉的现象,点击文章才能恢复正常,
2.第一次点击更多文章时会出现直接跳到顶部的现象
小姐姐可以解决下吗

还有个问题,谢大神了

我clone下来您的主题后,Read More不存在呀,想问下,您是怎么设置Read More的,我是小白,刚开始搞GitHub博客

求分享shana主题的配置文件

你提供的主题相当好看,但是作为新手的我没法完整修改里边的配置文件,希望博主能够分享一下完全的文件!!!如果可以,那非常感谢,也不知道怎么联系,我留个邮箱吧,如果博主愿意给就发到[email protected](或者就是我看不懂里边的配置信息)

背景

楼主,你的背景图片,动画怎么做的呀????

两个疑问求助大神

1.如何修改文章显示区域的宽度(太窄的话代码一行放不下需要左右移动滑块阅读体验不是很高)
2.如何在首页置顶某一篇文章?
感谢

文章

请问我的文章是显示全部的,主页列表只显示摘要是哪个属性控制的

大神,有问题

配置文件中read more 设置为true没用,直接是详情页,求指教

# Content
excerpt_link: Read More
fancybox: true

关于维护

请问题主还会维护么?比如网易云跟帖月底停止服务了,有考虑加相册功能么?

QAQ

为什么不支持LaTex啊QAQ

请问CNZZ如何开启统计?

已经在主题配置文件中的CNZZ处填写了对应的id,并且按照网上的教程在\themes\shana\layout\_partial中加入了统计代码,然后部署。不过仍然无法统计。

请问如何支持latex呢?

网上的几种方法都试过了, 比如pandoc, 比如hexo-math.
用hexo-math时虽然终端显示use katex....... 但是最后hexo s后发现并没有渲染.

新手的一些问题

使用了您的主题搭了一个blog,但是我的blog上为什么不能折叠文本,也就是read more消失了。
另外请教一下如何修改代码区的颜色,希望能把红色改成透明色风格,就这样==。

请问下如何设置文章不自动展开?

在配置中设置了

# Content
excerpt_link: Read More
fancybox: true

无效,文章会自动展示所有内容。

请问下如何配置,才能实现您展示网站的 “Read More” 样式?

谢谢,期待您的回复!!!

大神,这个主题超帅,有个问题啊,我这是怎么回事

执行hexo generate时出现了下面的问题
ERROR E:\MyBlog\themes\ShanaMaid\layout\page.ejs:1

1| <%- partial('_partial/article', {post: page, index: false}) %>

E:\MyBlog\themes\ShanaMaid\layout_partial\article.ejs:36
34| <%= __('comment') %>
35| <% } %>

36| <%- partial('post/tag') %>
37|
38|
39| <% if (!index){ %>

E:\MyBlog\themes\ShanaMaid\layout_partial\post\tag.ejs:2
1| <% if (post.tags && post.tags.length){ %>

2| <%- list_tags(post.tags, {
3| show_count: false,
4| class: 'article-tag'
5| }) %>

tags.sort is not a function
TypeError: E:\MyBlog\themes\ShanaMaid\layout\page.ejs:1

1| <%- partial('_partial/article', {post: page, index: false}) %>

E:\MyBlog\themes\ShanaMaid\layout_partial\article.ejs:36
34| <%= __('comment') %>
35| <% } %>

36| <%- partial('post/tag') %>
37|
38|
39| <% if (!index){ %>

E:\MyBlog\themes\ShanaMaid\layout_partial\post\tag.ejs:2
1| <% if (post.tags && post.tags.length){ %>

2| <%- list_tags(post.tags, {
3| show_count: false,
4| class: 'article-tag'
5| }) %>

tags.sort is not a function
at Object.listTagsHelper (E:\MyBlog\node_modules\hexo\lib\plugins\helper\list_tags.js:24:15)
at eval (eval at compile (E:\MyBlog\node_modules\ejs\lib\ejs.js:618:12), :12:17)
at returnedFn (E:\MyBlog\node_modules\ejs\lib\ejs.js:653:17)
at Theme._View.View._compiledSync.locals [as _compiledSync] (E:\MyBlog\node_modules\hexo\lib\theme\view.js:121:22)
at Theme._View.View.View.renderSync (E:\MyBlog\node_modules\hexo\lib\theme\view.js:49:23)
at Object.partial (E:\MyBlog\node_modules\hexo\lib\plugins\helper\partial.js:38:15)
at eval (eval at compile (E:\MyBlog\node_modules\ejs\lib\ejs.js:618:12), :88:17)
at returnedFn (E:\MyBlog\node_modules\ejs\lib\ejs.js:653:17)
at Theme._View.View._compiledSync.locals [as _compiledSync] (E:\MyBlog\node_modules\hexo\lib\theme\view.js:121:22)
at Theme._View.View.View.renderSync (E:\MyBlog\node_modules\hexo\lib\theme\view.js:49:23)
at Object.partial (E:\MyBlog\node_modules\hexo\lib\plugins\helper\partial.js:38:15)
at eval (eval at compile (E:\MyBlog\node_modules\ejs\lib\ejs.js:618:12), :9:17)
at returnedFn (E:\MyBlog\node_modules\ejs\lib\ejs.js:653:17)
at Theme._View.View._compiled.locals [as _compiled] (E:\MyBlog\node_modules\hexo\lib\theme\view.js:125:48)
at Theme._View.View.View.render (E:\MyBlog\node_modules\hexo\lib\theme\view.js:30:15)
at route.set (E:\MyBlog\node_modules\hexo\lib\hexo\index.js:394:29)
at tryCatcher (E:\MyBlog\node_modules\bluebird\js\release\util.js:16:23)
at E:\MyBlog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (E:\MyBlog\node_modules\hexo\lib\hexo\router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:452:10)
at resume
(_stream_readable.js:899:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

关于更换背景出锅

我更改了bg.css的链接以期望更改背景
然而背景变成了“苟利……”等与长者有关的文字。
请问应该怎么解决?

鼠标

替换鼠标样式的在哪啊

关于插入数学公式

请问如果我安装了mathjax插件来配置页面latex公式,但是您的配置文件中并没有mathjax这个子段,那我还能使用这个插件吗。

markdown

怎么实现"read more"这种机制的,或者说md该曾么写

添加多个categories时会出现多余的空格

当我给博文添加两个或以上categories时,比如

categories:
- 算法 
- 课堂笔记

最后显示的适合第二个前面多一个空格字符,并且不会和已有categories的合并
image
每多一个categories时,新增加的就会categories的前面就会再多一个空格字符

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.