Coder Social home page Coder Social logo

redhat123456 / hexo-theme-arknights Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yue-plus/hexo-theme-arknights

0.0 0.0 0.0 1.32 MB

一款明日方舟罗德岛阵营的 Hexo 主题

Home Page: http://ark.theme.yueplus.ink/

License: MIT License

HTML 17.16% CSS 64.95% TypeScript 8.14% JavaScript 9.75%

hexo-theme-arknights's Introduction

hexo-theme-arknights

预览

如果使用了这个主题,欢迎在这儿贴预览链接~

主题预览图片

安装

手动安装

根据需要执行以下代码

hexo init Hexo
cd Hexo
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
git clone https://github.com/Yue-plus/hexo-theme-arknights.git themes/arknights

安装依赖

npm 用户:

cnpm install hexo-server hexo-browsersync hexo-renderer-pug hexo-renderer-sass hexo-renderer-ts --save

yarn 用户:

yarn add hexo-server hexo-browsersync hexo-renderer-pug hexo-renderer-sass hexo-renderer-ts

hexo-renderer-sass 很可能会安装失败,请多试几次。

修改配置文件

  • 参照 Hexo 官网 修改 Hexo/ 目录下的 _config.yml
    • theme: 的值改为 arknights
    • 开启代码高亮:
      highlight:
        hljs: true
  • 查看 Hexo/themes/arknights/目录下的 _config.yml。 主题的配置文件可参照中文注释修改。

修改资源文件

可按需修改 Hexo/themes/arknights/source/ 目录下的

  • favicon.ico:浏览器标签页上的图标
  • CNAME: GitHub Pages 部署时的自定义域名
  • README.md: 部署仓库的 README
  • img/目录下的 Alipay.pngWeChat.png 可替换为自己的二维码; 1:1 比例的 png 图片;

写作

  • 可参考 Hexo | 写作
  • 在主题仓库的 Hexo 分支有一些示例文本可以取用
  • 添加文章标签与分类,更多特性可参考 Hexo | Front-matter ,示例:
    ---
    title: 'Hello World !'
    date: 2020-04-15 21:54:02
    tags: code
    category: Example
    ---
  • <!-- more --> 之前的内容称之为摘要,会显示在首页上,并且可以设置是否也在正文显示。

顶部导航栏新建自定义页面

  • 例如:新建一个 about 页面 在 Hexo 目录下执行
    hexo new page 'about'
    然后 Hexo\source\ 目录下会多一个 about 文件夹
  • 编辑 Hexo\source\about\index.md 文件
  • 编辑主题目录下的 _config.yml,添加一个链接:
    menu:
      About: /about

评论系统

本主题支持Valine 。 请修改主题目录下 _config.yml 文件中 valine:app_id:app_key:

参考 Valine 快速开始

开启邮件提醒:zhaojun1998 / Valine-Admin

参与开发

欢迎提交 IssuesPR

分支说明

分支 说明
master 主题开发目录
gh-pages gh-page 托管
hexo Hexo 目录,这里有可以用于测试主题的 .md 文件

搭建开发环境

先装好 nodejsyarn ,然后执行以下命令:

yarn global add hexo-cli yo generator-hexo-theme
git clone -b hexo https://github.com/Yue-plus/hexo-theme-arknights.git
cd hexo-theme-arknights
git clone https://github.com/Yue-plus/hexo-theme-arknights.git themes/arknights
yarn install
hexo serve --debug

开发中可能遇见的 BUG 及解决方法

修改 .pug 模板文件无法自动刷新页面。

解决方法:将 Hexo 目录下的 ./node_modules/hexo-renderer-pug/lib/pug.js 中的 pugRenderer.compile = pugCompile; 注释掉。

运行 ‘hexo serve --debug’ 时,长文章渲染不全

这是由热重载插件 hexo-browsersync 导致的,不会影响发布 解决方法:禁用该插件。(反正不影响发布,不管也行)

参与开发可能需要的文档

支援主题开发

喜欢这个主题的话可以:

  • 给颗小星星吧 (/▽\)
  • 开发者的B服ID:YuePlus#6221
  • 加入 QQ 群:618221514

    群内开发为主,吹水晒卡,分享线索7也都欢迎哦~ d=====( ̄▽ ̄*)b

  • 打赏、赞助:

收款二维码

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.