{"id":29191297,"url":"https://github.com/ryanuo/hexo-generator-wxapi","last_synced_at":"2025-07-02T00:33:07.308Z","repository":{"id":57158507,"uuid":"403044367","full_name":"ryanuo/hexo-generator-wxapi","owner":"ryanuo","description":"一款生成hexo-Api接口的npm包，基于hexo-generator-restful","archived":false,"fork":false,"pushed_at":"2021-09-11T07:53:19.000Z","size":28,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-24T20:47:17.007Z","etag":null,"topics":["blog","hexo"],"latest_commit_sha":null,"homepage":"","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/ryanuo.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}},"created_at":"2021-09-04T11:57:16.000Z","updated_at":"2024-01-08T07:08:39.000Z","dependencies_parsed_at":"2022-09-07T06:21:41.619Z","dependency_job_id":null,"html_url":"https://github.com/ryanuo/hexo-generator-wxapi","commit_stats":null,"previous_names":["ryanuo/hexo-generator-wxapi","rr210/hexo-generator-wxapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryanuo/hexo-generator-wxapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-generator-wxapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-generator-wxapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-generator-wxapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-generator-wxapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanuo","download_url":"https://codeload.github.com/ryanuo/hexo-generator-wxapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanuo%2Fhexo-generator-wxapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263056115,"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","hexo"],"created_at":"2025-07-02T00:31:09.842Z","updated_at":"2025-07-02T00:33:07.246Z","avatar_url":"https://github.com/ryanuo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n * @Description: 中文文档\n * @Author: Harry\n * @Date: 2021-09-07 09:32:40\n * @Url: https://u.mr90.top\n * @github: https://github.com/rr210\n * @LastEditTime: 2021-09-11 15:38:17\n * @LastEditors: Harry\n--\u003e\n\u003cdiv align=\"right\"\u003e\n  语言:\n  中文\n  \u003ca title=\"English\" href=\"/README_en.md\"\u003e英文\u003c/a\u003e\n\u003c/div\u003e\n\n# hexo-generator-wxapi\n* 基于[hexo-generator-restful](https://www.npmjs.com/package/hexo-generator-restful) 进行修改, 增加了指定文章列表生成(用于轮播图的展示)\n* 基于[hexo-generator-search](https://www.npmjs.com/package/hexo-generator-search), 改动增加文章文件别名, 方便配置小程序接口\n\n## Install\n\n```bash\nnpm install hexo-generator-wxapi --save\n```\n\n## 代表项目\n\n* [代表项目](https://github.com/Rr210/hexo-wx-api)\n* 基于此接口 设计的一款微信小程序\n\n## 配置hexo文件下的 `_config.yml`\n\n* 加入以下为默认配置, 属性值为 `false` 表示不生成.\n\n```yml\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: []          # 生成指定的页面信息,填写你文章文件夹名称比如['css','js']，不加后缀名,主要用于轮播图api\n  search_all:\n    enable: true   # 默认开启\n    path: api/search.json\n    field: post\n    content: true\n```\n\n## Document\n\n* `Domain` 是你部署的域名地址, eg: `https://u.mr90.top`或者`https://u.mr90.top/blog`\n\n请求方式|请求地址|请求详情\n-----|-----|-----\nGet|Domain+ `/api/site.json` |获取所有的Hexo配置(站点的配置和主题的配置)\nGet|Domain+ `/api/posts.json` | 如果配置 `posts_size: 0` 则不分页, 获取全部文章\nGet|Domain+ `/api/posts/:PageNum.json` | 获取分页数据, 设置列表分类后, `:PageNum` 为动态变量(页数), eg: `/api/1.json` .\nGet|Domain+ `/api/tags.json` | 获取所有的文章标签, 无标签则不生成\nGet|Domain+ `/api/tags/:TagName.json` | 获取指定的标签文章列表, `:TagName` 为你文章的自定义标签名, eg: `/api/tags/web.json` .\nGet|Domain+ `/api/categories.json` | 获取所有的文章的分类\nGet|Domain+ `/api/categories/:CateName` | 获取指定分类的文章列表\nGet|Domain+ `/api/articles/:Slug.json` | 根据文章的别名获取文章的详细的数据, `:Slug` 为文章的别名.\nGet|Domain+ `/api/swiper.json` | 获取指定的列表别名的文章列表, eg: `['web', 'hexo', 'java']` 数组中的字符为指定文章的别名, 功能主要用于微信小程序轮播图文章的指定动态配置\nGet|Domain+ `/api/search.json` | 获取全部文档, 用于本地全局搜索\n\n### Get Implecit Pages\n\n获取来自主题的 Hexo 隐式页面内容, 如 About 等. 因隐式页面(除 About 等导航栏入口页外)一般在 Hexo 不提供直接访问入口, 调用此 API 的开发者需要了解其完整路径, 此接口默认关闭.\n\neg: \n\n###### Request\n\n```\nGET /api/pages/about.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanuo%2Fhexo-generator-wxapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanuo%2Fhexo-generator-wxapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanuo%2Fhexo-generator-wxapi/lists"}