diff --git a/.github/workflows/publish-ghcr-unstable.yaml b/.github/workflows/publish-ghcr-unstable.yaml
index 5f28464..701db9d 100644
--- a/.github/workflows/publish-ghcr-unstable.yaml
+++ b/.github/workflows/publish-ghcr-unstable.yaml
@@ -18,7 +18,7 @@ jobs:
- name: Build and push
run: |
export TZ="Asia/Taipei"
- VERSION=$(date +'%Y-%m-%d.%H.%M.%S')
+ VERSION=unstable-$(date +'%Y-%m-%d.%H.%M.%S')
docker login ghcr.io -u kevinlee-06 -p ${{secrets.GH_PAT}};
docker build -t ghcr.io/kevinlee-06/linklie:${VERSION} .
docker tag ghcr.io/kevinlee-06/linklie:${VERSION} ghcr.io/kevinlee-06/linklie:unstable
diff --git a/docs/api.html b/docs/api.html
new file mode 100644
index 0000000..f6b82de
--- /dev/null
+++ b/docs/api.html
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ API - Linklie 短網址伺服器
+
+
+
+
+
+ 概述
+ 此 API 允許用戶使用自定義 ID 和密碼來縮短 URL,以便將來刪除。API 端點接受 POST 請求以在數據庫中創建縮短的 URL 條目。
+
+ 端點
+
+ POST `/shorten`
+ 此端點用於縮短給定的 URL。
+
+ 請求主體
+ 請求主體必須是包含以下字段的 JSON 對象:
+
+ - url (字符串,必填):您想要縮短的長 URL。
+ - id (字符串,必填):縮短 URL 的自定義 ID。此 ID 必須是唯一的。
+ - password (字符串,非必填):將用於稍後刪除縮短 URL 的密碼。
+
+
+ 範例請求
+ {
+ "url": "https://long-url.com",
+ "id": "short-id",
+ "password": "password-for-deletion"
+}
+
+ 回應
+ 回應將是一個 JSON,包含原始 URL、自定義 ID 和用於刪除的密碼。
+
+ 成功 (HTTP 200)
+ {
+ "url": "https://long-url.com",
+ "id": "short-id",
+ "password": "password-for-deletion"
+}
+
+
+ 注意:
+
+ - 自定義 ID 必須是唯一的;如果 ID 已經存在於資料庫中,請求將以 400 狀態碼回傳失敗。
+ - 密碼在存儲到數據庫之前會被哈希處理以確保安全。
+ - 確保請求主體正確格式化為 JSON。
+
+
+
+ 錯誤回應:
+
+ HTTP 400
+
+
+ 範例用法
+ 要縮短 URL,您可以使用像 curl
這樣的工具:
+ curl -X POST https://LINKLIE_SERVER/shorten \
+ -H "Content-Type: application/json" \
+ -d '{
+ "url": "https://long-url.com",
+ "id": "short-id",
+ "password": "password-for-deletion"
+ }'
+
+如果成功,這將回傳縮短的 URL 詳情,或者如果請求有問題,則回傳錯誤消息。
+
+
+ 注意:
+ 不要忘記將 LINKLIE_SERVER
替換為您的 Linklie 伺服器的實際 URL。
+
+
+
+
+
diff --git a/docs/contributing.html b/docs/contributing.html
new file mode 100644
index 0000000..2fbdd63
--- /dev/null
+++ b/docs/contributing.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+ Contributing - Linklie 短網址伺服器
+
+
+
+
+
+ How to Contribute
+ We welcome contributions! Here’s how you can help:
+
+ - Fork the repository
+ - Create a new branch
+ - Make your changes
+ - Submit a pull request
+
+
+
+
+
+
diff --git a/docs/deploying.html b/docs/deploying.html
new file mode 100644
index 0000000..7f6ebf0
--- /dev/null
+++ b/docs/deploying.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ Deploying - Linklie 短網址伺服器
+
+
+
+
+
+ 如何部屬
+ 有關如何部屬應用程式的指示,請參閱 部屬指南。
+
+
+
+
diff --git a/docs/features.html b/docs/features.html
new file mode 100644
index 0000000..6cfb216
--- /dev/null
+++ b/docs/features.html
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+ Features - Linklie 短網址伺服器
+
+
+
+
+
+
+
+ 功能
+
+ 刪除的密碼保護
+
+ - 刪除 URL 時需要輸入密碼。您可以在網頁控制台中設置刪除密碼。
+ - 密碼以哈希形式存儲在數據庫中。
+
+
+ 網頁介面
+
+ - 提供簡單的網頁介面,使用戶能夠輕鬆添加和刪除 URL。
+ - 用戶可以在伺服器的根 URL 訪問 UI。
+
+
+
+ 自定義 URL
+
+ - 用戶可以創建自定義的短 URL,而不是隨機生成的鏈接。此功能便於記憶鏈接。
+
+
+ 開源
+
+ - Linklie 是免費和開源的,並可在 GitHub 上獲得。歡迎貢獻!
+
+
+ 輕鬆部署
+
+ - Linklie 可以使用 Docker 或 Node.js 輕鬆部署。請按照以下說明快速啟動伺服器。
+
+
+ API
+
+ - Linklie 提供簡單的 API 用於創建和刪除 URL。API 可以通過 HTTP 請求訪問。
+ - 用戶可以使用 API 創建自己的網頁儀表板。
+
+
+ 無日誌政策
+
+ - 伺服器不存儲任何訪客日誌,確保用戶隱私和數據保護。
+
+
+
+
+
diff --git a/docs/image.png b/docs/image.png
index 664f00f..a5adecc 100644
Binary files a/docs/image.png and b/docs/image.png differ
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..6afe118
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+ Linklie 短網址伺服器
+
+
+
+
+
+
+
+
UI 展示
+
+ ntut.uk
+ 上面可以試用,但資料會不定期清理~
+
+
+
![Linklie Logo](logo.png)
+
+
+
+
+
+
diff --git a/docs/logo.jpg b/docs/logo.jpg
deleted file mode 100644
index 96556da..0000000
Binary files a/docs/logo.jpg and /dev/null differ
diff --git a/docs/styles.css b/docs/styles.css
new file mode 100644
index 0000000..7b9d17f
--- /dev/null
+++ b/docs/styles.css
@@ -0,0 +1,113 @@
+body {
+ font-family: Arial, sans-serif;
+ margin: 0;
+ padding: 0;
+ background-color: #f4f4f4;
+ padding-bottom: 70px; /* Space for the footer */
+}
+
+header {
+ background: #35424a;
+ color: #ffffff;
+ padding: 10px 0;
+ text-align: center;
+}
+
+nav ul {
+ list-style: none;
+ padding: 0;
+}
+
+nav ul li {
+ display: inline;
+ margin: 0 15px;
+}
+
+nav ul li a {
+ color: #ffffff;
+ text-decoration: none;
+ transition: color 0.3s; /* Smooth transition for hover effect */
+}
+
+nav ul li a:hover {
+ color: #f4f4f4; /* Change color on hover */
+}
+
+main {
+ padding: 20px;
+ background: #ffffff;
+ margin: 20px;
+ border-radius: 5px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+h2 {
+ color: #35424a; /* Change heading color */
+}
+
+h4, h5 {
+ color: #333; /* Darker color for subheadings */
+}
+
+p {
+ font-size: 16px; /* 設定段落字體大小 */
+ line-height: 1.5; /* 行高 */
+ color: #333; /* 段落文字顏色 */
+}
+
+h5 {
+ font-size: 18px; /* 設定 h5 字體大小 */
+ line-height: 1.4; /* 行高 */
+ color: #35424a; /* h5 文字顏色 */
+ margin-top: 10px; /* 上方邊距 */
+ margin-bottom: 10px; /* 下方邊距 */
+}
+
+
+pre {
+ background: #f8f8f8; /* Light background for code blocks */
+ border: 1px solid #ddd; /* Border around code blocks */
+ padding: 10px; /* Padding inside code blocks */
+ border-radius: 5px; /* Rounded corners */
+ overflow-x: auto; /* Allow horizontal scrolling */
+}
+
+footer {
+ text-align: center;
+ padding: 10px 0;
+ background: #35424a;
+ color: #ffffff;
+ position: fixed; /* Keep footer fixed at the bottom */
+ bottom: 0;
+ width: 100%;
+}
+
+blockquote {
+ border-left: 4px solid #35424a; /* Left border for blockquotes */
+ padding-left: 10px; /* Padding for blockquote text */
+ margin: 10px 0; /* Margin for blockquote */
+ color: #555; /* Color for blockquote text */
+}
+
+.flex-container {
+ display: flex;
+ justify-content: space-between; /* Space between items */
+ align-items: center; /* Center items vertically */
+}
+
+.logo {
+ height: 140px;
+ display: block; /* Ensure images are block elements */
+}
+
+/* Responsive Design */
+@media (max-width: 600px) {
+ nav ul li {
+ display: block; /* Stack navigation items on small screens */
+ margin: 5px 0; /* Margin for stacked items */
+ }
+
+ main {
+ margin: 10px; /* Reduce margin on small screens */
+ }
+}
diff --git a/public/index.html b/public/index.html
index 3915122..d88ecb8 100644
--- a/public/index.html
+++ b/public/index.html
@@ -3,64 +3,99 @@
- Linklie - URL Shortener
+ Linklie - URL Shortener
-
+
+
-
Create Short URL
+ Create Short URL
-
Delete Short URL
+ Delete Short URL
-
Response:
-
+
+ Response
+
-
+
+
+
+
+
+
+
+
+
+
+
Text copied!
+
+
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+