{"id":13431624,"url":"https://github.com/leafjame/hexo-theme-next5-leaf","last_synced_at":"2025-03-16T12:30:48.044Z","repository":{"id":189282976,"uuid":"204120781","full_name":"leafjame/hexo-theme-next5-leaf","owner":"leafjame","description":"一款基于 Hexo v3.9 \u0026 Next v5.1.4 魔改的主题 🌞","archived":false,"fork":false,"pushed_at":"2020-04-26T12:27:49.000Z","size":7188,"stargazers_count":85,"open_issues_count":0,"forks_count":33,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-20T09:20:47.271Z","etag":null,"topics":["blog","hexo","next5","nodejs","valine"],"latest_commit_sha":null,"homepage":"https://www.liaofuzhan.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leafjame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-08-24T06:53:13.000Z","updated_at":"2024-03-01T12:39:51.000Z","dependencies_parsed_at":"2023-08-19T06:49:39.442Z","dependency_job_id":null,"html_url":"https://github.com/leafjame/hexo-theme-next5-leaf","commit_stats":null,"previous_names":["leafjame/hexo-theme-next5-leaf"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafjame%2Fhexo-theme-next5-leaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafjame%2Fhexo-theme-next5-leaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafjame%2Fhexo-theme-next5-leaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafjame%2Fhexo-theme-next5-leaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafjame","download_url":"https://codeload.github.com/leafjame/hexo-theme-next5-leaf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869178,"owners_count":20360967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","hexo","next5","nodejs","valine"],"created_at":"2024-07-31T02:01:04.597Z","updated_at":"2025-03-16T12:30:48.018Z","avatar_url":"https://github.com/leafjame.png","language":"JavaScript","funding_links":[],"categories":["Content"],"sub_categories":[],"readme":"# 基于 Hexo NexT 5 的一款主题\n![](https://img.shields.io/badge/hexo-v3.9.0-orange)\n![](https://img.shields.io/badge/hexo--next-v5.1.4-orange)\n![](https://img.shields.io/badge/hexo--abbrink-v2.0.5-brightgreen)\n![](https://img.shields.io/badge/hexo--neat-v1.0.4-brightgreen)\n![](https://img.shields.io/badge/hexo--wordcount-v6.0.1-blue)\n![](https://img.shields.io/badge/hexo--symbols--count--time-v0.6.0-blue)\n![](https://img.shields.io/badge/hexo--generator--sitemap-v1.2.0-green)\n![](https://img.shields.io/badge/hexo--baidu--url--submit-v0.0.6-green)\n![](https://img.shields.io/badge/hexo--related--popular--post-v3.0.6-yellowgreen)\n![](https://img.shields.io/badge/hexo--douban-v1.1.3-yellowgreen)\n![](https://img.shields.io/badge/hexo--service--worker-v1.0.1-%23e75ea3)\n![](https://img.shields.io/badge/hexo--pwa-v0.1.3-%23e75ea3)\n\n**效果预览**\n - 网站截图：[传送门 1](https://github.com/leafjame/hexo-theme-next5-leaf/blob/master/README.pic.md)\n - 站点地址：[传送门 2](https://www.liaofuzhan.com/)\n\n## 前言\n\n\u0026emsp;\u0026emsp;网上有很多关于 github pages 博客搭建的文章，使用的比较多的是 jekyll、hexo。 github 官方推荐的是前者，经过比较，本人选择了 hexo，因为有许多人推崇的一款主题：next。\n\nclone 后一顿魔改，效果自己看着还算可以，在这 share 出来，欢迎 star、fork ！如有疑问，请提 issue 或在博客给我反馈。\n\n## 功能\n\n  \u003e 以下功能网上一搜一大把，不过还是为大家整理了下本博客的情况，who care（皮一下~）！\n\n**已完成（v1.0）：**\n\u003cbr/\u003e\n\n- [x] 主页布局、颜色搭配\n- [x] 全局字体设置（思源宋体）\n- [x] 动态背景图片\n- [x] 随机三角丝带\n- [x] 鼠标点击特效 (4种)\n- [x] 文章虚拟背景\n- [x] 文章置顶、精品\n- [x] 文章排行榜（热榜）\n- [x] 文章浏览、字数、时长\n- [x] APlayer 音乐播放器\n- [x] DPlayer 视频播放器\n- [x] 看板娘\n- [x] SEO 相关\n- [x] CDN 相关\n- [x] 个性化返回顶部\n- [x] fork me from github\n- [x] 博主头像旋转\n- [x] 友链及相关链接页面\n- [x] 近期文章推荐\n- [x] 网站运行时间\n- [x] 网站访问人数、访问量\n- [x] 阅读全文样式\n- [x] DaoVoice 在线聊天\n- [x] TiDio 在线聊天\n- [x] 来必力评论系统\n- [x] Valine 评论系统\n- [x] abbrlink 文章永久链接\n- [x] neat 压缩\n- [x] 文章版权信息\n- [x] 代码块样式\n- [x] 代码块复制\n- [x] 阅读结束提醒\n- [x] 打赏\n- [x] 百度分享\n- [x] 评论区打字特效\n- [x] 页面反馈\n- [x] ...\n\u003cbr/\u003e\n\n**2019-09-25 新增以下功能（v2.0）：** \n\u003cbr/\u003e\n- [x] 手机端样式适配\n- [x] 代码块 Mac panel 特效\n- [x] LeanCloud 切换国际版\n- [x] 接入 Google AdSense 广告\n- [x] 新增 ShareJs 分享\n- [x] 类知乎卡片链接样式\n- [x] Valine-Admin 评论系统\n- [x] Valine-Admin 邮件通知\n- [x] 相关文章推荐\n- [x] 标签样式调整\n- [x] 标签页自定义样式（4种）\n- [x] 分类页自定义样式（2种）\n- [x] 归档页自定义样式\n- [x] 鼠标样式\n- [x] 主页走马灯（轮播图）\n- [x] 瀑布流相册\n- [x] canvas 粒子时钟\n- [x] 豆瓣读书、电影\n- [x] 页面其它特效\n- [x] ...\n\u003c/br\u003e\n\n**2019-12-31 已完成的（v2.1）：** \n\u003cbr/\u003e\n- [x] Service Worker：离线访问功能\n- [x] PWA（Progressive Web App）：将网站安装到桌面(PC、手机)\n- [x] 网站运行时间 DIY\n- [x] 访问量 DIY\n- [x] 文章首字下沉效果\n- [x] 炫酷的音乐播放器\n- [x] 炫彩 logo\n- [x] 旋转魔方（2种）\n- [x] 浏览器 Console 个性化输出\n- [x] 邮件订阅功能\n- [x] 更新 Valine 评论表情、样式\n- [x] 更网站左下角扫码订阅\n- [x] 轮播图大屏显示优化\n- [x] 网站公告\n- [x] 其它优化\n- [x] ...\n\u003c/br\u003e\n\n**进行中 2020-04-01（v2.2）：** \n\u003cbr/\u003e\n- [ ] 表白界面\n- [ ] 网页镜子\n- [ ] 网页相关（禁用审查元素、右键等功能）\n- [ ] 鼠标右键菜单 DIY\n- [ ] 网页左下角新增联系信息按钮\n- [ ] 新增关注公众号解锁文章的功能\n- [ ] MacPanel 代码块折叠功能\n- [ ] Ribbon 动态背景条纹\n- [ ] 新增明月浩空音乐播放器\n- [ ] 其它优化 \n- [ ] ...\n\u003c/br\u003e\n\ning ----\u003e\u003e\u003e\u003e\n\u003cbr/\u003e\n- [ ] PJAX 功能集成 \n- [ ] Fancybox2 升级最新版 \n- [ ] header 固定、毛玻璃效果\n- [ ] JS CDN 加速 \n- [ ] ...\n\n\u003c/br\u003e\n\n## 安装\n\n1. Download ZIP 解压后，放到 hexo 目录 themes 主题下即可。或者使用 git 命令，进入到本地 hexo 目录：\n\n    ```shell\n    git clone https://github.com/leafjame/hexo-theme-next5-leaf.git themes/leaf\n    ```\n\n2. 将其放到 themes 目录下，名字自定义。然后在站点的配置文件 _config.yml 中指定所使用的 theme：\n\n    ```shell\n    theme: leaf\n    ```\n   PS：如需 clone 指定 tag 版本，可以使用 `git clone --branch \u003ctag_name\u003e \u003crepo_url\u003e \u003clocal_path\u003e` 命令，如：\n\n   ```shell\n   git clone --branch v1.0 https://github.com/leafjame/hexo-theme-next5-leaf.git themes/leaf\n   ```\n\n### 依赖插件\n\n- 插件列表\n\n  本主题中在搭建过程中，集成了一定的插件，所列部分如下：\n\n  ```js\n  \"hexo-abbrlink\": \"^2.0.5\",   //生成文章唯一URL插件\n  \"hexo-baidu-url-submit\": \"0.0.6\",  //url提交插件，用于seo\n  \"hexo-deployer-git\": \"^1.0.0\",  //git插件，用于部署\n  \"hexo-douban\": \"^1.1.3\", //豆瓣读书、电影插件\n  \"hexo-generator-baidu-sitemap\": \"^0.1.6\",  //百度sitemap，用于seo\n  \"hexo-generator-sitemap\": \"^1.2.0\",  // 同上\n  \"hexo-generator-feed\": \"^1.2.2\",  // SSR插件\n  \"hexo-generator-index-pin-top\": \"^0.2.2\",  //用于指定文章置顶\n  \"hexo-generator-search\": \"^2.4.0\",  //本地搜索插件\n  \"hexo-neat\": \"^1.0.4\",  // 压缩js、css代码的插件\n  \"hexo-permalink-pinyin\": \"^1.1.0\",  // 中文链接转拼音的插件\n  \"hexo-related-popular-posts\": \"^3.0.6\",  // 相关文章推荐\n  \"hexo-renderer-ejs\": \"^0.3.1\",  // 是不是自带的？。。。\n  \"hexo-renderer-marked\": \"^1.0.1\",  // 是不是自带的？。。。\n  \"hexo-renderer-stylus\": \"^0.3.3\",  // 是不是自带的？。。。\n  \"hexo-symbols-count-time\": \"^0.6.0\",  // 站点字数统计\n  \"hexo-tag-cloud\": \"^2.1.1\",  //标签云\n  \"hexo-tag-dplayer\": \"^0.3.3\",  //dplayer视频插件\n  \"hexo-wordcount\": \"^6.0.1\",  // 字数统计插件\n  \"webpack-cli\": \"^3.3.7\",  // 装hexo-abbrlink时提示装的，按需下载\n  \"@webpack-cli/init\": \"^0.2.2\",  // 同上\n  \"hexo-service-worker\": \"^1.0.1\", // 离线访问\n  \"hexo-pwa\": \"^0.1.3\",   // Progressive Web App，可将网站安装到桌面(PC、手机)\n  ```\n  \u003e 所装插件信息位于站点根目录的 package.json 文件，核对一下自己是否已经装过。\n\n- 安装命令\n\n  在站点根目录下，使用：\n\n  ```nodejs\n  npm install --save-dev hexo-neat\n  ```\n\n  即可安装 hexo-neat 插件，其他的插件安装方式类似。默认是安装最新版，如要指定版本号，可使用：\n\n  ```nodejs\n  npm install --save-dev hexo-neat@1.0.4\n  ```\n\n### 配置文件\n\n- next 主题配置文件 _config.yml\n\n  按需配置 valine、leanCloud、busuanzi、tidio、hotjar、轮播图、文章推荐、点击特效、自定义标签等。\n\n- hexo 站点配置文件 _config.yml\n\n  按需配置 abbrlink、highlight、deploy、douban、hexo-neat 等。\n\n  \u003e ⚠️ 注意：部分功能需注册后方可使用。\n\n## 部署\n\n\u0026emsp;\u0026emsp;控制台 `hexo clean \u0026\u0026 hexo g \u0026\u0026 hexo s` 三连，浏览器输入 `http://localhost:4000/` 即可看到效果！\n\n## 最后\n\n\u0026emsp;\u0026emsp;附上完整版**站点配置文件**，供大家参考 \u0026#x261f;\u0026#x261f;\n\n```js\n# Hexo Configuration\n## Docs: https://hexo.io/docs/configuration.html\n## Source: https://github.com/hexojs/hexo/\n\n# Site\ntitle: Leaf's Blog\nsubtitle: 因心造境，风云由我！\nsignature: 人在江湖，生不由己\ndescription: 人在江湖，生不由己，出来混，迟早是要还的!\nkeywords: leafjame 北宸 Java 程序员 北漂\nauthor: 北宸\nlanguage: zh-Hans\ntimezone:\n\n# URL\n## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'\nurl: https://www.liaofuzhan.com\nroot: /\n#permalink: :year/:month/:day/:title/ #对搜索引擎是十分不友好的\n#permalink: :title.html\npermalink: posts/:abbrlink.html  # 此处可以自己设置，也可以直接使用 :/abbrlink\npermalink_defaults:\n\n# 文章链接唯一永久化\nabbrlink:\n  alg: crc32  #算法： crc16(default) and crc32\n  rep: dec    #进制： dec(default) and hex\n\nbaidu_url_submit:\n  count: 6 ## 比如3，代表提交最新的三个链接\n  host: https://www.liaofuzhan.com ## 在百度站长平台中注册的域名\n  token: XXXXXX ## 请注意这是您的秘钥， 所以请不要把博客源代码发布在公众仓库里!\n  path: baidu_urls.txt ## 文本文档的地址， 新链接会保存在此文本文档里\n\n\n# Directory\nsource_dir: source\npublic_dir: public\ntag_dir: tags\narchive_dir: archives\ncategory_dir: categories\ncode_dir: downloads/code\ni18n_dir: :lang\n#skip_render:\n\nskip_render: README.md\n\n# Writing\n#https://hexo.io/zh-cn/docs/writing\n#new_post_name: :year-:month-:day-:title.md #方便已日期来管理文章\nnew_post_name: :title.md # File name of new posts\ndefault_layout: post\ntitlecase: false # Transform title into titlecase\nexternal_link: true # Open external links in new tab\nfilename_case: 0\nrender_drafts: false\npost_asset_folder: false\nrelative_link: false\nfuture: true\nhighlight:\n  enable: true\n  line_number: true\n  auto_detect: true\n  tab_replace:\n\n# Home page setting\n# path: Root path for your blogs index page. (default = '')\n# per_page: Posts displayed per page. (0 = disable pagination)\n# order_by: Posts order. (Order by date descending by default)\nindex_generator:\n  path: ''\n  per_page: 10\n  order_by: -date\n\n# Category \u0026 Tag\ndefault_category: uncategorized\ncategory_map:\ntag_map:\n\n# Date / Time format\n## Hexo uses Moment.js to parse and display date\n## You can customize the date format as defined in\n## http://momentjs.com/docs/#/displaying/format/\ndate_format: YYYY-MM-DD\ntime_format: HH:mm:ss\n\n# Pagination\n## Set per_page to 0 to disable pagination\nper_page: 10\npagination_dir: page\n\n# Extensions\n## Plugins: https://hexo.io/plugins/\n## Themes: https://hexo.io/themes/\n#theme: landscape\ntheme: next\n\nPlugins:\n- hexo-generator-baidu-sitemap\n- hexo-generator-sitemap\n\nbaidusitemap:\n  path: baidusitemap.xml\nsitemap:\n  path: sitemap.xml\n\n# Deployment\n## Docs: https://hexo.io/docs/deployment.html\ndeploy:\n- type: git\n  repository:\n            github: https://github.com/leafjame/leafjame.github.io.git\n            gitee: https://gitee.com/leafjame/leafjame.git\n  branch: master\n\n- type: baidu_url_submitter\n\n# Search\nsearch:\n  path: ./public/search.xml\n  field: post\n  format: html\n  limit: 10000\n\n# feed\n# Dependencies: https://github.com/hexojs/hexo-generator-feed\nfeed:\n  type: atom\n  path: atom.xml\n  limit: 20\n  hub:\n  content:\n\n# https://github.com/blinkfox/hexo-theme-matery/blob/develop/README_CN.md\npermalink_pinyin:\n  enable: false\n  separator: '-' # default: '-'\n\n# https://blog.csdn.net/lewky_liu/article/details/82432003\n# https://github.com/rozbo/hexo-neat\nneat_enable: true\n# 压缩html\nneat_html:\n  enable: true\n  exclude:\n# 压缩css\nneat_css:\n  enable: true\n  exclude:\n  - '**/*.min.css'\n  - '**/needsharebutton.css'\n# 压缩js\nneat_js:\n  enable: true\n  mangle: true\n  output:\n  compress:\n  exclude:\n  - '**/*.min.js'\n  - '**/jquery.fancybox.pack.js'\n  - '**/index.js'\n  - '**/waifu-tips.js'\n  - '**/iframe.js'\n  - '**/fireworks.js'\n\n# https://github.com/mythsman/hexo-douban\ndouban:\n  user: your_id\n  builtin: false  #否将生成页面的功能嵌入hexo s和hexo g中(false则需要使用hexo douban命令)\n  book:\n    title: '读书系列' # 该页面的标题\n    quote: '书山有路勤为径，学海无涯苦作舟' # 写在页面开头的一段话,支持html语法.\n  movie:\n    title: '观影系列'\n    quote: 'Life was like a box of chocolates, you never know what you’re going to get'\n  timeout: 10000 # 爬取数据的超时时间\n\n# https://github.com/lavas-project/hexo-pwa\n# https://developers.google.com/web/fundamentals/web-app-manifest/?utm_source=devtools\npwa:\n  manifest:\n    path: /manifest.json\n    body:\n      name: Leaface # is used in the app install prompt.\n      short_name: Leaface #  is used on the user's home screen, launcher, or other places where space may be limited\n      description: 北宸的小站\n      icons:\n      - src: https://cdn.jsdelivr.net/gh/leafjame/cdn/img/icon/linkcard.png\n        sizes: 192x192\n        type: image/png\n      - src: https://cdn.jsdelivr.net/gh/leafjame/cdn/img/logo/beichen.png\n        sizes: 512x512\n        type: image/png\n      start_url: /\n      theme_color: '#3367D6' # 2196f3\n      background_color: '#2196f3'\n      display: standalone\n  serviceWorker:\n    path: /sw.js\n    preload:\n      urls:\n      - /\n      posts: 1\n    opts:\n      networkTimeoutSeconds: 5\n    routes:\n    - pattern: !!js/regexp /hm.baidu.com/\n      strategy: networkOnly\n    - pattern: !!js/regexp /.*\\.(js|css|jpg|jpeg|png|gif)$/\n      strategy: cacheFirst\n    - pattern: !!js/regexp /\\//\n      strategy: networkFirst\n  priority: 10\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafjame%2Fhexo-theme-next5-leaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafjame%2Fhexo-theme-next5-leaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafjame%2Fhexo-theme-next5-leaf/lists"}