Git Product home page Git Product logo

hexo-theme-cafe's Introduction

hexo-theme-cafe

Cafe 主题旨在追求简约、操作简单、阅读舒适度。 英文版介绍 Read in English

灵感来自 Landscape,参考@ruanyf博客调整了整体的样式,一些布局细调,以及新增一些 widge t等,后期会在使用的过程中不断进行调整。

体验参考本人博客 Giscafer's blog

响应式兼容手机端

欢迎到issues提建议

效果截图

PC演示

Mobile演示

使用

安装

$ git clone https://github.com/giscafer/hexo-theme-cafe.git themes/cafe

或者直接到releases下载最新源码文件,重命名为cafe放到博客themes目录下

Cafe 需要 Hexo 2.4 及以上版本支持.

使用主题

修改博客配置文件 `_config.yml` 主题属性 theme 为 `cafe`.

更新升级

cd themes/cafe
git pull

主题配置

主题 themes/cafe/_config.yml 文件内容参考说明配置

配置教程具体见_config.yml文件注释说明

Features

社区化

支持国内外主流社区分享:

share

支持评论插件有:

  • Disqus
  • 网易云跟帖
  • 畅言
  • 友言
  • gitment

Fancybox

Cafe 使用Fancybox 展示相册、图片。 您可以使用减记语法或fancybox标签插件添加你的照片。

![img caption](img url)

{% fancybox img_url [img_thumbnail] [img_caption] %}

Sidebar

你可以设置sidebar 配置侧边栏,有 leftright 二种选择

Cafe 主题提供以下内置 widgets:

  • social # 社交账号链接
  • category # 归类
  • tag # 标签
  • tagcloud # 云标签
  • archives # 归档
  • recent_posts # 最新文章
  • friendly_link # 友情链接

你可以在主题配置文件 widget 设置选项设置需要的 widgets。

打赏

License

MIT


giscafer.com  ·  GitHub @giscafer  ·  Weibo @Nickbing Lao

hexo-theme-cafe's People

Contributors

forvoid avatar giscafer 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

hexo-theme-cafe's Issues

使用教程说明太简单了

感谢作者,很喜欢这个theme,但仍有以下疑问,希望能有更详细的教程。
如何组织文件夹、markdown文件以适应标签分类?
markdown的引用,生成html后字体很大,比一级标题都大,如何解决?
首页widget的名称,除了social widget有social_title设置项,可以设置名称外,其他都是英文,但是作者你的博客 http://blog.giscafer.com 中是中文,设置项在哪里?

关于“分享按钮”

为什么点击分享,显示的链接前缀是http://yoursite.com/,而不是我的网址

请问如何设置?

文章首页不显示字段

请问是否有控制文章在首页是否显示的字段,如果需要添加对应的字段,添加对应的判断逻辑应该在哪个文件中进行修改,谢谢。

undefined is not a function

您好,这个主题比较简洁,很喜欢。我使用的时候遇到了如下的问题(环境是 hexo: 3.2.2 hexo-cli: 1.0.2
os: Darwin 14.5.0 darwin x64)下载的0.5.4的版本,没有修改配置文件

Unhandled rejection TypeError: /Users/Hessen/Documents/blogongit/hexoblog/themes/cafe/layout/layout.ejs:8
    6|       <div class="outer">
    7|         <section id="main"><%- body %></section>
 >> 8|           <%- partial('_partial/widget') %>
    9|       </div>
    10|       <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
    11|     </div>

/Users/Hessen/Documents/blogongit/hexoblog/themes/cafe/layout/_partial/widget.ejs:2
    1|  <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>
 >> 2|     <%- partial('./sidebar', 
    3|     {index:page.path=='index.html',
    4|     archive:url.includes('/archives/'),
    5|     postObj:page,

undefined is not a function
    at eval (eval at <anonymous> (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:32:17)
    at eval (eval at <anonymous> (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:36:55)
    at /Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:255:15
    at _compiledSync (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/lib/theme/view.js:122:20)
    at View.renderSync (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/lib/theme/view.js:50:21)
    at Object.partial (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/lib/plugins/helper/partial.js:42:17)
    at Object.wrapper (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/lodash/lodash.js:4968:19)
    at eval (eval at <anonymous> (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:350)
    at eval (eval at <anonymous> (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:779)
    at /Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:255:15
    at _compiled (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/lib/theme/view.js:127:30)
    at View.render (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/lib/theme/view.js:29:15)
    at /Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/lib/theme/view.js:40:23
    at tryCatcher (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/Hessen/Documents/blogongit/hexoblog/node_modules/hexo/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)

请问如何定制首页呢?

像阮一峰大大的那样,把文章列表列出来,而不是直接展示一个完整的文章。
求作者和路过懂的大佬指点一下。

首页文章预览

现在是默认全部显示啊. 望添加可以预览的的配置选项.
在使用另一个主题: NexT时, 有如下配置.

首页预览

auto_excerpt:
enable: true
length: 150

大大...死活不能代码块语法高亮啊

站点的config.yml当然已经是设置了highlight的三个true true true了
就是比如图上这样 我用了```和 ```bash 和```shell 这三种
都有代码块 但是都是图上这样 不会变色 一点变色都没有
甚至我去试了写java/js/css和对应代码 都还是不变色
qq

文章目录自动添加序号与图片自动添加底部标题

@giscafer ,你好:

有两个问题。

  1. 文章目录总是会自动添加序号,不知道能否关闭这一功能?
    因为有自动编号,自己在文章中加编号就不方便了;如果文章中没有标题序号,阅读起来也不是很方便。
    menu

  2. 文章中插入图片,图片下总是显示图片名称,不知道能否关闭?
    有些图片有图片名可能会利于阅读,但是有些则不需要。
    pics_problem

不支持TOC和自动截断显示吗

请问这个主题是不是不能显示markdown的toc
以及能否添加一个自动截断显示功能,首页展示不要将文章全文显示出来,md手动加more不太适应:D
另外标签云上的字体也好小呀

Cafe主题造成hexo s命令不起作用问题

由于为了实现动态生成随机文章,新增了文件。
themes\cafe\scripts\extend.generator.js,里边方法:

extend.generator.register('random_post',function (locals, render, callback) {

//……

}

造成hexo s命令失效,目前原因未知。可能是和hexo版本有问题,hexo ghexo d命令并不受影响。

如果不想生成随机推荐文章,就注释上边方法或者删除该文件即可。那样hexo s命令即可恢复正常

找到解决方案后会关闭此ISSUE

about ratings function

老板!现在评论模块人家不提供服务了,能不能换一家评论模块,修复下啊,很喜欢你的主题

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.