Scripts2026年4月10日·1 分钟阅读

Outline — Fast Knowledge Base for Growing Teams

Outline is a beautiful, real-time collaborative knowledge base and wiki. Markdown editor, nested documents, integrations with Slack and Figma, and full-text search.

SC
Script Depot · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

git clone https://github.com/outline/outline.git
cd outline
cp .env.sample .env
# Edit .env with your settings
docker compose up -d

Open http://localhost:3000 — login and create your first collection.

介绍

Outline is a fast, beautiful knowledge base and wiki designed for growing teams. It provides a Notion-like editing experience with real-time collaboration, nested document structure, full-text search, and integrations with tools like Slack, Figma, and Google Docs — all self-hostable for complete data ownership.

With 38K+ GitHub stars and BSL license (converts to Apache-2.0 after 4 years), Outline is one of the most polished open-source wiki solutions, competing directly with Notion and Confluence on UX quality.

What Outline Does

  • Rich Editor: Markdown-based editor with slash commands, embeds, and real-time collaboration
  • Nested Documents: Infinite nesting with drag-and-drop reordering
  • Collections: Organize documents into team spaces (Engineering, Product, HR, etc.)
  • Full-Text Search: Lightning-fast search across all documents
  • Templates: Create document templates for recurring content types
  • Comments: Inline and page-level commenting with @mentions
  • Revision History: Full version history with visual diff and restore
  • API: Complete REST API for automation and integration
  • Integrations: Slack, Figma, Loom, Diagrams.net, Google Docs embed

Architecture

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  Browser     │────▶│  Outline     │────▶│  PostgreSQL  │
│  (React)     │     │  Server      │     │  (Data)      │
└──────────────┘     │  (Node.js)   │     └──────────────┘
                     └──────┬───────┘
                            │
                  ┌─────────┼─────────┐
                  │         │         │
           ┌──────┴──┐ ┌───┴───┐ ┌───┴───┐
           │  Redis  │ │ MinIO │ │  OIDC  │
           │ (Cache) │ │(Files)│ │ (Auth) │
           └─────────┘ └───────┘ └────────┘

Self-Hosting

Docker Compose

services:
  outline:
    image: outlinewiki/outline:latest
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgres://outline:outline@postgres:5432/outline
      REDIS_URL: redis://redis:6379
      SECRET_KEY: generated-secret-key
      UTILS_SECRET: generated-utils-secret
      URL: http://localhost:3000
      FILE_STORAGE: local
      FILE_STORAGE_LOCAL_ROOT_DIR: /var/lib/outline/data
      # Auth (choose one): Slack, Google, OIDC, SAML
      OIDC_CLIENT_ID: your-client-id
      OIDC_CLIENT_SECRET: your-client-secret
      OIDC_AUTH_URI: https://auth.yourdomain.com/authorize
      OIDC_TOKEN_URI: https://auth.yourdomain.com/token
      OIDC_USERINFO_URI: https://auth.yourdomain.com/userinfo
    depends_on:
      - postgres
      - redis
    volumes:
      - outline-data:/var/lib/outline/data

  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: outline
      POSTGRES_PASSWORD: outline
      POSTGRES_DB: outline
    volumes:
      - pg-data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine

volumes:
  outline-data:
  pg-data:

Key Features

Slash Commands Editor

Type / to access:

/heading    — Insert heading (H1-H3)
/list       — Bullet or numbered list
/todo       — Task/checkbox list
/table      — Insert table
/code       — Code block with syntax highlighting
/image      — Upload or embed image
/embed      — Embed YouTube, Figma, Loom, etc.
/diagram    — Draw.io diagram
/math       — LaTeX math equation
/notice     — Info/warning/tip callout box
/divider    — Horizontal divider

Collections & Structure

Knowledge Base
├── 📘 Engineering
│   ├── Architecture Decisions
│   │   ├── ADR-001: Database Choice
│   │   └── ADR-002: API Design
│   ├── Runbooks
│   │   ├── Deploy to Production
│   │   └── Database Migration
│   └── Onboarding
│       ├── Day 1 Setup
│       └── Week 1 Checklist
├── 📗 Product
│   ├── PRDs
│   ├── Research
│   └── Roadmap
└── 📕 Company
    ├── Handbook
    ├── Policies
    └── Benefits

Integrations

Integration Feature
Slack Search wiki from Slack, post notifications
Figma Embed live Figma designs
Loom Embed video recordings
Google Docs Import/embed docs
Diagrams.net Draw diagrams inline
Mermaid Code-based diagrams
GitHub Embed code snippets

API

# Search documents
curl -X POST https://outline.yourdomain.com/api/documents.search 
  -H "Authorization: Bearer YOUR_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{"query": "deployment guide"}'

# Create document
curl -X POST https://outline.yourdomain.com/api/documents.create 
  -H "Authorization: Bearer YOUR_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{"title": "New Guide", "text": "# Getting Started

Welcome!", "collectionId": "collection-uuid", "publish": true}'

Outline vs Alternatives

Feature Outline Notion Confluence Docmost
Open Source BSL (→ Apache) No No Yes (AGPL)
Self-hosted Yes No Data Center Yes
Real-time collab Yes Yes Yes Yes
Markdown Native Partial No Yes
Slash commands Yes Yes No Yes
API Full REST Full REST REST REST
Integrations Slack, Figma 50+ Atlassian Basic
UX quality Excellent Excellent Good Good

常见问题

Q: Outline 的 BSL 许可证意味着什么? A: BSL(Business Source License)允许自由使用和修改,但限制作为托管服务提供给第三方。4 年后自动转为 Apache-2.0。对于自托管使用没有任何限制。

Q: 必须用 SSO 登录吗? A: 是的,Outline 需要 OAuth/OIDC 认证提供者(Slack、Google、自托管 OIDC 如 Keycloak/Authentik)。不支持简单的邮箱密码登录。这是设计决策,确保企业级安全性。

Q: 可以从 Notion/Confluence 迁移吗? A: 可以。Outline 支持从 Confluence(XML 导出)和 Notion(Markdown 导出)导入。也支持从 Markdown 文件批量导入。

来源与致谢

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产