使用撇号博客与撇号无头

时间:2018-01-31 20:29:56

标签: apostrophe apostrophe-cms

当我尝试将restApi值添加到撇号博客配置时,我一直在挖掘并出于某种原因,我没有从api获得任何东西。撇号博客是撇号的延伸,我想知道我错过了什么。这不是以这种方式工作吗?希望能够很容易地回答这个问题。

以下是我app.js的模块对象中的内容:

'apostrophe-headless': {},
'apostrophe-blog': {
  addFields: [
    {
      name: 'body',
      label: 'Page Content',
      type: 'area',
      options: {
        widgets: {
          'apostrophe-rich-text': {
            toolbar: [ 'Styles', 'Bold', 'Italic', 'Link', 'Unlink', 'Anchor', 'Table', 'BulletedList', 'Blockquote', 'Strike',  'Subscript', 'Superscript' ]
          },
          'apostrophe-images': {},
          'apostrophe-video': {},
          'headline': {},
          'pullquote': {},
        }
      }
    }      
  ],
  restApi: true 
},
'apostrophe-blog-pages': {},
'apostrophe-blog-widgets': {},  

1 个答案:

答案 0 :(得分:1)

我发现了我正在寻找的简单答案。在重复,扩展撇号博客模块并阅读代码和注释到调试后,我意识到future过滤器是必要的。 据说解决方案是在博客文章的api请求结束时解决未来的请求参数。但它的确有效!现在回来添加更多有趣的小部件。

/api/v1/apostrophe-blog?future=false
相关问题