Images & Acttachments
All images and file attachments in the document will be exported as local files when exported, and the links in the document will be organized. Basically, you don't need to worry about this.
All images and attachments in the document will be exported to the assets
folder of the directory where the document is located, and the extension will be implemented according to the type of file.
dist
├── docs
│ ├── assets
├── .cache
├── docs.json
Performance optimization
Since Feishu Pages exports the entire Feishu Knowledge Base from scratch every time it is exported, when there is a lot of content in the Knowledge Base, it may take a long time to wait. Especially the images and files are often large in size and require a long download time.
So Feishu Pages made a cache design for this type of file at the beginning of the design. The exported files will have a cache in the dist/.cache
directory. If they have been exported before, they will not be downloaded again, which can effectively save time.
Method A
If this design is used on GitHub Actions or GitLab CI, you may need to pay attention to configuring the dist/.cache
directory to the CI Cache, so that each execution can repurpose files that have been exported before.
For Example with GitHub Actions Cache, visit https://github.com/actions/cache to learn more.
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: dist/.cache
key: cache-dist
- name: Feishu Pages Export
env:
FEISHU_APP_ID: ${{ secrets.FEISHU_APP_ID }}
FEISHU_APP_SECRET: ${{ secrets.FEISHU_APP_SECRET }}
FEISHU_SPACE_ID: ${{ secrets.FEISHU_SPACE_ID }}
uses: longbridgeapp/feishu-pages@main
Method B
You can also be simpler, every time the exported dist
is always stored, for example, the exported content is directly submitted to the Git repository, each time the re-export, pull out the last time, so that the dist/.cache
directory can always be repurposed.