{"id":14967548,"url":"https://github.com/fan-lv/fan","last_synced_at":"2025-05-09T03:27:01.031Z","repository":{"id":39705843,"uuid":"170054909","full_name":"fan-lv/Fan","owner":"fan-lv","description":"hexo-theme","archived":false,"fork":false,"pushed_at":"2023-05-31T10:55:27.000Z","size":2685,"stargazers_count":160,"open_issues_count":8,"forks_count":36,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T02:28:21.741Z","etag":null,"topics":["hexo-theme","pug","stylus"],"latest_commit_sha":null,"homepage":null,"language":"Stylus","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fan-lv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-11T02:26:54.000Z","updated_at":"2024-10-15T09:07:11.000Z","dependencies_parsed_at":"2024-01-18T14:41:30.976Z","dependency_job_id":"e8e5099b-7ac9-452f-897f-06e8c1731621","html_url":"https://github.com/fan-lv/Fan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan-lv%2FFan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan-lv%2FFan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan-lv%2FFan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fan-lv%2FFan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fan-lv","download_url":"https://codeload.github.com/fan-lv/Fan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253182517,"owners_count":21867240,"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":["hexo-theme","pug","stylus"],"created_at":"2024-09-24T13:38:14.671Z","updated_at":"2025-05-09T03:27:01.008Z","avatar_url":"https://github.com/fan-lv.png","language":"Stylus","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eFan\u003c/h1\u003e\n\u003cp align=\"center\"\u003e这是一个深色主题，如梦幻般的星空，群星闪烁。\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"https://fan-lv.github.io\"\u003e\u003cb\u003ePreview\u003c/b\u003e\u003c/a\u003e\u003c/p\u003e\n\n## Install\n\n```\ngit clone https://github.com/fan-lv/Fan.git themes/Fan\n```\n修改位于博客根目录下的 `_config.yml` 内的 `theme` 选项值为 `Fan`\n\n## Update\n\n```\ncd themes/Fan\ngit pull\n```\n\n## Required packages\n\n- hexo-renderer-jade\n- hexo-renderer-stylus\n\n若报错 `extends includes/layout.pug block content include includes/recent-posts.pug include includes/pagination.pug`\n\n安装依赖包，重新生成\n```\nnpm install --save hexo-renderer-jade hexo-renderer-stylus\n```\n\n\u003e Notes: 有说 `hexo-renderer-jade` 包过期的，可以用 `hexo-renderer-pug`\n\n其他扩展依赖包参考\n```\nnpm install --save hexo-generator-feed hexo-generator-sitemap hexo-generator-archive hexo-browsersync\n```\n\n## Questions\n- 若报错 `layout\\includes\\config.pug:1`, `Cannot read property 'appId' of undefined`, 需要把 `themes` -\u003e `_config.yml` 中 `algolia_search:enable` 改成 `false`\n\n## Feature\n### Top article\n\n支持文章置顶功能，在需要置顶的文章（Markdown 文件）加入 `top: 1`，数值越大越靠前。\n\n如：\n```\ntitle: xxx\nauthor: xxx\ntags:\n  - xxx\ncategories:\n  - xxx\ndate: xxx\ntop: 1\n```\n\n### Comments\n目前支持 [Gitment](https://github.com/imsun/gitment)、[Valine](https://valine.js.org/) 评论。\n\n使用方法：\n1. 在根目录下 `_config.yml` 文件中加入以下代码，`[\"gitment\", \"valine\"]` 配置自行选择一个，第二步中选择使用哪个\n    ```\n    comments:\n      gitment:\n        enable: true\n        owner: 'Your GitHub ID'\n        repo: 'The repository to store your comments. Make sure you're repo's owner'\n        client_id: 'GitHub client ID'\n        client_secret: 'GitHub client secret'\n \n      # 可以自由配置 valine 的其他配置项\n      valine:\n        appId: 'Your appId'\n        appKey: 'Your appKey'\n        placeholder: 'xxx'\n        ...(valine配置项，参考链接 https://valine.js.org/configuration.html)\n    ```\n \n2. `themes` -\u003e `_config.yml` 中可以开启或关闭 `comments`，并且通过 `type` 指定使用的评论插件\n    ```\n    # 评论\n    comments:\n      enable: true\n      # 使用哪种评论插件[\"gitment\", \"valine\"]\n      type: \"valine\"\n    ```\n\n### Algolia_search\n\n1. 注册 [Algolia账户](https://www.algolia.com/users/sign_in)，创建新的 Index，记下 `index name`\n\n2. 安装扩展\n    ```\n    npm install hexo-algolia --save\n    ```\n\n3. 修改 Algolia 搜索 ACL（访问控制列表）\n    默认的 `Search-Only API Key` 不能修改，需要在 `All API Keys` -\u003e `New API Key`\n\n    勾选 ACLs: `search` `addObject` `deleteObject` `listIndexes` `deletelndex`\n    \n    执行安装\n    ```\n    export HEXO_ALGOLIA_INDEXING_KEY=New API Key\n    hexo algolia\n    ```\n    \u003e Notes: Mac 和 git bash 为 `export`, Windows 为 `set`, Powershell 用 `$env`\n \n4. 获取 Key，更新站点根目录配置\n    ```\n    algolia:\n      applicationID: 'Application ID'\n      apiKey: 'New API Key'\n      indexName: 'index name'\n    ```\n\n5. 主题配置下开启 Algolia_search\n    ```\n    algolia_search:\n      enable: true\n      hits:\n        per_page: 10\n    ```\n    \u003e 注意，每次更新文章后记得执行 `hexo algolia` 更新索引。\n\n\u003cimg width='999' src='https://fan-lv.github.io/blog_demo.png' alt='主题预览图'\u003e\n\n## License\n[MIT](https://opensource.org/licenses/MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffan-lv%2Ffan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffan-lv%2Ffan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffan-lv%2Ffan/lists"}