Skip to content

对于notion的bookmark这种block支持不是很好 #127

@handbye

Description

@handbye

你当前使用的Elog版本

0.14.7

Elog配置文件

module.exports = {
  write: {
    platform: 'notion',
    notion: {
      token: process.env.NOTION_TOKEN,
      databaseId: process.env.NOTION_DATABASE_ID,
      filter: { property: 'status', select: { equals: '已发布' }}
    }
  },
  deploy: {
    platform: 'local',
    local: {
      outputDir: './source/_posts',
      filename: 'title',
      format: 'markdown',
      catalog: false,
      frontMatter: {
        enable: true,
        include: ['layout','categories','tags', 'title', 'date', 'permalink', 'home_cover'],
        timeFormat: true,
      },
      //formatExt: './format-image.js',
    }
  },
  image: {
    enable: true,
    platform: 'local',
    local: {
      outputDir: './source/post_images',
      prefixKey: '../post_images'
    }
  },
}

发生了什么?

notion中是支持bookmark这种block的,其实就是超链接预览,通过api导出的格式是这种的:

{
  //...other keys excluded
  "type": "bookmark",
  //...other keys excluded
  "bookmark": {
    "caption": [],
    "url": "https://companywebsite.com"
  }
}

参考:https://developers.notion.com/reference/block#bookmark

在notion中是这种效果:

Image

渲染到hexo中是这种效果:

Image

希望能支持这种block的渲染,不行的话就现实原始超链接也行,现在这种展现格式有点难看,感谢。

Elog错误日志

附加信息

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions