hexo-generator-restful
hexo-generator-restful copied to clipboard
Generate RESTful json data for Hexo plugins.
不知道是不是可以支持返回原始的md文章
新增simple_post_map 节点,以实现在生成tags的时候,是否生成content等内容。 # 对外API restful: site: true # hexo.config mix theme.config posts_size: 10 # 文章列表分页,0 表示不分页 posts_props: # 文章列表项的需要生成的属性 title: true slug: true date: true updated: true comments: true path:...
比如作者返回的属性中有一个为cover,而在我的主题配置中有一个cover属性代表另一种意思(是否显示封面图),当我设置cover: true的时候,返回的cover属性会变成我设置的值而不会取文章的第一张图片
原先的page路径采用的是,内容标题,且非英文和数字的都替换为`-`,将导致about的实际路径并不是这样的`/api/pages/about.json`。 此修复,page路径采用的是`page.source`变量,其值类似 `404/index.md`,取值斜杠前面的,如 `404`。将可正确的获取路径。 并且,`source` 目录下有其它文件夹,并不属于page范畴,在配置中添加选项,可排除。
有时候 md 文件里面会有一些关于此文章的特殊的元数据,如 ``` --- title: ttt subtitle: ttt meta: ttt --- ``` 如果能把这些元数据都返回就更好了,感谢
How do you get this to work? I installed it with NPM. Copied the yml restful config into my hexo _config.yml Then did hexo serve. When I visit localhost:4000/api/posts.json or...
Add permalink field to post list API.
I using `hexo-generator-restful` plugin to get latest posts of my blog in other site. And I want to show post list with link, but there are no field about permalink....
这个插件十分好用,但是在使用过程中我遇到了一个问题:markdown中我设置了文章自身的目录(toc),且在hexo生成的网页中也显示了文章的目录,但是似乎在通过api获取的文章数据中并不包含目录信息。请问可以支持返回文章的目录吗?