GithubHelp home page GithubHelp logo

renbaoshuo / hexo-theme-pure Goto Github PK

View Code? Open in Web Editor NEW
114.0 2.0 12.0 1.71 MB

🎨 A pure, modern and simple theme for Hexo.

License: GNU Affero General Public License v3.0

EJS 42.55% JavaScript 5.26% Less 52.19%
hexo hexo-theme blog theme blog-theme hexo-theme-pure gridea gridea-theme themes theme-pure

hexo-theme-pure's Introduction

Pure

A modern and simple theme for Hexo.

Author Version Hexo Repo Size

image

English | 简体中文

This theme is transplanted from imhanjie/gridea-theme-pure and has been approved by the original author.

Demo

Installation

Install via GitHub

You need to switch to the directory where the site is located before performing the following operations.

npm install hexo-renderer-ejs hexo-renderer-less --save
git clone https://github.com/renbaoshuo/hexo-theme-pure.git themes/pure

Install via NPM

npm install hexo-theme-pure --save
# or use yarn: yard add hexo-theme-pure

Settings

  • favicon: Site logo displayed in browser tabs and bookmarks. (String, default: /favicon.ico)
  • avatar: Site logo displayed on the header. (String, default: /favicon.png)
  • katex: Whether to load KaTeX CSS. (Boolean, default: false)
  • force_https: Mandatory HTTPS. (Boolean, default: false)
  • check_update: Check update before exit. (Boolean, default: false)
  • menus (Array)
    • name: The name displayed on the navigation bar. (String)
    • link: The link of the page to jump to. (String)
    • target: The target of the link. (String, _self or _blank, default: _self)
  • post: Post settings
    • feature: display post image in post list (needs to set feature in post, Boolean, default: true)
  • disqus: DisqusJS Settings
    • enable: Whether to enable DisqusJS. (Boolean, default: false)
    • shortname: The shortname of the Disqus site.
    • api: Your disqus api.
    • apikey: Your disqus api key.
    • admin: Your disqus username.
  • gitalk: Gitalk Settings
    • enable: Whether to enable Gitalk. (Boolean, default: false)
    • clientId: Your GitHub oauth app client id
    • clientSecret: Your GitHub oauth app client secret
    • repository: Your GitHub comment repository
    • owner: Your GitHub username
  • web_analytics: Web Analytics Settings
    • enable: Whether to enable Web Analytics. (Boolean, default: false)
    • google: Google Analytics tracker id.
    • baidu: Baidu Analytics id.
  • footer: The content displayed in the footer.
  • friends: Friends (Array)
    • name: The name displayed on the friends list.
    • link: The link of the page to jump to.
    • logo: The logo displayed on the friends list.

Attention

Code highlight Settings

The theme has built-in highlight style of highlightjs. Please do not enable line_number and wrap because this theme does not support them.

Here is a configuration example:

highlight:
  enable: true
  auto_detect: true
  line_number: false  # This value must be `false`
  wrap: false         # This value must be `false`
  tab_replace: '    ' # 4 spaces
  hljs: true          # This value must be `true`
prismjs:
  enable: false

KaTeX Settings

It is recommended to use hexo-renderer-markdown-it to render Markdown and install @neilsustc/markdown-it-katex to render mathematical formulas.

npm uninstall hexo-renderer-marked --save
npm install hexo-renderer-markdown-it @neilsustc/markdown-it-katex --save

Here is a configuration example:

# Markdown-it config
## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki
markdown:
  render:
    html: true
    xhtmlOut: false
    breaks: true
    linkify: true
    typographer: true
  plugins:
    - '@neilsustc/markdown-it-katex'
  anchors:
    level: 2
    collisionSuffix: 't'
    permalink: false
    permalinkClass: header-anchor
    permalinkSymbol: ''

DisqusJS Settings

You must Register a Disqus Application before using DisqusJS.

Author

hexo-theme-pure © Baoshuo, Released under the GPL-3.0 License.
Authored and maintained by Baoshuo with help from contributors.

Personal Website · Blog · GitHub @renbaoshuo · Twitter @renbaoshuo

hexo-theme-pure's People

Contributors

codynotfound avatar renbaoshuo 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

hexo-theme-pure's Issues

能否出个详细教程?

这个代码我copy下来生成的和定制版不太一样,很多地方不知如何设置,比如设置头像,老哥能否更新下定制版的代码,或者出个详细设置的教程

代码高亮无效果

文件_config.yml中配置
highlight:
enable: true
auto_detect: true
line_number: false # This value must be false
wrap: false # This value must be false
tab_replace: " " # 4 spaces
hljs: true # This value must be true
prismjs:
enable: false

文章中

function fn (){
  console.log(11111)
}

页面中代码没有高亮显示。

该主题目前无法使用

  • 语法错误,layout/post.ejs<% if(page.tags) %> 应为 <% if(page.tags) {%>
  • hexo变量问题,layout/index.ejs<% page.posts.forEach(function(post) { %>page.posts不存在,应为site.posts
  • 样式指向问题,layout/_includes/head.ejshttps://cdn.jsdelivr.net/npm/[email protected]/dist/main.css报错404
  • 即使解决以上报错,渲染依旧存在问题

代码块显示异常

我的原始代码如下,md支持tab和```两种代码块显示,但是博客中只有tab才能正常显示,```则显示异常,无法高亮显示代码,感觉很不方便,可否调整一下
image

image

能否添加目录功能

在您的个人博客上似乎添加了该功能,然而此处配布主题似乎未找到实现方法。
感谢。

[issue] 代码条是否可以默认设置为左对齐,而不是居中对齐?

请问是否可以将单独代码端默认设置为左对齐,而不是像下图一样居中对齐?
image
而且特别是因为左侧有序号,看起来非常不整齐美观。

P.S. 一个小小的建议:归档 / Archive 里的日期颜色可考虑深灰,或更浅一点的灰色,并取消加粗;可适当考虑加粗右侧文章标题。

P.P.S. 大佬把 Pure 从 Gridea 移植到 Hexo 太厉害了 (受我一拜🙏)。我自己在试图移植一款 Jekyill 的主题,但由于对 HTML 和CSS 只有初步认识,目前还在苦苦挣扎。🤦‍♀️😂

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.