{"id":15147154,"url":"https://github.com/theme-particlex/hexo-theme-particlex","last_synced_at":"2025-05-16T12:04:24.279Z","repository":{"id":37732370,"uuid":"490518419","full_name":"theme-particlex/hexo-theme-particlex","owner":"theme-particlex","description":"A concise Hexo theme, based on Particle.","archived":false,"fork":false,"pushed_at":"2024-08-20T16:21:06.000Z","size":38780,"stargazers_count":475,"open_issues_count":7,"forks_count":64,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T21:11:15.588Z","etag":null,"topics":["giscus","gitalk","hexo","hexo-theme","twikoo","waline"],"latest_commit_sha":null,"homepage":"","language":"EJS","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/theme-particlex.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-10T02:45:43.000Z","updated_at":"2025-03-29T08:16:38.000Z","dependencies_parsed_at":"2022-07-13T03:50:36.499Z","dependency_job_id":"dcf992d7-aee0-401e-a9d1-4f0def62e71c","html_url":"https://github.com/theme-particlex/hexo-theme-particlex","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-theme-particlex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-theme-particlex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-theme-particlex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-theme-particlex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theme-particlex","download_url":"https://codeload.github.com/theme-particlex/hexo-theme-particlex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248564824,"owners_count":21125412,"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":["giscus","gitalk","hexo","hexo-theme","twikoo","waline"],"created_at":"2024-09-26T12:22:46.173Z","updated_at":"2025-04-12T11:49:13.080Z","avatar_url":"https://github.com/theme-particlex.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexo-Theme-ParticleX\r\n\r\n[ParticleX](https://github.com/theme-particlex/hexo-theme-particlex) 主题，诞生原因是因为原来的 [Particle](https://github.com/korilin/hexo-theme-particle) 主题不维护了，但是我觉得还是很好的。\r\n\r\n原来用的是 Vue 2 + Ant Design Vue 1，现更新到 Vue 3，去除 Ant Design Vue 采用自定义样式，图标更改为 Font Awesome 6，CDN 改为 ZStatic。\r\n\r\n原项目 `README.md` 里说：\r\n\r\n\u003e 目前有 Full、Night 和 Maiden **两个**主题样式。\r\n\r\n但是更改后只有一种了，如果你想改颜色就在 `main.css` 里替换吧。\r\n\r\n# 1. 演示\r\n\r\n-   [GitHub Pages](https://argvchs.github.io)\r\n-   [Netlify](https://argvchs.netlify.app)\r\n-   [Vercel](https://argvchs.vercel.app)\r\n\r\n# 2. 安装\r\n\r\n```bash\r\ncd themes\r\ngit clone https://github.com/theme-particlex/hexo-theme-particlex.git particlex --depth=1\r\n```\r\n\r\n然后在根目录 `_config.yml` 设置主题为 ParticleX 即可。\r\n\r\n```yaml\r\ntheme: particlex\r\n```\r\n\r\n## 2.1. 关闭自带代码高亮\r\n\r\nHexo 有自带的代码高亮，但是和 ParticleX 的不兼容。\r\n\r\n```yaml\r\nhighlight:\r\n    enable: false\r\nprismjs:\r\n    enable: false\r\n```\r\n\r\n如果使用 Hexo 7.0.0 之后的版本只需要修改为：\r\n\r\n```yaml\r\nsyntax_highlighter:\r\n```\r\n\r\n如果使用 Pandoc 还需要设置一下：\r\n\r\n```yaml\r\npandoc:\r\n    extra:\r\n        - no-highlight:\r\n```\r\n\r\n## 2.2. 禁用年度月度归档\r\n\r\nHexo 会自动生成年度月度归档，可是 ParticleX 主题没有这个功能。~~我太懒了~~\r\n\r\n```yaml\r\narchive_generator:\r\n    enabled: true\r\n    per_page: 0\r\n    yearly: false\r\n    monthly: false\r\n    daily: false\r\n```\r\n\r\n修改完请 `hexo cl` 清除缓存。\r\n\r\n# 3. 配置\r\n\r\n## 3.1. 基本配置\r\n\r\n`background` 参数是一个列表，打开时会随机加载一个背景。\r\n\r\n```yaml\r\n# Avatar image\r\navatar: /images/avatar.jpg\r\n\r\n# Home page background image\r\nbackground:\r\n    - /images/background.jpg\r\n\r\n# Loading image\r\nloading: /images/loading.gif\r\n\r\n# Optional colors for category and tag\r\ncolors:\r\n    - \"#ffa2c4\"\r\n    - \"#00bcd4\"\r\n    - \"#03a9f4\"\r\n    - \"#00a596\"\r\n    - \"#ff7d73\"\r\n```\r\n\r\n## 3.2. 内容配置\r\n\r\n### 3.2.1. 导航栏\r\n\r\n为了方便，主题使用的图标是 Font Awesome 6 图标。\r\n\r\n```yaml\r\n# ParticleX theme icon is adopts the Font Awesome 6\r\n# https://fontawesome.com\r\n\r\n# Main menu navigation\r\nmenu:\r\n    Home:\r\n        name: house\r\n        theme: solid\r\n        link: /\r\n    About:\r\n        name: id-card\r\n        theme: solid\r\n        link: /about\r\n    Archives:\r\n        name: box-archive\r\n        theme: solid\r\n        link: /archives\r\n    Categories:\r\n        name: bookmark\r\n        theme: solid\r\n        link: /categories\r\n    Tags:\r\n        name: tags\r\n        theme: solid\r\n        link: /tags\r\n```\r\n\r\n### 3.2.2. 主页信息卡片\r\n\r\n`description` 支持 Markdown 格式。\r\n\r\n图标链接 `iconLinks` 配置和导航栏配置相同。\r\n\r\n```yaml\r\n# Side info card\r\ncard:\r\n    enable: true\r\n    description: |\r\n        Description\r\n        ...\r\n    iconLinks:\r\n    friendLinks:\r\n        Argvchs: https://argvchs.github.io\r\n```\r\n\r\n### 3.2.3. 页脚\r\n\r\n考虑到博客部署在服务器并使用自己域名的情况，按规定需要在网站下边添加备案消息。\r\n\r\n如没有需要显示备案消息的可以关闭。\r\n\r\n```yaml\r\n# Footer info\r\nfooter:\r\n    since: 2022\r\n    # Customize the server domain name ICP\r\n    ICP:\r\n        enable: false\r\n        code:\r\n        link:\r\n```\r\n\r\n## 3.3. 功能配置\r\n\r\n### 3.3.1. Polyfill\r\n\r\n使用 [Polyfill.io](https://polyfill.io) 自动根据 UA 处理新的 JS API 兼容。\r\n\r\n可以配合 [Hexo-Babel](https://github.com/theme-particlex/hexo-babel) 插件处理 JS 语法兼容。\r\n\r\nPolyfill 在国内一些省份被墙，这里换成了阿里的 [Polyfill](https://polyfill.alicdn.com)。\r\n\r\n```yaml\r\n# Polyfill\r\n# https://polyfill.io\r\npolyfill:\r\n    enable: true\r\n    features:\r\n        - default\r\n```\r\n\r\n### 3.3.2. 代码高亮\r\n\r\n使用 Highlight.js 代码高亮。\r\n\r\n样式可以在[这里](https://highlightjs.org/static/demo)选择，默认为 GitHub。\r\n\r\n```yaml\r\n# Highlight.js\r\n# https://highlightjs.org\r\nhighlight:\r\n    enable: true\r\n    style: github\r\n```\r\n\r\n### 3.3.3. 数学渲染\r\n\r\n使用 KaTeX 渲染数学公式。\r\n\r\n```yaml\r\n# KaTeX math rendering\r\nmath:\r\n    enable: false\r\n```\r\n\r\n### 3.3.4. 图片预览\r\n\r\n简单的点击图片放大缩小的预览。\r\n\r\n```yaml\r\n# Image preview\r\npreview:\r\n    enable: true\r\n```\r\n\r\n### 3.3.5. 文章缩略\r\n\r\n一般来说，缩略展示文档只需要在文档中添加 `\u003c!-- more --\u003e` 即可，缩略内容在显示全文中也会出现。\r\n\r\n但考虑到不想把缩略内容放在正文里，就添加了此参数，在 [Front-Matter](https://hexo.io/docs/front-matter) 里设置。\r\n\r\n支持 Markdown 格式。\r\n\r\n```yaml\r\ndescription: |\r\n    Normal _Italic_ **Strong**\r\n```\r\n\r\n### 3.3.6. 文章置顶\r\n\r\n在 [Front-Matter](https://hexo.io/docs/front-matter) 里设置 `pinned` 作为置顶参数，越大越靠前，默认为 0。\r\n\r\n### 3.3.7. 文章加密\r\n\r\n使用 AES 加密算法，在 [Front-Matter](https://hexo.io/docs/front-matter) 里设置 `secret` 作为密码，**使用请安装插件 [Hexo-Helper-Crypto](https://github.com/theme-particlex/hexo-helper-crypto)**。\r\n\r\n```yaml\r\n# Article encryption\r\ncrypto:\r\n    enable: false\r\n```\r\n\r\n### 3.3.8. 搜索\r\n\r\n嵌入到 Archives 中的搜索。\r\n\r\n目前只支持搜索文档标题。\r\n\r\n```yaml\r\n# Search\r\nsearch:\r\n    enable: false\r\n```\r\n\r\n## 3.4. 评论配置\r\n\r\n### 3.4.1. giscus\r\n\r\ngiscus 是一个由 GitHub Discussions 支持的评论系统。\r\n\r\n在 [giscus.app](https://giscus.app) 设置好各项后，会在下面生成一个 `\u003cscript\u003e` 标签，在主题内填入即可。\r\n\r\n```yaml\r\n# giscus\r\n# https://github.com/giscus/giscus\r\ngiscus:\r\n    enable: false\r\n    src: https://giscus.app/client.js\r\n    repo:\r\n    repoID:\r\n    category:\r\n    categoryID:\r\n    mapping: pathname\r\n    strict: 0\r\n    reactionsEnabled: 1\r\n    emitMetadata: 0\r\n    inputPosition: bottom\r\n    theme: preferred_color_scheme\r\n    lang:\r\n```\r\n\r\n### 3.4.2. Gitalk\r\n\r\nGitalk 是一个基于 GitHub Issue 和 Preact 的评论系统。\r\n\r\n由于 Gitalk 官方 CORS 代理用的是 Cloudflare，速度过慢，搭建 CORS 代理可以看[这篇文章](https://argvchs.github.io/2022/07/04/build-cors-anywhere)。\r\n\r\n```yaml\r\n# Gitalk\r\n# https://github.com/gitalk/gitalk\r\ngitalk:\r\n    enable: false\r\n    clientID: # Default ClientID\r\n    clientSecret: # Default ClientSecret\r\n    repo: # The name of repository of store comments\r\n    owner: # GitHub repo owner\r\n    admin: # GitHub repo owner and collaborators, only these guys can initialize github issues\r\n    language: # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available\r\n    proxy: # CORS proxy\r\n```\r\n\r\n### 3.4.3. Waline\r\n\r\nWaline 是一个简单、安全的评论系统。\r\n\r\n详见：[在 ParticleX 上使用 Waline | Yuzi's Blog](https://blog.yuzi.dev/posts/bcb4ff00.html)\r\n\r\n```yaml\r\n# Waline\r\n# https://github.com/walinejs/waline\r\nwaline:\r\n    enable: false\r\n    serverURL: # Waline server address url, you should set this to your own link\r\n    locale: # Locale: https://waline.js.org/guide/client/i18n.html#locale-option\r\n    commentCount: true # If false, comment count will only be displayed in post page, not in home page\r\n    pageview: false # Pageviews count, Note: You should not enable both `waline.pageview` and `leancloud_visitors`\r\n    emoji: # Custom emoji\r\n        - https://unpkg.com/@waline/emojis@1.2.0/weibo\r\n        - https://unpkg.com/@waline/emojis@1.2.0/alus\r\n        - https://unpkg.com/@waline/emojis@1.2.0/bilibili\r\n        - https://unpkg.com/@waline/emojis@1.2.0/qq\r\n        - https://unpkg.com/@waline/emojis@1.2.0/tieba\r\n        - https://unpkg.com/@waline/emojis@1.2.0/tw-emoji\r\n    meta: # Comment information, valid meta are nick, mail and link\r\n        - nick\r\n        - mail\r\n        - link\r\n    requiredMeta: # Set required meta field, e.g.: [nick] | [nick, mail]\r\n        - nick\r\n    lang: # Language, available values: en-US, zh-CN, zh-TW, pt-BR, ru-RU, jp-JP\r\n    wordLimit: 0 # Word limit, no limit when setting to 0\r\n    login: enable # Whether enable login, can choose from 'enable', 'disable' and 'force'\r\n    pageSize: 10 # Comment per page\r\n```\r\n\r\n### 3.4.4. Twikoo\r\n\r\nTwikoo 是一个一个简洁、安全、免费的静态网站评论系统。\r\n\r\n```yaml\r\n# Twikoo\r\n# https://github.com/imaegoo/twikoo\r\ntwikoo:\r\n    enable: false\r\n    envID:\r\n    region:\r\n    path: location.pathname\r\n    lang:\r\n```\r\n\r\n# 4. 写在最后\r\n\r\n本项目采用 MIT 开源许可证，欢迎大家贡献，你可以随意打开一个 Issue 来进行提问，有任何改进想法都可以进行 Fork，期待您的 Pull Request！\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-particlex%2Fhexo-theme-particlex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheme-particlex%2Fhexo-theme-particlex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-particlex%2Fhexo-theme-particlex/lists"}