diff --git a/.github/sync.yml b/.github/sync.yml
new file mode 100644
index 0000000..a53588e
--- /dev/null
+++ b/.github/sync.yml
@@ -0,0 +1,6 @@
+# https://github.com/BetaHuhn/repo-file-sync-action
+# Synchronization for the.github repository
+openkf/openkf:
+ - source: ./
+ dest: ./
+ replace: true
\ No newline at end of file
diff --git a/.github/workflows/kubekf.yml b/.github/workflows/kubekf.yml
index 5e7bc78..520a444 100644
--- a/.github/workflows/kubekf.yml
+++ b/.github/workflows/kubekf.yml
@@ -16,7 +16,25 @@ name: OpenKF CI
on:
push:
+ branches:
+ - main
+ paths-ignore:
+ - "docs/**"
+ - "README.md"
+ - "README_zh-CN.md"
+ - "CONTRIBUTING.md"
pull_request:
+ branches:
+ - main
+ paths-ignore:
+ - "README.md"
+ - "README_zh-CN.md"
+ - "CONTRIBUTING.md"
+ - "docs/**"
+
+env:
+ GO_VERSION: "1.19"
+ GOLANGCI_VERSION: "v1.50.1"
jobs:
openkf:
@@ -74,15 +92,59 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- # skip for now
- # - name: Login to DockerHub
- # uses: docker/login-action@v1
- # with:
- # username: ${{ env.DOCKERHUB_USERNAME }}
- # password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- # skip for now
- # - name: Build docker images for host arch and push images to registry
- # run: |
- # set -e
- # make docker-push
+ lint:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Set up Go
+ uses: actions/setup-go@v3
+ with:
+ go-version: ${{ env.GO_VERSION }}
+
+ - name: golangci-lint
+ uses: golangci/golangci-lint-action@v3
+ with:
+ version: ${{ env.GOLANGCI_VERSION }}
+
+ docker-image-tests:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Set up Go
+ uses: actions/setup-go@v3
+ with:
+ go-version: ${{ env.GO_VERSION }}
+
+ - name: Run tests
+ run: make build
+
+ - name: Test docker image
+ run: |
+ docker build -t openkf:ci-build .
+
+ goreleaser-test:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Set up Go
+ uses: actions/setup-go@v3
+ with:
+ go-version: ${{ env.GO_VERSION }}
+
+ - name: Run GoReleaser
+ uses: goreleaser/goreleaser-action@v4
+ with:
+ version: latest
+ args: release --clean --skip-publish --snapshot
\ No newline at end of file
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index bd2003b..fa161bd 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -25,7 +25,6 @@ on:
jobs:
stale:
-
runs-on: ubuntu-latest
permissions:
issues: write
diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml
new file mode 100644
index 0000000..d6e15bf
--- /dev/null
+++ b/.github/workflows/sync.yml
@@ -0,0 +1,39 @@
+# Copyright © 2023 KubeCub open source community. All rights reserved.
+# Licensed under the MIT License (the "License");
+# you may not use this file except in compliance with the License.
+
+# https://github.com/BetaHuhn/repo-file-sync-action
+name: Synchronize kubecub public code to other repositories
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ sync:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Run GitHub File Sync
+ uses: BetaHuhn/repo-file-sync-action@latest
+ with:
+ GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}"
+ CONFIG_PATH: .github/sync.yml
+ ORIGINAL_MESSAGE: true
+ SKIP_PR: true
+ COMMIT_EACH_FILE: false
+ COMMIT_BODY: "🤖 kubbot to synchronize the warehouse"
+ GIT_EMAIL: "3293172751ysy@gmail.com"
+ GIT_USERNAME: "kubbot"
+ PR_BODY: 👌 kubecub provides automated community services
+ REVIEWERS: |
+ kubbot
+ cubxxw
+ PR_LABELS: |
+ file-sync
+ automerge
+ ASSIGNEES: |
+ kubbot
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 60e1a00..fac1e01 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,7 +46,7 @@
### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-.idea
+.idea/
# User-specific stuff
.idea/**/workspace.xml
diff --git a/CHANGELOG/.chglog/CHANGELOG.tpl.md b/CHANGELOG/.chglog/CHANGELOG.tpl.md
new file mode 100644
index 0000000..56f2684
--- /dev/null
+++ b/CHANGELOG/.chglog/CHANGELOG.tpl.md
@@ -0,0 +1,62 @@
+# Version logging for OpenKF
+
+
+
+
+
+{{ if .Versions -}}
+
+## [Unreleased]
+
+{{ if .Unreleased.CommitGroups -}}
+{{ range .Unreleased.CommitGroups -}}
+### {{ .Title }}
+{{ range .Commits -}}
+- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
+{{ end }}
+{{ end -}}
+{{ end -}}
+{{ end -}}
+
+{{ range .Versions }}
+
+## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
+{{ range .CommitGroups -}}
+### {{ .Title }}
+{{ range .Commits -}}
+- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
+{{ end }}
+{{ end -}}
+
+{{- if .RevertCommits -}}
+### Reverts
+{{ range .RevertCommits -}}
+- {{ .Revert.Header }}
+{{ end }}
+{{ end -}}
+
+{{- if .MergeCommits -}}
+### Pull Requests
+{{ range .MergeCommits -}}
+- {{ .Header }}
+{{ end }}
+{{ end -}}
+
+{{- if .NoteGroups -}}
+{{ range .NoteGroups -}}
+### {{ .Title }}
+{{ range .Notes }}
+{{ .Body }}
+{{ end }}
+{{ end -}}
+{{ end -}}
+{{ end -}}
+
+{{- if .Versions }}
+[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
+{{ range .Versions -}}
+{{ if .Tag.Previous -}}
+[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
+{{ end -}}
+{{ end -}}
+{{ end -}}
\ No newline at end of file
diff --git a/CHANGELOG/.chglog/config.yml b/CHANGELOG/.chglog/config.yml
new file mode 100644
index 0000000..2073f5d
--- /dev/null
+++ b/CHANGELOG/.chglog/config.yml
@@ -0,0 +1,66 @@
+bin: git
+style: github
+template: CHANGELOG.tpl.md
+info:
+ title: CHANGELOG
+ repository_url: https://github.com/OpenIMSDK/OpenKF
+options:
+ tag_filter_pattern: '^v'
+ sort: "date"
+
+ commits:
+ filters:
+ Type:
+ - feat
+ - fix
+ - perf
+ - refactor
+ - docs
+ - test
+ - chore
+ - ci
+ - build
+
+ commit_groups:
+ group_by: Type
+ sort_by: Title
+ title_order:
+ - feat
+ - fix
+ - perf
+ - refactor
+ - docs
+ - test
+ - chore
+ - ci
+ - build
+
+ header:
+ pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
+ pattern_maps:
+ - Type
+ - Scope
+ - Subject
+
+ issues:
+ prefix:
+ - #
+
+ refs:
+ actions:
+ - Closes
+ - Fixes
+
+ merges:
+ pattern: "^Merge branch '(\\w+)'$"
+ pattern_maps:
+ - Source
+
+ reverts:
+ pattern: "^Revert \"([\\s\\S]*)\"$"
+ pattern_maps:
+ - Header
+
+ notes:
+ keywords:
+ - BREAKING CHANGE
\ No newline at end of file
diff --git a/CHANGELOG/CHANGELOG-0.1.md b/CHANGELOG/CHANGELOG-0.1.md
new file mode 100644
index 0000000..6a272d4
--- /dev/null
+++ b/CHANGELOG/CHANGELOG-0.1.md
@@ -0,0 +1,71 @@
+# Version logging for OpenKF
+
+
+
+
+
+
+## [Unreleased]
+
+### Docs
+- design openkf docs ([#68](https://github.com/OpenIMSDK/OpenKF/issues/68))
+- fix markdown link ([#65](https://github.com/OpenIMSDK/OpenKF/issues/65))
+- fix markdown link ([#64](https://github.com/OpenIMSDK/OpenKF/issues/64))
+- fix markdown link ([#63](https://github.com/OpenIMSDK/OpenKF/issues/63))
+
+### Feat
+- add COLOR_SUFFIX=033[0m # End all colors and special effects
+- Add register api with dao cmd. ([#73](https://github.com/OpenIMSDK/OpenKF/issues/73))
+- add logo file of Xx design
+- add logo file of Xx design
+- add logo file of Xx design
+- add roadmap file
+- add proposal file
+- modify issue-specification.md
+- add issue specification
+- issue20
+- add actions file
+- **main:** optimize deployment ([#36](https://github.com/OpenIMSDK/OpenKF/issues/36))
+- **main:** optimize deployment ([#36](https://github.com/OpenIMSDK/OpenKF/issues/36))
+- **main:** release script file ([#52](https://github.com/OpenIMSDK/OpenKF/issues/52))
+
+### Fix
+- docs link
+
+
+
+## v0.1.0 - 2023-07-05
+### Docs
+- update code owners file ([#50](https://github.com/OpenIMSDK/OpenKF/issues/50))
+- update README.md ([#43](https://github.com/OpenIMSDK/OpenKF/issues/43))
+- update readme and readme-zh ([#35](https://github.com/OpenIMSDK/OpenKF/issues/35))
+
+### Feat
+- Add hook interceptor & add cmd & some fix ([#24](https://github.com/OpenIMSDK/OpenKF/issues/24))
+- Support auto-signature. ([#49](https://github.com/OpenIMSDK/OpenKF/issues/49))
+- Add callback api. ([#45](https://github.com/OpenIMSDK/OpenKF/issues/45))
+- add a component to support rate limt control ([#29](https://github.com/OpenIMSDK/OpenKF/issues/29))
+- add prettier and eslint ([#18](https://github.com/OpenIMSDK/OpenKF/issues/18)) ([#30](https://github.com/OpenIMSDK/OpenKF/issues/30))
+- add script license ([#17](https://github.com/OpenIMSDK/OpenKF/issues/17))
+- Support send code with email. ([#15](https://github.com/OpenIMSDK/OpenKF/issues/15))
+- init plugin project. ([#14](https://github.com/OpenIMSDK/OpenKF/issues/14))
+- enhance automated review for codeowners ([#11](https://github.com/OpenIMSDK/OpenKF/issues/11))
+- init server project ([#5](https://github.com/OpenIMSDK/OpenKF/issues/5))
+- **main:** add swagger api make file ([#51](https://github.com/OpenIMSDK/OpenKF/issues/51))
+- **main:** unit test makefile ([#56](https://github.com/OpenIMSDK/OpenKF/issues/56))
+- **main:** initialize the OpenKF architecture
+
+### Fix
+- Fix doc links. ([#41](https://github.com/OpenIMSDK/OpenKF/issues/41))
+- Fix golang ci piplines and docs. ([#39](https://github.com/OpenIMSDK/OpenKF/issues/39))
+- cicd err tidy mod
+- golang ci
+- make fix ([#33](https://github.com/OpenIMSDK/OpenKF/issues/33))
+- Fix CONTRIBUTING. ([#28](https://github.com/OpenIMSDK/OpenKF/issues/28))
+- codeql token
+- **main:** fix cicd actions
+- **main:** optimize actions
+- **main:** optimize actions
+
+
+[Unreleased]: https://github.com/OpenIMSDK/OpenKF/compare/v0.1.0...HEAD
diff --git a/CHANGELOG/CHANGELOG.md b/CHANGELOG/CHANGELOG.md
new file mode 100644
index 0000000..2c1c330
--- /dev/null
+++ b/CHANGELOG/CHANGELOG.md
@@ -0,0 +1,23 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
++ [https://github.com/OpenIMSDK/OpenKF/releases](https://github.com/OpenIMSDK/OpenKF/releases)
+
+## command
+
+```bash
+git-chglog --tag-filter-pattern 'v2.0.*' -o CHANGELOG-2.0.md
+```
+
+## create next tag
+
+```bash
+git-chglog --next-tag 2.0.0 -o CHANGELOG.md
+git commit -am "release 2.0.0"
+git tag 2.0.0
+```
+
+## Release version logs
+
++ [OpenIM CHANGELOG-V0.1](CHANGELOG-0.1.md)
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 09f5fdc..7e5041a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,13 +8,24 @@ This document provides guidelines and best practices to help you contribute effe
## 📇Topics
-- [What we expect of you](#What-we-expect-of-you)
-- [Code of Conduct](#Code-of-Conduct)
-- [Getting Started](#Getting-Started)
-- [Style and Specification](#Style-and-Specification)
-- [Engage to help anything](#Engage-to-help-anything)
-- [Release version](#Release-version)
-- [Contact Us](#Contact-Us)
+- [Contributing to OpenKF](#contributing-to-openkf)
+ - [📇Topics](#topics)
+ - [What we expect of you](#what-we-expect-of-you)
+ - [Code of Conduct](#code-of-conduct)
+ - [Code and doc contribution](#code-and-doc-contribution)
+ - [Where should I start?](#where-should-i-start)
+ - [Design documents](#design-documents)
+ - [Getting Started](#getting-started)
+ - [Style and Specification](#style-and-specification)
+ - [Reporting security issues](#reporting-security-issues)
+ - [Reporting general issues](#reporting-general-issues)
+ - [Commit Rules](#commit-rules)
+ - [PR Description](#pr-description)
+ - [CI actions](#ci-actions)
+ - [Docs Contribution](#docs-contribution)
+ - [Engage to help anything](#engage-to-help-anything)
+ - [Release version](#release-version)
+ - [Contact Us](#contact-us)
@@ -356,7 +367,6 @@ Try your best to keep every function has been tested, it keeps the function beha
+ [README.md](https://github.com/OpenIMSDK/OpenKF/blob/main/README.md): This file includes the basic information and instructions for getting started with OpenKF.
+ [CONTRIBUTING.md](https://github.com/OpenIMSDK/OpenKF/blob/main/CONTRIBUTING.md): This file contains guidelines for contributing to OpenKF's codebase, such as how to submit issues, pull requests, and code reviews.
-+ [DEVELOPGUIDE.md](https://github.com/OpenIMSDK/OpenKF/blob/main/DEVELOPGUIDE.md): This file provides a more in-depth guide to developing OpenKF, including information on the project's architecture, coding conventions, and testing practices.
+ [Official Documentation](https://doc.rentsoft.cn/): This is the official documentation for OpenKF, which includes comprehensive information on all of its features, configuration options, and troubleshooting tips.
**Please obey the following rules to better format the docs, which would greatly improve the reading experience.**
diff --git a/DEVELOPGUIDE.md b/DEVELOPGUIDE.md
deleted file mode 100644
index e69de29..0000000
diff --git a/Makefile b/Makefile
index 8f64142..c374948 100644
--- a/Makefile
+++ b/Makefile
@@ -241,6 +241,7 @@ generate:
@cd $(SERVER_DIR) && $(GO) generate ./...
## lint: Run go lint against code.
+# go1.19+
.PHONY: lint
lint: tools.verify.golangci-lint
@echo "===========> Run golangci to lint source codes"
@@ -422,6 +423,11 @@ install.kubeconform:
install.gsemver:
@$(GO) install github.com/arnaud-deprez/gsemver@latest
+## install.hugo: Install hugo, used to generate website
+.PHONY: install.hugo
+install.hugo:
+ @$(GO) install github.com/gohugoio/hugo@latest
+
## install.git-chglog: Install git-chglog, used to generate changelog
.PHONY: install.git-chglog
install.git-chglog:
@@ -432,9 +438,14 @@ install.git-chglog:
install.github-release:
@$(GO) install github.com/github-release/github-release@latest
+## install.goreleaser: Install goreleaser, used to release go program
+.PHONY: install.goreleaser
+install.goreleaser:
+ @$(GO) install github.com/goreleaser/goreleaser@latest
+
## install.coscli: Install coscli, used to upload files to cos
# example: ./coscli cp/sync -r /root/workspaces/OpenIMSDK/OpenKF/ cos://OpenIMSDK-1306374445/code/ -e cos.ap-hongkong.myqcloud.com
-# https://cloud.tencent.com/document/product/436/71763
+# https://cloud.tencent.com/document/product/436/71763
# OpenIMSDK/*
# - code/
# - docs/
diff --git a/README.md b/README.md
index 5fa8c89..eb29d24 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
-
+
+
+
- ⭐️ OpenKF(Open Knowledge Flow) is an online intelligent customer service system. ⭐️
+ ⭐️ OpenKF(Open Knowledge Flow) is an online intelligent customer service system. ⭐️
+
diff --git a/README_zh-CN.md b/README_zh-CN.md
index c2c91cf..d62c7dc 100644
--- a/README_zh-CN.md
+++ b/README_zh-CN.md
@@ -1,82 +1,101 @@
-
-
- ⭐️ OpenKF(开放知识流)是一个在线客服系统。 ⭐️
-
-
-
-
-
-
-
-
-
-
-
-
-
+
⭐️ OpenKF(Open Knowledge Flow)是一款在线智能客服系统。⭐️
-
- English •
- 中文
-
+ English • 中文
-----
+
-## 🧩 特性
+## 🧩 强大的功能
-1. [OpenKF](https://github.com/OpenIMSDK/OpenKF) 是基于 [OpenIM](https://github.com/OpenIMSDK) 的开源客服系统。
+1. [OpenKF](https://github.com/OpenIMSDK/OpenKF) 是一款基于 [OpenIM](https://github.com/OpenIMSDK) 的开源客服系统。
2. 支持 LLM(本地知识库)客服。
-3. 支持多渠道客服,并易于与第三方系统集成。
-4. 易于部署和二次开发。
+3. 支持多渠道客服,并能与第三方系统轻松集成。
+4. 部署简单,便于二次开发。
## 🛫 快速开始
-> **注意**:您可以通过以下方式快速开始使用 OpenKF。
+> **注意**:您可以通过以下步骤快速开始使用 OpenKF。
### 📦 安装
-```bash
-git clone https://https://github.com/OpenIMSDK/OpenKF
+```
+bashCopy Codegit clone https://github.com/OpenIMSDK/OpenKF openkf && export openkf=$(pwd)/openkf && cd $openkf && make
```
### 🚀 运行
-```bash
-注意: 我们需要先启动后端
-cd server
-go run main.go
+> **注意**:首先需要运行后端服务器
-打开另一个命令行 输入以下命令
+```
+bashCopy Codemake build
+```
+
+> 打开另一个终端窗口,运行以下命令:
+
+```
+bashCopy Code# make dev
cd web
npm run dev
```
+### 📖 贡献者入门指南
+
+熟练使用 Makefile 可以确保项目的质量。
+
+```
+bashCopy Code用法: make ...
+
+目标:
+ all 构建所有必要的目标。🏗️
+ build 默认情况下构建二进制文件。🛠️
+ go.build 构建指定平台的二进制文件。👨💻
+ build-multiarch 为多个平台构建二进制文件。🌍
+ tidy 整理 go.mod 📦
+ style 代码样式 -> fmt,vet,lint 🎨
+ fmt 运行 go fmt 格式化代码。✨
+ vet 运行 go vet 静态检查代码。🔍
+ generate 运行 go generate 自动生成代码和文档。✅
+ lint 运行 go lint 静态分析代码。🔎
+ test 运行单元测试 ✔️
+ cover 运行带覆盖率的单元测试。🧪
+ docker-build 使用管理器构建 Docker 镜像。🐳
+ docker-push 使用管理器推送 Docker 镜像。🔝
+ docker-buildx-push 使用管理器和 buildx 推送 Docker 镜像。🚢
+ copyright-verify 验证文件的版权声明。📄
+ copyright-add 为所有文件添加版权声明。📝
+ swagger 生成 Swagger 文档。📚
+ serve-swagger 提供 Swagger 规范和文档。🌐
+ clean 清除所有构建结果。🧹
+ help 显示此帮助信息。ℹ️
+```
+
+> **注意**:强烈建议在提交代码之前运行 `make all`。🚀
+
+```
+bashCopy Codemake all
+```
+
## 🕋 架构图
-
+
-**MVC 架构设计:**
+**MVC 架构设计:**
-
+
## 🤖 文件目录说明
-目录规范化设计结构:
+目录结构规范化设计:
-```bash
-.
+```
+bashCopy Code.
├── assets
│ └── images
├── build
├── deploy
├── docs
-├── kf_plugins # 带有 LLM 的本地知识库
+├── kf_plugins # 含有 LLM 的本地知识库
│ ├── chat
│ ├── config
│ ├── data
@@ -104,24 +123,26 @@ npm run dev
## 🗓️ 社区会议
-我们希望任何人都能参与到我们的社区中来,我们提供礼品和奖励,并欢迎您在每个星期四的晚上加入我们。
+我们欢迎任何人参与我们的社区,我们会提供礼物和奖励,并欢迎您加入我们的每周四晚上的活动。
-我们在 [GitHub 讨论区](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) 中记录了每一次[双周会议](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting),我们的会议纪要写在 [Google 文档](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中。
+我们的会议在 [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 🎯 的 `openkf` 频道中,您可以搜索 openkf 频道加入。
+
+我们会将每次 [双周会议](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) 的记录保存在 [GitHub discussions](https://github.com/OpenIMSDK/OpenKF/discussions/categories/meeting) 中,会议纪要会写在 [Google Docs](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中。
## 🤼 贡献与开发
-OpenIMSDK 的目标是建立一个顶级的开源社区。我们有一套标准,可以在 [Community 仓库](https://github.com/OpenIMSDK/community) 中找到。
+OpenIMSDK 的目标是打造一个顶级的开源社区。我们有一套标准,在 [Community repository](https://github.com/OpenIMSDK/community) 中有详细说明。
-如果您想对此 OpenKF 仓库进行贡献,请阅读我们的 [贡献者文档](https://github.com/OpenIMSDK/OpenKF/blob/main/CONTRIBUTING.md)。
+如果您想为 OpenKF 贡献代码,请阅读我们的 [贡献者文档](https://github.com/OpenIMSDK/OpenKF/blob/main/CONTRIBUTING.md)。
-在开始之前,请确保您的更改是需要的。最好的方式是创建一个 [新的讨论](https://github.com/OpenIMSDK/OpenKF/discussions/new/choose) 或使用 [Slack 交流](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg),或者如果您发现了问题,请先进行 [报告](https://github.com/OpenIMSDK/OpenKF/issues/new/choose)。
+在开始之前,请确保您的更改是需要的。最好先创建一个 [新的讨论](https://github.com/OpenIMSDK/OpenKF/discussions/new/choose) 或通过 [Slack 进行沟通](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg),或者如果您发现问题,请首先 [报告问题](https://github.com/OpenIMSDK/OpenKF/issues/new/choose)。
## 🚨 许可证
-OpenIMSDK 在 Apache 2.0 许可证下发布。完整的许可证文本请参阅 [LICENSE](https://github.com/OpenIMSDK/OpenKF/tree/main/LICENSE)。
+OpenIMSDK 使用 Apache 2.0 许可证。完整的许可证文本请参见 [LICENSE](https://github.com/OpenIMSDK/OpenKF/tree/main/LICENSE)。
+
+此存储库中显示的 OpenKF 标志(包括其变体和动画版本),存储在 [OpenKF](https://github.com/OpenIMSDK/openkf) 的 [assets/logo](https://chat.jinshutuan.com/assets/logo) 和 [assets/logo-gif](https://chat.jinshutuan.com/assets/logo-gif) 目录下,受版权法保护。
## 🔮 感谢我们的贡献者!
-
-
-
+
\ No newline at end of file
diff --git a/assets/logo-gif/LICENSE b/assets/logo-gif/LICENSE
new file mode 100644
index 0000000..015750f
--- /dev/null
+++ b/assets/logo-gif/LICENSE
@@ -0,0 +1 @@
+# The OpenKF logo files are licensed under a choice of either Apache-2.0 or CC-BY-4.0 (Creative Commons Attribution 4.0 International).
\ No newline at end of file
diff --git a/assets/logo/LICENSE b/assets/logo/LICENSE
new file mode 100644
index 0000000..015750f
--- /dev/null
+++ b/assets/logo/LICENSE
@@ -0,0 +1 @@
+# The OpenKF logo files are licensed under a choice of either Apache-2.0 or CC-BY-4.0 (Creative Commons Attribution 4.0 International).
\ No newline at end of file
diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS
index 05ce40a..bed4818 100644
--- a/docs/CODEOWNERS
+++ b/docs/CODEOWNERS
@@ -2,10 +2,10 @@
# Each line is a file pattern followed by one or more owners.
# README files
-README.md @cubxxw @kubbot @AllianceTing @IRONICBo @MC-kanon @AllianceTing @charles-chenzz @Cathay-Chen @plutoyty
+README.md @openimsdk/openim @cubxxw @kubbot @AllianceTing @IRONICBo @MC-kanon @AllianceTing @charles-chenzz @Cathay-Chen @plutoyty
# Contributing guidelines
-CONTRIBUTING.md @kubbot @cubxxw @IRONICBo @AllianceTing @plutoyty @fodedoumbouya
+CONTRIBUTING.md @openimsdk/openim @kubbot @cubxxw @IRONICBo @AllianceTing @plutoyty @fodedoumbouya
# License files
LICENSE @kubbot @cubxxw @IRONICBo @fodedoumbouya
@@ -20,10 +20,10 @@ assets/* @AllianceTing @IRONICBo @cubxxw @MC-kanon
deploy/* @IRONICBo @cubxxw @kubbot @MC-kanon @charles-chenzz
# Server directory
-server/* @AllianceTing @cubxxw @IRONICBo @liumingsongning @Cathay-Chen @charles-chenzz @hanzhixiao @plutoyty
+server/* @openimsdk/openim @AllianceTing @cubxxw @IRONICBo @liumingsongning @Cathay-Chen @charles-chenzz @hanzhixiao @plutoyty
# Web directory
-web/* @AllianceTing @MC-kanon @IRONICBo @liumingsongning @plutoyty
+web/* @openimsdk/openim @AllianceTing @MC-kanon @IRONICBo @liumingsongning @plutoyty
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
@@ -35,12 +35,12 @@ web/* @AllianceTing @MC-kanon @IRONICBo @liumingsongning @plutoyty
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
-*.js @cubxxw @kubbot @IRONICBo @MC-kanon @AllianceTing @liumingsongning
+*.js @openimsdk/openim @cubxxw @kubbot @IRONICBo @MC-kanon @AllianceTing @liumingsongning
# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.
-*.go 3293172751nss@gmail.com @IRONICBo @AllianceTing @eurecalulu @hanzhixiao @liumingsongning @Cathay-Chen @charles-chenzz @plutoyty @fodedoumbouya
+*.go @openimsdk/openim 3293172751nss@gmail.com @IRONICBo @AllianceTing @eurecalulu @hanzhixiao @liumingsongning @Cathay-Chen @charles-chenzz @plutoyty @fodedoumbouya
*.py 3293172751nss@gmail.com @IRONICBo @AllianceTing @eurecalulu @liumingsongning @plutoyty
# Teams can be specified as code owners as well. Teams should
diff --git a/docs/OWNERS b/docs/OWNERS
deleted file mode 100644
index a9521f7..0000000
--- a/docs/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-reviewers:
- - cubxxw
-approvers:
- - cubxxw
\ No newline at end of file
diff --git a/docs/website/.gitignore b/docs/website/.gitignore
index e69de29..7ca9ac0 100644
--- a/docs/website/.gitignore
+++ b/docs/website/.gitignore
@@ -0,0 +1,16 @@
+### Hugo ###
+# Generated files by hugo
+/public/
+/resources/_gen/
+/assets/jsconfig.json
+hugo_stats.json
+
+# Executable may be added to repository
+hugo.exe
+hugo.darwin
+hugo.linux
+
+# Temporary lock file while building
+/.hugo_build.lock
+
+# End of https://www.toptal.com/developers/gitignore/api/hugo
diff --git a/docs/website/Makefile b/docs/website/Makefile
index 28e0d44..1467404 100644
--- a/docs/website/Makefile
+++ b/docs/website/Makefile
@@ -1,18 +1,32 @@
+HUGO_VERSION = $(shell grep ^HUGO_VERSION netlify.toml | tail -n 1 | cut -d '=' -f 2 | tr -d " \"\n")
+NODE_BIN = node_modules/.bin
+NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda
+
+# The CONTAINER_ENGINE variable is used for specifying the container engine. By default 'docker' is used
+# but this can be overridden when calling make, e.g.
+# CONTAINER_ENGINE=podman make container-image
+CONTAINER_ENGINE ?= docker
+IMAGE_REGISTRY ?= gcr.io/k8s-staging-sig-docs
+IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile | cut -c 1-12)
+CONTAINER_IMAGE = $(IMAGE_REGISTRY)/k8s-website-hugo:v$(HUGO_VERSION)-$(IMAGE_VERSION)
+# Mount read-only to allow use with tools like Podman in SELinux mode
+# Container targets don't need to write into /src
+CONTAINER_RUN = "$(CONTAINER_ENGINE)" run --rm --interactive --tty --volume "$(CURDIR):/src:ro,Z"
+
+CCRED=\033[0;31m
+CCEND=\033[0m
+
+# Docker buildx related settings for multi-arch images
+DOCKER_BUILDX ?= docker buildx
+
REPO_ROOT:=${CURDIR}/..
# setup go for managing hugo
-PATH:=$(shell cd $(REPO_ROOT) && . hack/build/setup-go.sh && echo "$${PATH}")
# go1.9+ can autodetect GOROOT, but if some other tool sets it ...
GOROOT:=
# enable modules
GO111MODULE=on
# disable CGO by default for static binaries
CGO_ENABLED=0
-export PATH GOROOT GO111MODULE CGO_ENABLED
-# work around broken PATH export
-SPACE:=$(subst ,, )
-SHELL:=env PATH=$(subst $(SPACE),\$(SPACE),$(PATH)) $(SHELL)
-
-# from https://github.com/kubernetes/website/blob/master/Makefile
DOCKER = docker
HUGO_VERSION = 0.60.0
DOCKER_IMAGE = jojomi/hugo:$(HUGO_VERSION)
@@ -23,15 +37,40 @@ HUGO_BIN:=$(REPO_ROOT)/bin/hugo
$(HUGO_BIN):
go build -o $(HUGO_BIN) github.com/gohugoio/hugo
-hugo: $(HUGO_BIN)
+.PHONY: help
+help: ## Show this help.
+ @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
+
+.PHONY: container-image
+module-check: ## Check if all of the required submodules are correctly initialized.
+ @git submodule status --recursive | awk '/^[+-]/ {err = 1; printf "\033[31mWARNING\033[0m Submodule not initialized: \033[34m%s\033[0m\n",$$2} END { if (err != 0) print "You need to run \033[32mmake module-init\033[0m to initialize missing modules first"; exit err }' 1>&2
+
+.PHONY: module-init
+module-init: ## Initialize required submodules.
+ @echo "Initializing submodules..." 1>&2
+ @git submodule update --init --recursive --depth 1
-serve: hugo
+all: build ## Build site with production settings and put deliverables in ./public
+
+.PHONY: build
+build: module-check ## Build site with non-production settings and put deliverables in ./public
+ $(HUGO_BIN) --cleanDestinationDir --minify --environment development
+
+.PHONY: build-preview
+build-preview: module-check ## Build site with drafts and future posts enabled
+ $(HUGO_BIN) --cleanDestinationDir --buildDrafts --buildFuture --environment preview
+
+.PHONY: functions-build
+functions-build: ## Build functions
+ $(NETLIFY_FUNC) build functions-src
+
+.PHONY: hugo
+hugo: $(HUGO_BIN) ## Build site with production settings and put deliverables in ./public
+ $(HUGO_BIN) --cleanDestinationDir --minify --environment production
+
+.PHONY: serve
+serve: hugo ## Serve site at http://localhost:1313/
$(HUGO_BIN) server --bind="0.0.0.0" \
--ignoreCache \
--buildFuture \
--disableFastRender
-
-build: hugo
- $(HUGO_BIN)
-
-.PHONY: build serve hugo
\ No newline at end of file
diff --git a/docs/website/README.md b/docs/website/README.md
new file mode 100644
index 0000000..ba05d8b
--- /dev/null
+++ b/docs/website/README.md
@@ -0,0 +1,123 @@
+# OpenKF's docs
+
+OpenKF's docs are built with [hugo](https://gohugo.io/), and can be browsed live at https://kind.sigs.k8s.io/
+
+To browse them locally, install hugo and run `make serve` from this directory.
+
+Read [tutorial](https://getdoks.org/docs/overview/introduction/), learning to use OpenKF document construction
+
+
+## File Directory Description
+
+| Directory | Description |
+| ---------- | ------------------------------------------------------------ |
+| archetypes | Directory for creating new content files with Hugo command. |
+| assets | Directory for storing files that need to be processed by Hugo Pipes. |
+| config | Directory for storing configuration directives in JSON, YAML, or TOML format. |
+| content | Directory for storing all the content of your website. Each top-level folder is considered a content section. |
+| data | Directory for storing configuration files that can be used by Hugo during website generation. |
+| layouts | Directory for storing template files specifying how to render content views in the static website. |
+| static | Directory for storing all static content such as images, CSS, JavaScript, etc. |
+| resources | Directory for caching files to speed up the generation process. |
+
+
+## Command
+
+> **Note**💡:
+> You can change the commands in the scripts section of `./package.json`.
+
+### create
+
+Create new content for your site:
+
+```bash
+npm run create [path] [flags]
+```
+
+See also the Hugo docs: [hugo new](https://gohugo.io/commands/hugo_new/).
+
+### Docs based tree
+
+Create a docs based tree — with a single command:
+
+```bash
+npm run create -- --kind docs [section]
+```
+
+For example, create a docs based tree named guides:
+
+```bash
+npm run create -- --kind docs guides
+```
+
+## lint
+
+Check scripts, styles, and markdown for errors:
+
+```bash
+npm run lint
+```
+
+### scripts
+
+Check scripts for errors:
+
+```bash
+npm run lint:scripts [-- --fix]
+```
+
+### styles
+
+Check styles for errors:
+
+```bash
+npm run lint:styles [-- --fix]
+```
+
+### markdown
+
+Check markdown for errors:
+
+```bash
+npm run lint:markdown [-- --fix]
+```
+
+## clean
+
+Delete temporary directories:
+
+```bash
+npm run clean
+```
+
+## start
+
+Start local development server:
+
+```bash
+npm run start
+```
+
+## build
+
+Build production website:
+
+```bash
+npm run build
+```
+
+### functions
+
+Build Lambda functions:
+
+```bash
+npm run build:functions
+```
+
+### preview
+
+Build production website including draft and future content:
+
+```bash
+npm run build:preview
+```
\ No newline at end of file
diff --git a/docs/website/theme.toml b/docs/website/theme.toml
new file mode 100644
index 0000000..54e93f1
--- /dev/null
+++ b/docs/website/theme.toml
@@ -0,0 +1,14 @@
+name = "Doks"
+license = "MIT"
+licenselink = "https://github.com/h-enk/doks/blob/master/LICENSE"
+description = "Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
+
+homepage = "https://github.com/h-enk/doks"
+demosite = "https://doks.netlify.app"
+
+tags = ["landing page", "documentation", "blog", "minimal", "modern", "customizable", "search", "dark mode", "bootstrap"]
+features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "dark mode"]
+
+[author]
+ name = "Henk Verlinde"
+ homepage = "https://henkverlinde.com"
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..3e48468
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,6 @@
+{
+ "name": "openkf",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {}
+}