Code Monkey home page Code Monkey logo

hexo-theme-stellaris's Introduction

📑 Stellaris - 强大、优雅、现代的 Hexo 主题

hexo-theme-stellaris 分叉自 hexo-theme-stellar,基于hexo-renderer-jsx,支持丰富的标签和动态数据组件。

本主题目前已不再活跃维护,并不再同步 Stellar 的新功能特性。如对追新有需求,请使用上游 Stellar 主题,或在 issue 中提交需要使用的新功能。

安装

  • 环境需求
    Hexo: 5.4.0 ~ 6.3.0
    hexo-cli: 4.3.0 ~ latest
    node.js: 14.17.3 ~ 18.12.0
    npm: 6.14.13 ~ 8.19.2
    

使用 Git 安装

  • 安装依赖

    npm install react react-dom hexo-renderer-jsx html-react-parser --save
    npm install node-fetch@2 --save
    // bilicard 插件所需
  • 将主题安装为子模块

    git submodule add https://github.com/chiyuki0325/hexo-theme-stellaris.git themes/stellaris

使用 npm 安装

npm install hexo-theme-stellaris --save

安装好后,在 config.yml 中添加 theme: stellaris

更新

使用 Git

git submodule update --remote --merge

使用 npm

npm update hexo-theme-stellaris

文档

点此查看 Stellaris 主题文档。

也可以适当参考 原主题文档,或对照配置文件的注释。

相关文章推荐

要启用此功能,请先安装 hexo-related-popular-posts,之后在配置文件中启用 article.related_posts

article:
  related_posts:
    enable: true
    max_count: 5

配置的变更

  • 预加载插件改为 InstantClick。

    plugins:
      instant_click:
        js: https://cdn.bootcdn.net/ajax/libs/instantclick/3.1.0/instantclick.min.js
  • 颜色配置部分进行了一些修改,详见配置文件。

  • 支持自定义字体,详见配置文件。

  • 增加了文章过期提示功能。

    article:
      outdate_month: 2

    发布于 3 个月前,更新于 3 个月前,文章内容可能已经过时

  • MathJax 增加了 per_page 选项,开启后无需在每个页面的 front-matter 处添加 mathjax: true 即可开启 MathJax。

    plugins:
      # MathJax
      # 需在 Markdown 文件开头加入 mathjax: true
      # 推荐使用 Pandoc: npm uninstall hexo-renderer-marked --save & npm install hexo-renderer-pandoc --save
      mathjax:
        enable: false
        per_page: false # 启用后无需在文章开头加 mathjax: true 即可启用
        cdn: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js # 请使用 3.x 以上版本的 mathjax
  • 本主题没有移植原主题的一些功能(因为我没有用到,比如时间线,友链朋友圈和赫蹏),如有需要请在 issue 中提出,我会进行移植。

标签插件

  • 原主题更名数次的 ablock 容器标签被改回了 border。

    {% border [color:color] [child:codeblock/tabs] title %}
    body
    {% endborder %}
  • 新增了行内图片标签 icon。

    {% icon source [height:1.75em] %}
  • 新增了 Bilibili 视频卡片插件 bilicard。

    {% bilicard BVID %}

Telegram Instant View

本主题编写了模板以适配 Telegram Instant View。

你可以在此获取模板,并且查阅官方文档以了解如何在你的博客中使用。

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.