This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git
The following commit(s) were added to refs/heads/main by this push:
new d6e9a5956 Blog plugin translation (#220)
d6e9a5956 is described below
commit d6e9a595656f71f653d6f211bd4234d72414e752
Author: Anne <[email protected]>
AuthorDate: Tue Jul 16 15:25:15 2024 +0800
Blog plugin translation (#220)
Please kindly check it. Not a developer here, so feel free to edit if
there's lost in translation.
Thanks!
---------
Co-authored-by: shuai <[email protected]>
---
.../01.webp | Bin 0 -> 21466 bytes
.../2.1.1.webp | Bin 0 -> 74910 bytes
.../2.1.2.webp | Bin 0 -> 72350 bytes
.../2.1.3.webp | Bin 0 -> 38504 bytes
.../2.1.4.webp | Bin 0 -> 8420 bytes
.../2.2.1.webp | Bin 0 -> 100920 bytes
.../2.2.2.webp | Bin 0 -> 70712 bytes
.../2.2.3.webp | Bin 0 -> 41262 bytes
.../2.2.4.webp | Bin 0 -> 8714 bytes
.../active-plugin.webp | Bin 0 -> 19656 bytes
.../docker-build.webp | Bin 0 -> 44858 bytes
.../formula-res.webp | Bin 0 -> 7998 bytes
.../index.md | 218 +++++++++++++++++++++
.../installation.webp | Bin 0 -> 26806 bytes
.../installed-formula.webp | Bin 0 -> 15954 bytes
.../installed-plugins.webp | Bin 0 -> 24842 bytes
.../local-init.webp | Bin 0 -> 13244 bytes
.../make-ui-01.webp | Bin 0 -> 54440 bytes
.../make-ui-02.webp | Bin 0 -> 74122 bytes
.../make-ui-03.webp | Bin 0 -> 34304 bytes
.../new-answer.webp | Bin 0 -> 13452 bytes
blog/authors.yml | 6 +
.../01.webp | Bin 0 -> 21466 bytes
.../2.1.1.webp | Bin 0 -> 74910 bytes
.../2.1.2.webp | Bin 0 -> 72350 bytes
.../2.1.3.webp | Bin 0 -> 38504 bytes
.../2.1.4.webp | Bin 0 -> 8420 bytes
.../2.2.1.webp | Bin 0 -> 100920 bytes
.../2.2.2.webp | Bin 0 -> 70712 bytes
.../2.2.3.webp | Bin 0 -> 41262 bytes
.../2.2.4.webp | Bin 0 -> 8714 bytes
.../active-plugin.webp | Bin 0 -> 19656 bytes
.../docker-build.webp | Bin 0 -> 44858 bytes
.../formula-res.webp | Bin 0 -> 7998 bytes
.../index.md | 205 +++++++++++++++++++
.../installation.webp | Bin 0 -> 26806 bytes
.../installed-formula.webp | Bin 0 -> 15954 bytes
.../installed-plugins.webp | Bin 0 -> 24842 bytes
.../local-init.webp | Bin 0 -> 13244 bytes
.../make-ui-01.webp | Bin 0 -> 54440 bytes
.../make-ui-02.webp | Bin 0 -> 74122 bytes
.../make-ui-03.webp | Bin 0 -> 34304 bytes
.../new-answer.webp | Bin 0 -> 13452 bytes
.../docusaurus-plugin-content-blog/authors.yml | 6 +
static/img/blog/[email protected] | Bin 0 -> 11422 bytes
static/img/blog/[email protected] | Bin 0 -> 23782 bytes
static/img/blog/[email protected] | Bin 0 -> 12510 bytes
static/img/blog/[email protected] | Bin 0 -> 27017 bytes
48 files changed, 435 insertions(+)
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/01.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/01.webp
new file mode 100644
index 000000000..652e7613e
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/01.webp differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.1.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.1.webp
new file mode 100644
index 000000000..978e9efc3
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.1.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.2.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.2.webp
new file mode 100644
index 000000000..e049c84b4
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.2.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.3.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.3.webp
new file mode 100644
index 000000000..0bbcc95de
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.3.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.4.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.4.webp
new file mode 100644
index 000000000..8b8fc4d3d
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.4.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.1.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.1.webp
new file mode 100644
index 000000000..67ac3bfb8
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.1.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.2.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.2.webp
new file mode 100644
index 000000000..7fdb7df58
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.2.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.3.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.3.webp
new file mode 100644
index 000000000..95c8f1c6e
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.3.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.4.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.4.webp
new file mode 100644
index 000000000..a0c33b9d1
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.4.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/active-plugin.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/active-plugin.webp
new file mode 100644
index 000000000..d6791e7bd
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/active-plugin.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/docker-build.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/docker-build.webp
new file mode 100644
index 000000000..fdc7470e3
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/docker-build.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/formula-res.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/formula-res.webp
new file mode 100644
index 000000000..d6a862425
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/formula-res.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/index.md
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/index.md
new file mode 100644
index 000000000..375ae499d
--- /dev/null
+++ b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/index.md
@@ -0,0 +1,218 @@
+---
+title: "How to How to Package and Deploy Answer Plugins"
+authors: [shuai]
+category: Tutorials
+featured: false
+image: [email protected]
+description: "Follow this step-by-step guide to package plugins for your
Answer."
+
+---
+
+We’ve noticed that some users are struggling to package Answer plugins. It
might be frustrating since the doc [using
plugins](https://answer.apache.org/docs/plugins/) doesn’t contain successful
packaging examples.
+
+In this blog, we’ll guide you through the process of packing your Answer
plugin with step-by-step tutorial.
+
+## Getting Started
+
+To get started, please make sure you have a development environment set up
with the following: Node.js, pnpm, Docker, Go etc. Don’t forget to check the
official documentation for [development
guide](https://answer.apache.org/docs/development/).
+
+## Notice
+
+**Skip this section if you’re using the latest code.**
+
+In Answer 1.3.5, the plugin build process and some plugin commands have been
adjusted. If you are using code from before 1.3.5, you need to change the basic
information of some internal plugins. The plugins involved are:
+
+1. editor-chart
+2. editor-formula
+3. embed-basic (only available 1.3.5 and later)
+
+Find the [commit
ID](https://github.com/apache/incubator-answer-plugins/commit/e224fee9b8a0b936e143e852050d9345aa249201)
for the plugin you need to update. In its package.json files, the hyphens (-)
in the plugin name with underscores (\_). For instance:
+
+
+## I. Build Docker Images with Plugins
+There’re two ways to build Docker images with plugins:
+1. Answer Base Image
+2. Local Code
+
+
+### Build from Answer Base Image
+If there’s no need to modify Answer's source code, you can build directly from
official base images. Please check our
[docs](https://answer.apache.org/docs/plugins/#build-with-plugin-from-answer-base-image)
on building with plugin from answer base image.
+
+### Build Docker Images From Local Code
+Please keep local code up-to-date. The steps are as below:
+
+1. **Add Pluins**:Edit `/script/plugin_list` (root directory) and add plugin
repository URLs (one per line).
+2. **Build Docker Image**:Run command: `docker build -t <image_name[:tag]> .` .
+3. **Launch and Verify**:Wait for build to finish, then run `docker run -d -p
9080:80 -v answer-data:/data --name <container_name> <image_name>`, then verify
plugins in Answer 。
+
+### 1.Add Required Plugins
+```
+github.com/apache/incubator-answer-plugins/connector-basic@latest
+github.com/apache/incubator-answer-plugins/reviewer-basic@latest
+github.com/apache/incubator-answer-plugins/captcha-basic@latest
+github.com/apache/incubator-answer-plugins/editor-formula@latest
+
+```
+
+### 2.Build Docker Image
+
+The build process may take some time.
+
+
+### 3.Local Start up and Verification
+Run the following command to start locally and follow the
[documentation](https://answer.apache.org/docs/installation#install-steps) to
complete initialization.
+
+```
+docker run -d -p 9080:80 -v answer-data:/data --name answer101 answer-plugin
+```
+
+After initialization, log in to the admin panel and see if the plugin runs
correctly.
+
+Admin Panel
+
+
+Activate the Plugin
+
+
+Verify Plugin(editor-formula) Functionality:
+
+
+
+## II. Build a Binary with Plugins
+
+Here, we will walk you through the process of building an Apache Answer binary
that includes specific plugins. The process involves building the base binary,
incorporating the required plugins, locally verifying the plugins, and finally
deploying the binary.
+
+### Steps
+1. Build Base Binary
+2. Build Plugin Binary
+3. Verify
+4. Deploy
+
+### 1.Build Base Binary
+
+Start with building the front-end static resources using the command `make ui`.
+
+Output:
+1. Installing Dependencies
+
+2. Dependency InstallationBuilding Static Resources after Dependency
Installation
+
+
+To build the base binary, run `make build`. If the build is successful, the
answer binary will be generated in the project root directory.
+
+If you encounter errors related to Go dependency installation, you can try
running `go mod download` locally to see if the installation is successful. If
it still fails, consider configuring a domestic mirror: https://goproxy.cn/ or
enabling a network proxy.
+
+Success:
+
+
+### 2.Build a Binary File with the Required Plugins Using the Base Binary File
+
+Please view [Answer plugin
docs](https://answer.apache.org/docs/plugins/#binary-build).
+```
+# answer build --with [plugin@plugin_version=[replacement]] --output [file]
+$ ./answer build --with
github.com/apache/incubator-answer-plugins/connector-github
+
+# build a new answer with github login plugin then output to ./new_answer.
+$ ./answer build --with
github.com/apache/incubator-answer-plugins/[email protected] --output
./new_answer
+
+# with multiple plugins
+$ ./answer build \
+--with github.com/apache/incubator-answer-plugins/connector-github \
+--with github.com/apache/incubator-answer-plugins/connector-google
+
+# with local plugins
+$ ./answer build --with
github.com/apache/incubator-answer-plugins/[email protected]=/my-local-space
+
+# cross compilation. Build a linux-amd64 binary in macos
+$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./answer build --with
github.com/apache/incubator-answer-plugins/connector-github
+
+# specify the answer version using ANSWER_MODULE environment variable
+$ ANSWER_MODULE=github.com/apache/[email protected] ./answer build
--with github.com/apache/incubator-answer-plugins/connector-github
+```
+
+可以根据文档上的提示来选择所需要的插件,打包插件的会重新构建前端静态资源,插件可能有特有的依赖项,所以这里会重新执行依赖安装跟构建。构建成功后会在更目录生成
`new_answer` 二进制文件。
+
+You can choose the required plugins according to the instructions in the
documentation. Compiling plugins will rebuild the front-end static resources.
Plugins may have special dependencies, so dependency installation and
compilation will be performed again here. After successful compilation, the
`new_answer` binary file will be generated in the dist directory.
+
+
+Example:
+
+
+#### 2.1.Build Single Plugin
+
+
+`./answer build --with
github.com/apache/incubator-answer-plugins/connector-github`
+
+Effect:
+
+
+
+
+
+
+Verify plugin installation command: `./new_answer plugin`.
+
+
+
+
+#### 2.2.Build Single Plugin Using Local Plugin Code
+
+如果需要调整插件的一些信息或者使用自己实现的私有插件来构建,需要使用 `with local plugins` 命令来构建,比如上面提到的
`editor-formula` 插件,并且使用的 Answer 代码版本是小于 1.3.5
的,所以需要调整插件的一些信息,这种情况就需要使用该命令来完成构建。
+
+If you need to modify some plugin information or build a plugin using your own
private implementation, you need to use the command `with local plugins`. For
example, the `editor-formula` plugin mentioned above is compatible with Answer
versions below 1.3.5, so you need to modify some plugin information. In this
case, you can use the following command to build the plugin:
+
+`./answer build --with
github.com/apache/incubator-answer-plugins/[email protected]=/Users/shuai/answer/plugins/editor-formula`
+
+Output:
+
+
+
+
+
+
+Verify plugin installation command: `./new_answer plugin`.
+
+
+
+
+#### 2.3.Build Multiple Plugins
+The process for building multiple plugins is similar to building a single
plugin. Please kindly refer to building single plugin and try it yourself.
+
+
+### 3.Verify Plugins Locally
+
+使用命令行验证只是确保插件已经打进去了,想要查看插件是否能正常运行,可以本地运行生成的二进制文件进行查看,二进制运行[文档](https://answer.apache.org/docs/installation)
+, 按照文档步骤初始化完信息。注意这里需要运行的是 new_answer
二进制,所以命令行中的 ./answer 需要使用 ./new_answer
+
+Using the command line only ensures that the plugins have been installed. To
check if the plugins are running correctly, you can run the generated binary
file locally. Please refer to the [installation
documentation](https://answer.apache.org/docs/installation) for instructions on
initializing the information.
+
+
+Please pay attention that you need to run the new_answer binary, so replace
./answer with ./new_answer in the command line.
+
+
+### 4.Steps for Local Verification
+
+1. Initialization Complete
+For example: `INSTALL_PORT=80 ./new_answer init -C ./answer-data`
+
+
+
+Access [http://localhost:80/install/](http://localhost:80/install/) and follow
the [instructions](https://answer.apache.org/docs/installation#install-steps)
to complete the initialization process.
+
+2. Update Information
+Run the command `./new_answer upgrade -C ./answer-data/`
+
+3. Start the Local Website
+ Run `./new_answer run -C ./answer-data/`, access `http://localhost/`. Log
in and go `http://localhost/admin` to activate and verify the plugin.
+
+Here’s an example of editor-formula plugin.
+
+
+
+
+At this point, you can make sure that the plugin has been built correctly and
running.
+
+
+### 5.Deploy the Binary
+
+If your website is deployed using a binary, you can now deploy the generated
binary file. If you need to adapt to different platforms, you can use the
cross-compilation commands in the documentation to build the binary file.
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installation.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installation.webp
new file mode 100644
index 000000000..101258320
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installation.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-formula.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-formula.webp
new file mode 100644
index 000000000..70aa4c05d
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-formula.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-plugins.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-plugins.webp
new file mode 100644
index 000000000..5b308847d
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-plugins.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/local-init.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/local-init.webp
new file mode 100644
index 000000000..3d1f9d9e1
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/local-init.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-01.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-01.webp
new file mode 100644
index 000000000..11b120e4c
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-01.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-02.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-02.webp
new file mode 100644
index 000000000..579eb2675
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-02.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-03.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-03.webp
new file mode 100644
index 000000000..c6702af7c
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-03.webp
differ
diff --git
a/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/new-answer.webp
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/new-answer.webp
new file mode 100644
index 000000000..854d2bd9c
Binary files /dev/null and
b/blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/new-answer.webp
differ
diff --git a/blog/authors.yml b/blog/authors.yml
index a760dd285..ebdb55c92 100644
--- a/blog/authors.yml
+++ b/blog/authors.yml
@@ -15,3 +15,9 @@ fenbox:
title: Product Designer
url: https://github.com
image_url: https://avatars.githubusercontent.com/u/360618?v=4
+
+shuai:
+ name: Shuai
+ title: Developer
+ url: https://github.com/shuashuai
+ image_url: https://avatars.githubusercontent.com/u/30591202?v=4
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/01.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/01.webp
new file mode 100644
index 000000000..652e7613e
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/01.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.1.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.1.webp
new file mode 100644
index 000000000..978e9efc3
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.1.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.2.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.2.webp
new file mode 100644
index 000000000..e049c84b4
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.2.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.3.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.3.webp
new file mode 100644
index 000000000..0bbcc95de
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.3.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.4.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.4.webp
new file mode 100644
index 000000000..8b8fc4d3d
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.1.4.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.1.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.1.webp
new file mode 100644
index 000000000..67ac3bfb8
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.1.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.2.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.2.webp
new file mode 100644
index 000000000..7fdb7df58
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.2.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.3.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.3.webp
new file mode 100644
index 000000000..95c8f1c6e
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.3.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.4.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.4.webp
new file mode 100644
index 000000000..a0c33b9d1
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/2.2.4.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/active-plugin.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/active-plugin.webp
new file mode 100644
index 000000000..d6791e7bd
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/active-plugin.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/docker-build.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/docker-build.webp
new file mode 100644
index 000000000..fdc7470e3
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/docker-build.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/formula-res.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/formula-res.webp
new file mode 100644
index 000000000..d6a862425
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/formula-res.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/index.md
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/index.md
new file mode 100644
index 000000000..1c82ea4e6
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/index.md
@@ -0,0 +1,205 @@
+---
+title: "Apache Answer 使用插件详细教程"
+authors: [shuai]
+category: Tutorials
+featured: false
+image: [email protected]
+description: "手把手教你如何使用 Answer 插件"
+
+---
+
+在最近的的社区反馈中,部分用户反馈在使用 Answer 插件的过程中,不知道如何将插件打包进入 Answer 系统中,[Answer
插件构建文档](https://answer.apache.org/docs/plugins/)中也没有提示正确结果的示例,所以对于一些非专业的开发者造成了一些困扰,所以本篇将作为一个详细教程,来手把手教会你正确打包
Answer 插件。
+
+### 开始之前
+
+在开始之前,请确保您已经配置好了基础的开发环境,包括 Node.js、pnpm、Docker、Go
等。同时,请确保您已经阅读了官方的[开发环境配置文档](https://answer.apache.org/docs/development)。
+
+### 注意
+
+**如果使用的是最新的代码这里可以直接跳过**
+
+在 1.3.5 版本中,对插架的构建流程及部分插件的命令有所调整,如果你用的是 1.3.5
版本之前的代码,需要更改部分插件内部的基础信息。具体涉及到的插件有:
+
+1. editor-chart
+2. editor-formula
+3. embed-basic (该插件 1.3.5版本后才有)
+
+更改的[commit
id](https://github.com/apache/incubator-answer-plugins/commit/e224fee9b8a0b936e143e852050d9345aa249201),
需要将对应的插件的 `package.json` 文件中的插件名称的 '-' 替换成 '_', 例如:
+
+
+## 一:构建包含插件的镜像
+
+构建包含插件的 docker 镜像有两种场景:
+1. 基于官方基础镜像构建
+2. 基于本地代码构建
+
+### 基于官方基础镜像构建
+
+如果您不需要对 Answer
的源码进行调整,可以直接基于官方基础镜像构建。具体步骤请参考[官方文档](https://answer.apache.org/docs/plugins/#build-with-plugin-from-answer-base-image)构建带有插件的
Docker 镜像,本文不做演示。
+
+### 基于本地代码构建 Docker 镜像总体步骤
+如果您对 Answer 的源码有调整,需要基于自己修改的代码进行构建。请保持本地代码最新,以下是总体步骤:
+
+1. **添加所需插件**:在根目录的 `/script/plugin_list` 文件添加所需要的插架仓库,每行一个
+2. **构建 Docker 镜像**:运行 `docker build -t <image_name[:tag]> .` 命令开始构建镜像。
+3. **本地启动,验证插件是否正确运行**:等待构建完成后,运行 `docker run -d -p 9080:80 -v
answer-data:/data --name <container_name> <image_name>`命令,进行验证。
+
+### 1.添加所需插件
+```
+github.com/apache/incubator-answer-plugins/connector-basic@latest
+github.com/apache/incubator-answer-plugins/reviewer-basic@latest
+github.com/apache/incubator-answer-plugins/captcha-basic@latest
+github.com/apache/incubator-answer-plugins/editor-formula@latest
+
+```
+
+### 2.构建 Docker 镜像
+
+构建需要一定时间请等待构建完成
+
+
+### 3.本地启动,验证插件是否正确运行
+
+运行下面命令启动,[根据文档](https://answer.apache.org/docs/installation#install-steps)完成初始化,
登录管理后台激活插件,查看插件是否正确运行。
+
+```
+docker run -d -p 9080:80 -v answer-data:/data --name answer101 answer-plugin
+```
+
+初始化完成后,登录你的网站访问管理后台,激活插件,查看插件是否正确运行即可。
+
+管理后台
+
+
+激活插件:
+
+
+确认对应插件(editor-formula)的是否正确运行:
+
+
+
+## 二:构建包含插件的二进制
+
+下面将指导您如何构建包含特定插件的 Apache Answer
二进制文件。这个过程包括构建基础二进制文件、将所需插件包含在内、本地验证插件以及最终部署该二进制文件。
+
+### 二进制总体步骤
+
+1. 构建基础二进制文件
+2. 利用基础二进制文件构建所需插件的二进制文件.
+3. 本地验证插件
+4. 部署该二进制
+
+### 1.构建基础二进制文件
+
+首先使用 `make ui` 命令构建前端静态资源。
+
+效果:
+1. 安装依赖
+
+2. 依赖安装完成开始构建静态资源
+
+
+然后使用 `make build` 构建基础二进制文件,运行成功会在项目根目录生成 answer 二进制文件,该过程中如果出现 go
的依赖安装失败的提示,可以本地尝试运行 `go mod download`,查看是否能够安装成功,如果仍然失败,请考虑配置国内镜像:
https://goproxy.cn/,或者开启网络代理。
+
+成功结果:
+
+
+### 2.利用基础二进制文件构建包含所需插件的二进制文件
+
+参考 [Answer 文档](https://answer.apache.org/docs/plugins/#binary-build)
+```
+# answer build --with [plugin@plugin_version=[replacement]] --output [file]
+$ ./answer build --with
github.com/apache/incubator-answer-plugins/connector-github
+
+# build a new answer with github login plugin then output to ./new_answer.
+$ ./answer build --with
github.com/apache/incubator-answer-plugins/[email protected] --output
./new_answer
+
+# with multiple plugins
+$ ./answer build \
+--with github.com/apache/incubator-answer-plugins/connector-github \
+--with github.com/apache/incubator-answer-plugins/connector-google
+
+# with local plugins
+$ ./answer build --with
github.com/apache/incubator-answer-plugins/[email protected]=/my-local-space
+
+# cross compilation. Build a linux-amd64 binary in macos
+$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./answer build --with
github.com/apache/incubator-answer-plugins/connector-github
+
+# specify the answer version using ANSWER_MODULE environment variable
+$ ANSWER_MODULE=github.com/apache/[email protected] ./answer build
--with github.com/apache/incubator-answer-plugins/connector-github
+```
+
+可以根据文档上的提示来选择所需要的插件,打包插件的会重新构建前端静态资源,插件可能有特有的依赖项,所以这里会重新执行依赖安装跟构建。构建成功后会在更目录生成
`new_answer` 二进制文件。
+
+eg:
+
+
+#### 2.1.打包单个插件
+
+`./answer build --with
github.com/apache/incubator-answer-plugins/connector-github`
+
+效果:
+
+
+
+
+
+
+命令验证插件安装 `./new_answer plugin`
+
+
+
+
+#### 2.2.使用本地插件代码构建单个插件
+
+如果需要调整插件的一些信息或者使用自己实现的私有插件来构建,需要使用 `with local plugins` 命令来构建,比如上面提到的
`editor-formula` 插件,并且使用的 Answer 代码版本是小于 1.3.5
的,所以需要调整插件的一些信息,这种情况就需要使用该命令来完成构建。
+
+`./answer build --with
github.com/apache/incubator-answer-plugins/[email protected]=/Users/shuai/answer/plugins/editor-formula`
+
+结果:
+
+
+
+
+
+
+命令验证插件安装 `./new_answer plugin`
+
+
+
+
+#### 2.3.打包多个插件
+
+效果及过程与上面两个类似,请自己实验安装,这里不在展示。
+
+
+### 3.本地验证插件
+
+使用命令行验证只是确保插件已经打进去了,想要查看插件是否能正常运行,可以本地运行生成的二进制文件进行查看,二进制运行[文档](https://answer.apache.org/docs/installation)
+, 按照文档步骤初始化完信息。注意这里需要运行的是 new_answer
二进制,所以命令行中的 ./answer 需要使用 ./new_answer
+
+### 4.本地验证步骤
+
+1. 完成初始化
+
+例如: `INSTALL_PORT=80 ./new_answer init -C ./answer-data`
+
+
+
+成功后访问
`http://localhost:80/install/`,按照[文档](https://answer.apache.org/docs/installation#install-steps)完成初始化步骤。
+
+2. 运行命令 `./new_answer upgrade -C ./answer-data/` 更新信息
+3. 启动本地网站 `./new_answer run -C ./answer-data/`, 访问 `http://localhost/`,登录进去,访问
`http://localhost/admin` 开启插件,验证插件是否生效。
+
+这里使用最后打包的 editor-formula 插件作为示例。
+
+
+
+
+
+到这一步就可以确定插件是否正确构建并运行了。
+
+### 5.部署该二进制
+
+如果你的网站是使用的二进制进行的部署,那么你现在就可以将该二进制文件进行部署了,如果需要适配不同平台,可以使用文档上面的交叉编译命令来构建二进制文件。
+
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installation.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installation.webp
new file mode 100644
index 000000000..101258320
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installation.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-formula.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-formula.webp
new file mode 100644
index 000000000..70aa4c05d
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-formula.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-plugins.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-plugins.webp
new file mode 100644
index 000000000..5b308847d
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/installed-plugins.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/local-init.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/local-init.webp
new file mode 100644
index 000000000..3d1f9d9e1
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/local-init.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-01.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-01.webp
new file mode 100644
index 000000000..11b120e4c
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-01.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-02.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-02.webp
new file mode 100644
index 000000000..579eb2675
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-02.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-03.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-03.webp
new file mode 100644
index 000000000..c6702af7c
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/make-ui-03.webp
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/new-answer.webp
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/new-answer.webp
new file mode 100644
index 000000000..854d2bd9c
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-blog/2024-07-02-how-to-how-to-package-and-deploy-answer-plugins/new-answer.webp
differ
diff --git a/i18n/zh-CN/docusaurus-plugin-content-blog/authors.yml
b/i18n/zh-CN/docusaurus-plugin-content-blog/authors.yml
index a760dd285..ebdb55c92 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-blog/authors.yml
+++ b/i18n/zh-CN/docusaurus-plugin-content-blog/authors.yml
@@ -15,3 +15,9 @@ fenbox:
title: Product Designer
url: https://github.com
image_url: https://avatars.githubusercontent.com/u/360618?v=4
+
+shuai:
+ name: Shuai
+ title: Developer
+ url: https://github.com/shuashuai
+ image_url: https://avatars.githubusercontent.com/u/30591202?v=4
diff --git a/static/img/blog/[email protected]
b/static/img/blog/[email protected]
new file mode 100644
index 000000000..997929296
Binary files /dev/null and b/static/img/blog/[email protected] differ
diff --git a/static/img/blog/[email protected]
b/static/img/blog/[email protected]
new file mode 100644
index 000000000..f5960def9
Binary files /dev/null and b/static/img/blog/[email protected] differ
diff --git a/static/img/blog/[email protected]
b/static/img/blog/[email protected]
new file mode 100644
index 000000000..38da1e7fe
Binary files /dev/null and b/static/img/blog/[email protected] differ
diff --git a/static/img/blog/[email protected]
b/static/img/blog/[email protected]
new file mode 100644
index 000000000..c7f717ef0
Binary files /dev/null and b/static/img/blog/[email protected] differ