All Projects → yscoder → Hexo Generator Restful

yscoder / Hexo Generator Restful

Licence: mit
Generate RESTful json data for Hexo plugins.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Hexo Generator Restful

Gen
Converts a database into gorm structs and RESTful api
Stars: ✭ 825 (+906.1%)
Mutual labels:  restful, generator
Node Typescript Mongodb
node js typescript mongodb express generator yo
Stars: ✭ 96 (+17.07%)
Mutual labels:  restful, generator
Ttpassgen
密码生成 flexible and scriptable password dictionary generator which can support brute-force、combination、complex rule mode etc...
Stars: ✭ 68 (-17.07%)
Mutual labels:  generator
Spicy Proton
Generate a random English adjective-noun word pair in Ruby
Stars: ✭ 76 (-7.32%)
Mutual labels:  generator
Openapi Mock Generator
Progressive Web App for generating mocked data from an OpenAPI specification
Stars: ✭ 72 (-12.2%)
Mutual labels:  generator
Github Monitor
Github Sensitive Information Leakage Monitor(Github信息泄漏监控系统)
Stars: ✭ 1,166 (+1321.95%)
Mutual labels:  restful
Graceful
Elegant Python REST toolkit built on top of falcon
Stars: ✭ 73 (-10.98%)
Mutual labels:  restful
Generator Rn Toolbox
The React Native Generator to bootstrap your apps
Stars: ✭ 1,155 (+1308.54%)
Mutual labels:  generator
Dashed Border Generator
Custom Dashed Border | Online CSS Generator 🚀
Stars: ✭ 79 (-3.66%)
Mutual labels:  generator
Restful mapper
ORM for consuming RESTful APIs in C++
Stars: ✭ 71 (-13.41%)
Mutual labels:  restful
Markdowngenerator
Swift library to programmatically generate Markdown output and files
Stars: ✭ 76 (-7.32%)
Mutual labels:  generator
Vos backend
vangav open source - backend; a backend generator (generates more than 90% of the code needed for big scale backend services)
Stars: ✭ 71 (-13.41%)
Mutual labels:  generator
The forge
Our groundbreaking, lightning fast PWA CLI tool
Stars: ✭ 70 (-14.63%)
Mutual labels:  generator
Spring Boot Api Project Seed
🌱🚀一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~
Stars: ✭ 8,979 (+10850%)
Mutual labels:  restful
Invoice It
📃 Generate your orders or your invoices and export them in html, pdf or buffer easily.
Stars: ✭ 69 (-15.85%)
Mutual labels:  generator
Jsdoc To Markdown
Generate markdown documentation from jsdoc-annotated javascript
Stars: ✭ 1,199 (+1362.2%)
Mutual labels:  generator
Videosniffer
视频嗅探服务(VideoSniffer API Service On Android)
Stars: ✭ 68 (-17.07%)
Mutual labels:  restful
Gp Vue Boilerplate
Grabarz & Partner Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites with vuejs.
Stars: ✭ 71 (-13.41%)
Mutual labels:  generator
Lumen Api Oauth
A RESTful API based on Lumen micro-framework with OAuth2.
Stars: ✭ 73 (-10.98%)
Mutual labels:  restful
Deep Copy
Deep copy generator
Stars: ✭ 82 (+0%)
Mutual labels:  generator

hexo-generator-restful

Generate restful json data for Hexo plugins.

生成 restful 风格的 json 数据,可以当作 api 接口,开始构建一个 SPA 应用吧。

Install

npm install hexo-generator-restful --save

Config

以下为默认配置,属性值为 false 表示不生成。

restful:
  # site 可配置为数组选择性生成某些属性
  # site: ['title', 'subtitle', 'description', 'author', 'since', email', 'favicon', 'avatar']
  site: true        # hexo.config mix theme.config
  posts_size: 10    # 文章列表分页,0 表示不分页
  posts_props:      # 文章列表项的需要生成的属性
    title: true
    slug: true
    date: true
    updated: true
    comments: true
    path: true
    excerpt: false
    cover: true      # 封面图,取文章第一张图片
    content: false
    keywords: false
    categories: true
    tags: true
  categories: true         # 分类数据
  use_category_slug: false # Use slug for filename of category data
  tags: true               # 标签数据
  use_tag_slug: false      # Use slug for filename of tag data
  post: true               # 文章数据
  pages: false             # 额外的 Hexo 页面数据, 如 About

Document

Get Hexo Config

获取所有 Hexo 配置(站点配置和主题配置)。

Request
GET /api/site.json
Response

/api/site.json

Get Posts

如果配置 posts_size: 0 则不分页,以下请求会获取全部文章。

Request
GET /api/posts.json
Response

示例为分页配置下的数据,会包含分页属性 totalpageSizepageCount,不分页的数据不包含这三项。

/api/posts.json

Get Posts By Page

获取分页数据

Request
GET /api/posts/:PageNum.json
Response

/api/posts/1.json

Get All Tags

获取所有文章标签,如果文章无标签则不生成。

Request
GET /api/tags.json
Response

/api/tags.json

Get Posts By Tag

获取某一标签下的所有文章

Request
GET /api/tags/:TagName.json
Response

/api/tags/Hexo.json

Get All Categories

获取所有文章分类,如果文章无分类则不生成。

Request
GET /api/categories.json
Response

数据格式同 Get All Tags

Get Posts By Categorie

获取某一分类下的所有文章

Request
GET /api/categories/:CategorieName.json
Response

数据格式同 Get Posts By Tag

Get Post By Slug

根据文章别名获取文章详细信息

Request
GET /api/articles/:Slug.json
Response

/api/articles/javascript-advanced-functions.json

Get Implecit Pages

获取来自主题的 Hexo 隐式页面内容,如 About 等。因隐式页面(除 About 等导航栏入口页外)一般在 Hexo 不提供直接访问入口,调用此 API 的开发者需要了解其完整路径,此接口默认关闭。

例如:

Request
GET /api/pages/about.json
Response

格式类似于于 Get Post By Slug。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].