LetTTGACO / elog

Markdown 批量导出工具、开放式跨平台博客解决方案,随意组合写作平台(语雀/Notion/FlowUs/飞书/我来Wolai)和博客平台(Hexo/Vitepress/Halo/Confluence/WordPress等)

Home Page:https://elog.1874.cool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

同步飞书文档出现标题不存在

Gintoki-C opened this issue · comments

commented

解决了吗?
没有解决的话麻烦提供以下信息

  • elog.cache.json
  • elog.config.js
    或者提供该配置仓库的github地址
    以及飞书文档需要导出的文件夹下的文档截图

解决了吗? 没有解决的话麻烦提供以下信息

  • elog.cache.json
  • elog.config.js
    或者提供该配置仓库的github地址
    以及飞书文档需要导出的文件夹下的文档截图

配置都是默认的,只修改了 platform 字段

elog.cache.json
{
  "docs": [
    {
      "id": "",
      "doc_id": "",
      "updated": 1697530888000,
      "body_original": "## elog\n`elog sync -e .elog.env`  同步后使用 `hexo g` 部署\n\n内容显示 [untitled](https://frp-hat.top:23459/2023/10/17/Elog%E4%BD%BF%E7%94%A8/) \n![image](UjUUbaulqoJpd3xSpMWcRuwlngh)\n\n",
      "properties": {
        "title": "Elog使用",
        "urlname": "",
        "date": "2023-10-17 14:44:30",
        "updated": "2023-10-17 16:21:28"
      },
      "catalog": [],
      "body": "",
      "realName": "Elog使用",
      "relativePath": "/Elog使用.md"
    }
  ],
  "catalog": [
    {
      "id": "",
      "doc_id": "",
      "title": "Elog使用",
      "updated": 1697530888000,
      "createdAt": 1697525070000,
      "updatedAt": 1697530888000,
      "catalog": []
    }
  ]
}
// elog.config.js
module.exports = {
  write: {
    platform: 'feishu',
    yuque: {
      token: process.env.YUQUE_TOKEN,
      baseUrl: '',
      login: process.env.YUQUE_LOGIN,
      repo: process.env.YUQUE_REPO,
      onlyPublic: false,
      onlyPublished: true,
    },
    'yuque-pwd': {
      username: process.env.YUQUE_USERNAME,
      password: process.env.YUQUE_PASSWORD,
      host: '',
      login: process.env.YUQUE_LOGIN,
      repo: process.env.YUQUE_REPO,
      linebreak: false,
    },
    notion: {
      token: process.env.NOTION_TOKEN,
      databaseId: process.env.NOTION_DATABASE_ID,
      filter: false, // {property: 'status', select: {equals: '已发布'}}
      sorts: false, // [{timestamp: 'created_time', direction: 'descending'}],
      catalog: false,
    },
    feishu: {
      folderToken: '',
      appId: '',
      appSecret: '',
    },
    flowus: {
      tablePageId: process.env.FLOWUS_TABLE_PAGE_ID,
      filter: false, // {property: 'status',value: '已发布'}
      sort: false, // { property: 'createdAt', direction: 'descending' }
      catalog: false,
    },
  },
  deploy: {
    platform: 'local',
    local: {
      outputDir: './source/_posts',
      filename: 'title',
      format: 'markdown',
      catalog: false,
      formatExt: '',
    },
    confluence: {
      user: process.env.CONFLUENCE_USER,
      password: process.env.WORDPRESS_PASSWORD,
      endpoint: process.env.WORDPRESS_ENDPOINT,
      spaceKey: process.env.CONFLUENCE_SPACE_KEY,
      rootPageId: process.env.CONFLUENCE_ROOT_PAGE_ID, // 可选
      formatExt: '', // 可选
    },
    wordpress: {
      username: process.env.WORDPRESS_USERNAME,
      password: process.env.WORDPRESS_PASSWORD,
      endpoint: process.env.WORDPRESS_ENDPOINT,
      keyMap: {
        tags: 'tags',
        categories: 'categories',
        cover: 'cover',
        description: 'description',
      },
      formatExt: ''
    },
  },
  image: {
    enable: false,
    platform: 'local',
    local: {
      outputDir: './docs/images',
      prefixKey: '/images',
    },
    oss: {
      secretId: process.env.OSS_SECRET_ID,
      secretKey: process.env.OSS_SECRET_KEY,
      bucket: process.env.OSS_BUCKET,
      region: process.env.OSS_REGION,
      host: process.env.OSS_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    cos: {
      secretId: process.env.COS_SECRET_ID,
      secretKey: process.env.COS_SECRET_KEY,
      bucket: process.env.COS_BUCKET,
      region: process.env.COS_REGION,
      host: process.env.COS_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    qiniu: {
      secretId: process.env.QINIU_SECRET_ID,
      secretKey: process.env.QINIU_SECRET_KEY,
      bucket: process.env.QINIU_BUCKET,
      region: process.env.QINIU_REGION,
      host: process.env.QINIU_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    upyun: {
      user: process.env.UPYUN_USER,
      password: process.env.UPYUN_PASSWORD,
      bucket: process.env.UPYUN_BUCKET,
      host: process.env.UPYUN_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    github: {
      user: process.env.GITHUB_USER,
      token: process.env.GITHUB_TOKEN,
      repo: process.env.GITHUB_REPO,
      branch: '',
      host: '',
      prefixKey: '',
      secretExt: '', // 可选
    },
  },
}

image

commented

解决了吗? 没有解决的话麻烦提供以下信息

  • elog.cache.json
  • elog.config.js
    或者提供该配置仓库的github地址
    以及飞书文档需要导出的文件夹下的文档截图

配置都是默认的,只修改了 platform 字段

elog.cache.json
{
  "docs": [
    {
      "id": "",
      "doc_id": "",
      "updated": 1697530888000,
      "body_original": "## elog\n`elog sync -e .elog.env`  同步后使用 `hexo g` 部署\n\n内容显示 [untitled](https://frp-hat.top:23459/2023/10/17/Elog%E4%BD%BF%E7%94%A8/) \n![image](UjUUbaulqoJpd3xSpMWcRuwlngh)\n\n",
      "properties": {
        "title": "Elog使用",
        "urlname": "",
        "date": "2023-10-17 14:44:30",
        "updated": "2023-10-17 16:21:28"
      },
      "catalog": [],
      "body": "",
      "realName": "Elog使用",
      "relativePath": "/Elog使用.md"
    }
  ],
  "catalog": [
    {
      "id": "",
      "doc_id": "",
      "title": "Elog使用",
      "updated": 1697530888000,
      "createdAt": 1697525070000,
      "updatedAt": 1697530888000,
      "catalog": []
    }
  ]
}
// elog.config.js
module.exports = {
  write: {
    platform: 'feishu',
    yuque: {
      token: process.env.YUQUE_TOKEN,
      baseUrl: '',
      login: process.env.YUQUE_LOGIN,
      repo: process.env.YUQUE_REPO,
      onlyPublic: false,
      onlyPublished: true,
    },
    'yuque-pwd': {
      username: process.env.YUQUE_USERNAME,
      password: process.env.YUQUE_PASSWORD,
      host: '',
      login: process.env.YUQUE_LOGIN,
      repo: process.env.YUQUE_REPO,
      linebreak: false,
    },
    notion: {
      token: process.env.NOTION_TOKEN,
      databaseId: process.env.NOTION_DATABASE_ID,
      filter: false, // {property: 'status', select: {equals: '已发布'}}
      sorts: false, // [{timestamp: 'created_time', direction: 'descending'}],
      catalog: false,
    },
    feishu: {
      folderToken: '',
      appId: '',
      appSecret: '',
    },
    flowus: {
      tablePageId: process.env.FLOWUS_TABLE_PAGE_ID,
      filter: false, // {property: 'status',value: '已发布'}
      sort: false, // { property: 'createdAt', direction: 'descending' }
      catalog: false,
    },
  },
  deploy: {
    platform: 'local',
    local: {
      outputDir: './source/_posts',
      filename: 'title',
      format: 'markdown',
      catalog: false,
      formatExt: '',
    },
    confluence: {
      user: process.env.CONFLUENCE_USER,
      password: process.env.WORDPRESS_PASSWORD,
      endpoint: process.env.WORDPRESS_ENDPOINT,
      spaceKey: process.env.CONFLUENCE_SPACE_KEY,
      rootPageId: process.env.CONFLUENCE_ROOT_PAGE_ID, // 可选
      formatExt: '', // 可选
    },
    wordpress: {
      username: process.env.WORDPRESS_USERNAME,
      password: process.env.WORDPRESS_PASSWORD,
      endpoint: process.env.WORDPRESS_ENDPOINT,
      keyMap: {
        tags: 'tags',
        categories: 'categories',
        cover: 'cover',
        description: 'description',
      },
      formatExt: ''
    },
  },
  image: {
    enable: false,
    platform: 'local',
    local: {
      outputDir: './docs/images',
      prefixKey: '/images',
    },
    oss: {
      secretId: process.env.OSS_SECRET_ID,
      secretKey: process.env.OSS_SECRET_KEY,
      bucket: process.env.OSS_BUCKET,
      region: process.env.OSS_REGION,
      host: process.env.OSS_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    cos: {
      secretId: process.env.COS_SECRET_ID,
      secretKey: process.env.COS_SECRET_KEY,
      bucket: process.env.COS_BUCKET,
      region: process.env.COS_REGION,
      host: process.env.COS_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    qiniu: {
      secretId: process.env.QINIU_SECRET_ID,
      secretKey: process.env.QINIU_SECRET_KEY,
      bucket: process.env.QINIU_BUCKET,
      region: process.env.QINIU_REGION,
      host: process.env.QINIU_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    upyun: {
      user: process.env.UPYUN_USER,
      password: process.env.UPYUN_PASSWORD,
      bucket: process.env.UPYUN_BUCKET,
      host: process.env.UPYUN_HOST,
      prefixKey: '',
      secretExt: '', // 可选
    },
    github: {
      user: process.env.GITHUB_USER,
      token: process.env.GITHUB_TOKEN,
      repo: process.env.GITHUB_REPO,
      branch: '',
      host: '',
      prefixKey: '',
      secretExt: '', // 可选
    },
  },
}

image

看起来配置都很正常,从飞书导出的本地md文件是正常的标题吗?

commented

我这边试了下,文档都是正常导出的
image

commented

untitled 这个字符 看起来不像是elog处理中出现的问题

可以尝试 检查飞书导出到本地的md文档是否正常
如果本地md文档生成成功,那就说明elog导出功能正常
可以看下hexo中的配置是否正常,有可能是配置的问题

untitled 这个字符 看起来不像是elog处理中出现的问题

可以尝试 检查飞书导出到本地的md文档是否正常 如果本地md文档生成成功,那就说明elog导出功能正常 可以看下hexo中的配置是否正常,有可能是配置的问题

飞书导出到本地的文件是正常的,我检查一下hexo 的配置,非常感谢🌹🌹🌹

untitled 这个字符 看起来不像是elog处理中出现的问题

可以尝试 检查飞书导出到本地的md文档是否正常 如果本地md文档生成成功,那就说明elog导出功能正常 可以看下hexo中的配置是否正常,有可能是配置的问题

我尝试在md文件中添加 title,发现成功了 或者修改elog配置文件 deploy.local.format=matter-markdown
image

commented

哦对,是的。 hexo 的文章标题 取的是front-matter 中定义的title属性