This is an automated email from the ASF dual-hosted git repository.

fenbox pushed a commit to branch user-guides
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git

commit 9f3512b8580268fda986d2ca028190d06bfb153f
Author: fen <[email protected]>
AuthorDate: Thu Nov 30 18:36:50 2023 +0800

    docs: add mermaid, add user guides
---
 docs/guides/users.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 docusaurus.config.js |  5 ++++
 package.json         |  1 +
 sidebars.js          |  1 +
 4 files changed, 81 insertions(+)

diff --git a/docs/guides/users.md b/docs/guides/users.md
new file mode 100644
index 00000000..3f9cc6d8
--- /dev/null
+++ b/docs/guides/users.md
@@ -0,0 +1,74 @@
+---
+slug: /users
+---
+
+# Users
+
+Show top users in the platform.
+
+- **Users with the highest reputation scores this week**
+  - Users who increased the most reputation this week
+  - Show top 20 users with their increased reputation (order)
+- **Users who voted the most this week**
+  - Number of votes cast for others
+  - Show top 20 users with their number of votes (order)
+- **Our community staff**
+  - Show all moderators, administrators
+  - Ordered by reputation
+
+## Sign up
+
+A user wants to sign up from Email.
+
+```mermaid
+stateDiagram
+    direction LR
+    A1: Fill sign up form
+    B1: Send confirm email
+    B2: Visit activation link
+    %% B3: Click active button
+    C: Active successful
+    inactivate: Inactive user
+    normal: Normal user
+
+    [*] --> A1
+    state Guest {
+      A1 --> B1
+    }
+    state inactivate {
+      direction LR
+      B1 --> B2
+      B2 --> C
+    }
+    state normal {
+      C
+    }
+    C --> [*]
+```
+
+- Display name (abbreviated as "name"):
+  - Less than 30 characters.
+- Username:
+  - Unique.
+  - Less than 30 characters.
+  - Can only contain `0-9`, lowercase letters `a-z`, symbols `- . _`.
+  - Generated based on the display name, spaces are replaced with symbols `-`.
+  - If there is a repetition, add 4 random characters at the end, e.g. 
`joe-x7k2`.
+  - Reserve keywords are not allowed.
+- Record the time of registration and the IP address.
+- The activation link is valid for 14 days.
+- The user's initial reputation is `0`, after activation the reputation 
becomes `1`.
+
+## Log in
+
+## Reset password
+
+## Notification
+
+## Achievement
+
+## Profile
+
+## Settings
+
+## Unsubscribe email
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 4cd55abd..be549b96 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -46,6 +46,10 @@ const config = {
     }
   },
 
+  markdown: {
+    mermaid: true,
+  },
+
   presets: [
     [
       'classic',
@@ -172,6 +176,7 @@ const config = {
       },
     ],
     'docusaurus-plugin-sass',
+    '@docusaurus/theme-mermaid',
     [
       '@docusaurus/plugin-content-docs',
       {
diff --git a/package.json b/package.json
index 48a1a9ff..b205770e 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
     "@docusaurus/preset-classic": "3.0.0",
     "@docusaurus/theme-classic": "^3.0.0",
     "@docusaurus/theme-common": "^3.0.0",
+    "@docusaurus/theme-mermaid": "^3.0.0",
     "@docusaurus/utils": "^3.0.0",
     "@mdx-js/react": "^3.0.0",
     "@popperjs/core": "^2.11.8",
diff --git a/sidebars.js b/sidebars.js
index 9fdf2ed3..208760a1 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -42,6 +42,7 @@ module.exports = {
         'guides/flags',
         'guides/moderation',
         'guides/settings',
+        'guides/users',
       ],
     },
     {

Reply via email to