5 Commits

Author SHA1 Message Date
292c5f5af0 fix readme
Some checks are pending
Deploy to Cloudflare Pages / deploy (push) Waiting to run
2025-06-14 01:00:14 +09:00
af5968bd34 add system 2025-06-14 01:00:14 +09:00
724b4776e8 code layout 2025-06-14 01:00:14 +09:00
cea12b1e13 fix command build 2025-06-14 01:00:14 +09:00
ba82543c06 add github 2025-06-14 01:00:14 +09:00
2 changed files with 15 additions and 9 deletions

View File

@@ -13,14 +13,14 @@ cd log
# 2. Start development services # 2. Start development services
./run.zsh serve # Blog development server ./run.zsh serve # Blog development server
./run.zsh c # Cloudflare tunnel (log.syui.ai) ./run.zsh c # Cloudflare tunnel (example.com)
./run.zsh o # OAuth web server ./run.zsh o # OAuth web server
./run.zsh co # Comment system monitor ./run.zsh co # Comment system monitor
# 3. Start Ollama (for Ask AI) # 3. Start Ollama (for Ask AI)
brew install ollama brew install ollama
ollama pull gemma2:2b ollama pull gemma2:2b
OLLAMA_ORIGINS="https://log.syui.ai" ollama serve OLLAMA_ORIGINS="https://example.com" ollama serve
``` ```
### Production Deployment ### Production Deployment
@@ -43,9 +43,9 @@ git push origin main
```bash ```bash
# 1. OAuth Client Setup (oauth/client-metadata.json) # 1. OAuth Client Setup (oauth/client-metadata.json)
{ {
"client_id": "https://log.syui.ai/client-metadata.json", "client_id": "https://example.com/client-metadata.json",
"client_name": "ai.log Blog System", "client_name": "ai.log Blog System",
"redirect_uris": ["https://log.syui.ai/oauth/callback"], "redirect_uris": ["https://example.com/oauth/callback"],
"scope": "atproto", "scope": "atproto",
"grant_types": ["authorization_code", "refresh_token"], "grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"], "response_types": ["code"],
@@ -82,8 +82,8 @@ git push origin main
| Command | Description | | Command | Description |
|---------|-------------| |---------|-------------|
| `./run.zsh c` | Enable Cloudflare tunnel (log.syui.ai) for OAuth | | `./run.zsh c` | Enable Cloudflare tunnel (example.com) for OAuth |
| `./run.zsh o` | Start OAuth web server (port:4173 = log.syui.ai) | | `./run.zsh o` | Start OAuth web server (port:4173 = example.com) |
| `./run.zsh co` | Start comment system (ATProto stream monitor) | | `./run.zsh co` | Start comment system (ATProto stream monitor) |
## 🏗️ Architecture (Pure Rust + HTML + JS) ## 🏗️ Architecture (Pure Rust + HTML + JS)
@@ -148,7 +148,7 @@ brew install ollama
ollama pull gemma2:2b ollama pull gemma2:2b
# 2. CORS設定で起動 # 2. CORS設定で起動
OLLAMA_ORIGINS="https://log.syui.ai" ollama serve OLLAMA_ORIGINS="https://example.com" ollama serve
# 3. AI DID設定 (my-blog/templates/base.html) # 3. AI DID設定 (my-blog/templates/base.html)
const aiConfig = { const aiConfig = {
@@ -605,6 +605,12 @@ translation = true
## systemd ## systemd
```sh
$ sudo vim /usr/lib/systemd/system/ollama.service
[Service]
Environment="OLLAMA_ORIGINS=https://example.com"
```
```sh ```sh
# ファイルをsystemdディレクトリにコピー # ファイルをsystemdディレクトリにコピー
sudo cp ./systemd/system/ailog-stream.service /etc/systemd/system/ sudo cp ./systemd/system/ailog-stream.service /etc/systemd/system/

View File

@@ -1052,8 +1052,8 @@ body {
} }
.chat-message.ai-message.comment-style { .chat-message.ai-message.comment-style {
border-left: 4px solid var(--light-gray); border-left: 4px solid #fff700;
border: 2px solid var(--white); /* border: 2px solid #3F51B5; */
background: #faf8ff; background: #faf8ff;
} }