Export Feishu Knowledge Base to Static Sites with Feishu Pages

This guide explains how to export a Feishu knowledge base, configure required Feishu app permissions, set environment variables, and install the Feishu Pages npm package to generate a static website using a Markdown‑based static page generator, supporting CI/CD workflows.

Software Development Quality
Software Development Quality
Software Development Quality
Export Feishu Knowledge Base to Static Sites with Feishu Pages

Project Overview

Export a Feishu knowledge base and generate a static site using a Static Page Generator that supports Markdown organization. It leverages Feishu Docs' authoring capabilities so non‑technical users can write documentation without Markdown or Git, while still keeping CI workflow and GitHub PR review.

Features

feishu-docx – converts Feishu Docx to Markdown (currently only Markdown).

Customizable directory structure and URL paths.

Download images and attachments.

Internationalization support.

Integration with GitHub Actions.

Generates MDX meta information compatible with Docusaurus (using sidebar_position).

Preparation

Before using the tool, you must configure the Feishu Open Platform, obtain required credentials, and set appropriate permissions.

Create a Feishu app and enable permissions

Visit https://open.feishu.cn/app to create a new app and obtain App ID and App Secret (keep secret).

Enable the robot capability for the app.

Enable docx:document:readonly and wiki:wiki:readonly permissions.

Publish the app as a formal version and ensure approval.

Add the app as a robot to a Feishu IM group “Feishu Pages” and set the group as an administrator in the knowledge space settings.

Permissions

The tool requires the following Feishu API permissions:

docx:document:readonly
wiki:wiki:readonly
drive:drive:readonly

Obtain the Feishu knowledge base space_id

Set the environment variable FEISHU_SPACE_ID to the space_id extracted from the knowledge base settings URL (e.g., the numeric part of the URL).

Environment variable configuration

Feishu Pages reads a .env file in the project root. When used in GitHub Actions, add the variables as Secrets and reference them as environment variables.

Installation

Feishu Pages can be added to a static site project via npm.

cd your-project/
yarn add feishu-pages
yarn feishu-pages

Run the command after completing the Feishu Open Platform configuration.

Project Links

https://github.com/longbridgeapp/feishu-pages Demo site: https://longbridgeapp.github.io/feishu-pages
FeishuNode.jsdocumentationMarkdownGitHub Actionsstatic site
Software Development Quality
Written by

Software Development Quality

Discussions on software development quality, R&D efficiency, high availability, technical quality, quality systems, assurance, architecture design, tool platforms, test development, continuous delivery, continuous testing, etc. Contact me with any article questions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.