{"id":29191303,"url":"https://github.com/ryanuo/hexo-wx-api","last_synced_at":"2025-07-02T00:33:08.552Z","repository":{"id":117619615,"uuid":"403633031","full_name":"ryanuo/hexo-wx-api","owner":"ryanuo","description":"A WeChat applet based on the hexo framework","archived":false,"fork":false,"pushed_at":"2024-01-08T16:56:26.000Z","size":1374,"stargazers_count":14,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-24T20:47:16.964Z","etag":null,"topics":["blog-theme","hexo","hexo-theme"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ryanuo.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-06T13:28:30.000Z","updated_at":"2024-08-15T01:41:15.000Z","dependencies_parsed_at":"2024-01-08T17:59:57.528Z","dependency_job_id":null,"html_url":"https://github.com/ryanuo/hexo-wx-api","commit_stats":null,"previous_names":["ryanuo/hexo-wx-api"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ryanuo/hexo-wx-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-wx-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-wx-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-wx-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-wx-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanuo","download_url":"https://codeload.github.com/ryanuo/hexo-wx-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-wx-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263056118,"owners_count":23406807,"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-theme","hexo","hexo-theme"],"created_at":"2025-07-02T00:31:13.052Z","updated_at":"2025-07-02T00:33:08.504Z","avatar_url":"https://github.com/ryanuo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[toc]\n\n# 仓库简介\n\n![GitHub last commit](https://img.shields.io/github/last-commit/rr210/hexo-wx-api?color=blue\u0026logo=github\u0026style=plastic) ![GitHub all releases](https://img.shields.io/github/downloads/rr210/hexo-wx-api/total?logo=github)  [![npm](https://img.shields.io/npm/v/hexo-generator-wxapi?color=green\u0026logo=npm)](https://www.npmjs.com/package/hexo-generator-wxapi)\n\n* 个人博客微信小程序\n* 配置hexo插件生成json数据接口\n* 适用于hexo的各类主题版本\n\n## 已上线小程序--搜索 `[今日在学c]`\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/Rr210/image@master/hexo/api/gh_7726a019ff90_258.jpg\" width=\"150\" height=\"150\"\u003e\n\u003cdiv\u003e一起学习可好? 扫码关注, 了解更多!!\u003c/div\u003e\n\u003c/div\u003e\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccenter\u003e\u003cimg src=\"https://cdn.jsdelivr.net/gh/Rr210/image@master/hexo/api/20210906211822.png\"\u003e图1  首页 \u003c/center\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccenter\u003e\u003cimg src=\"https://cdn.jsdelivr.net/gh/Rr210/image@master/hexo/api/20210907223503.png\"\u003e图2 个人中心\u003c/center\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccenter\u003e\u003cimg src=\"https://cdn.jsdelivr.net/gh/Rr210/image@master/hexo/api/20210908205236.png\"\u003e图2 文章页\u003c/center\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccenter\u003e\u003cimg src=\"https://cdn.jsdelivr.net/gh/Rr210/image@master/hexo/api/20210908205352.png\"\u003e图2 本地搜索\u003c/center\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## HEXO部署方法\n\n```html\nnpm install hexo-generator-wxapi --save\n```\n\n* 使用方法看[这里](https://github.com/rr210/hexo-generator-wxapi)\n\n## 具体步骤(接口配置)\n\n1. 在hexo`_config.yml`文件中加入以下配置 必须配置\n\n```yaml\nrestful_api:\n  # site 可配置为数组选择性生成某些属性\n  # site: ['title', 'subtitle', 'description', 'author', 'since', email', 'favicon', 'avatar']\n  site: true        # hexo.config mix theme.config\n  posts_size: 10    # 文章列表分页，0 表示不分页\n  posts_props:      # 文章列表项的需要生成的属性\n    title: true\n    slug: true\n    date: true\n    updated: true\n    comments: true\n    path: true\n    excerpt: false\n    cover: true      # 封面图，取文章第一张图片\n    content: false\n    keywords: false\n    categories: true\n    tags: true\n  categories: true         # 分类数据\n  use_category_slug: false # Use slug for filename of category data\n  tags: true               # 标签数据\n  use_tag_slug: false      # Use slug for filename of tag data\n  post: true               # 文章数据\n  pages: false            # 额外的 Hexo 页面数据, 如 About\n  swipers_list: []          # 生成指定的页面信息,做指定的轮播文章展示\n  search_all:                  #  配置全局搜索\n    enable: true\n    path: api/search.json  \n    field: post\n    content: true\n```\n\n## 小程序配置\n\n* 拉取代码, 将文件导入到微信开发者工具中\n\n```npm\ngit clone https://github.com/Rr210/hexo-wx-api\n```\n\n* 配置微信小程序\n* 找到config文件下的`config.js`进行配置, 如下\n\n```JS\n//配置域名,域名只修改此处。可以配置为根域名 u.mr90.top/blog\nconst DOMAIN = \"u.mr90.top\";\nconst WEBSITENAME = \"Harryの心阁\"; //网站名称\nconst ZANIMAGEURL = '../../static/images/zanshang.jpg'; //微信鼓励的图片链接，用于个人小程序的赞赏\nconst LOGO = \"../../static/images/logo-icon.png\"; // 网站的logo图片\n//首页图标导航\n//参数说明：'name'为名称，'image'为图标路径，'url'为跳转的页面，'redirecttype'为跳转的类型，apppage为本小程序的页面，miniapp为其他微信小程序,webpage为web-view的页面\n//redirecttype 是 miniapp 就是跳转其他小程序  url 为其他小程序的页面\n//redirecttype 为 apppage 就是跳转本小程序的页面，url为本小程序的页面路径\n//'appid' 当redirecttype为miniapp时，这个值为其他微信小程序的appid，如果redirecttype为apppage，webpage时，这个值设置为空。\n//'extraData'当redirecttype为miniapp时，这个值为提交到其他微信小程序的参数，如果redirecttype为apppage，webpage时，这个值设置为空。\nconst ISAD = {\n  \"enable\": false, // 是否开启，第一次使用时设为false.达到默认条件即可开启\n  \"bannerId\": 'adunit-c9dae21126085de9' // 自行申请id\n}; // 是否开启广告\n// 注意: 如果只是跳转微信小程序内部界面 无需修改以下内容\nconst INDEXNAV = [{\n    id: '1',\n    name: '热门排行',\n    image: '../../static/icon/index/1.png',\n    url: '../hot/hot',\n    redirecttype: 'apppage',\n    appid: '',\n    extraData: ''\n  }\n  // ...........\n];\n```\n\n* 样式的配置在全局文件`app.wxss`文件中\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanuo%2Fhexo-wx-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanuo%2Fhexo-wx-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanuo%2Fhexo-wx-api/lists"}