Skip to content

Commit 80b8b2d

Browse files
committed
docs(seo): add unique title and description frontmatter with dynamic canonical URLs
1 parent d15126d commit 80b8b2d

20 files changed

Lines changed: 114 additions & 0 deletions

‎docs/.vitepress/config.mts‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@ export default defineConfig({
99
sitemap: {
1010
hostname: 'https://ehsancreator.github.io/OpenCode-Router/'
1111
},
12+
transformHead({ pageData }) {
13+
const cleanPath = pageData.relativePath
14+
.replace(/(^|\/)index\.md$/, '$1')
15+
.replace(/\.md$/, '');
16+
const canonicalUrl = `https://ehsancreator.github.io/OpenCode-Router/${cleanPath}`.replace(/\/+$/, '/');
17+
const head: [string, Record<string, string>][] = [
18+
['link', { rel: 'canonical', href: canonicalUrl }],
19+
['meta', { property: 'og:url', content: canonicalUrl }]
20+
];
21+
if (pageData.frontmatter.title) {
22+
head.push(['meta', { property: 'og:title', content: `${pageData.frontmatter.title} | OpenCode Router` }]);
23+
head.push(['meta', { name: 'twitter:title', content: `${pageData.frontmatter.title} | OpenCode Router` }]);
24+
}
25+
if (pageData.frontmatter.description) {
26+
head.push(['meta', { property: 'og:description', content: pageData.frontmatter.description }]);
27+
head.push(['meta', { name: 'twitter:description', content: pageData.frontmatter.description }]);
28+
}
29+
return head;
30+
},
1231
head: [
1332
['link', { rel: 'icon', type: 'image/png', href: '/OpenCode-Router/images/dashboard.png' }],
1433
['meta', { name: 'theme-color', content: '#0f172a' }],

‎docs/articles/configure-proxy-opencode-cli.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "How to Configure a Proxy for OpenCode CLI"
3+
description: "Learn how to configure HTTP and SOCKS5 proxies for OpenCode CLI on Linux using environment variables, remote DNS resolution, and isolated launchers."
4+
---
5+
16
# How to Configure a Proxy for OpenCode CLI
27

38
Configuring network proxies for command-line AI coding tools on Linux requires precision. Unlike desktop web browsers that provide intuitive graphical proxy menus, terminal tools like [OpenCode](https://github.com/anomaly/opencode) rely on standard POSIX environment variables. This guide explains how to properly configure HTTP and SOCKS5 proxies for OpenCode on Linux (verified on **Ubuntu 24.04 LTS x86_64**), avoid common misconfigurations, and utilize the process-isolated wrapper provided by [OpenCode Router](https://github.com/EhsanCreator/OpenCode-Router).

‎docs/articles/fix-opencode-http-429-rate-limit.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "How to Fix OpenCode HTTP 429 Rate Limit Errors"
3+
description: "Understand HTTP 429 errors in OpenCode. Distinguish IP-based gateway throttling from account quota limits, and configure automated proxy rotation."
4+
---
5+
16
# How to Fix OpenCode HTTP 429 Rate Limit Errors
27

38
When utilizing [OpenCode](https://github.com/anomaly/opencode) for AI-assisted coding on Linux, encountering an **HTTP 429 Too Many Requests** error is one of the most frustrating interruptions. This technical guide explains the underlying mechanisms of HTTP 429 errors, provides clear diagnostic rules to distinguish **IP-based rate limits** from **account-level quota exhaustion**, and explains how [OpenCode Router](https://github.com/EhsanCreator/OpenCode-Router) intelligently handles automated failover.

‎docs/articles/fix-opencode-network-errors-linux.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "How to Fix OpenCode Network Errors on Linux"
3+
description: "Step-by-step technical guide to diagnosing and fixing OpenCode ETIMEDOUT, ECONNRESET, and DNS network errors on Linux with isolated user-space proxies."
4+
---
5+
16
# How to Fix OpenCode Network Errors on Linux
27

38
When working with command-line AI coding tools like [OpenCode](https://github.com/anomaly/opencode) on Linux, network drops, broken TCP sockets, and DNS resolution failures can halt development sessions. This guide explains why OpenCode network errors occur on Linux (verified on **Ubuntu 24.04 LTS x86_64**), provides diagnostic techniques, and details practical solutions including process-isolated proxy routing with [OpenCode Router](https://github.com/EhsanCreator/OpenCode-Router).

‎docs/articles/opencode-proxy-vs-system-vpn.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "OpenCode Proxy vs. System-Wide VPN: Understanding the Differences"
3+
description: "Compare application-specific proxies with system-wide VPNs for AI coding. Learn why process-level isolation prevents broken SSH and local dev servers."
4+
---
5+
16
# OpenCode Proxy vs. System-Wide VPN: Understanding the Differences
27

38
When developers encounter network restrictions, regional blocks, or API rate limits while using [OpenCode](https://github.com/anomaly/opencode) on Linux, their first instinct is often to turn on a full system-wide VPN client. However, system-wide VPNs frequently introduce serious workflow friction for programmers.

‎docs/articles/use-xray-with-opencode-ubuntu.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "How to Use Xray with OpenCode on Ubuntu"
3+
description: "Complete guide to integrating Xray-core with OpenCode on Ubuntu Linux. Generate VLESS Reality client configurations and eliminate DPI throttling."
4+
---
5+
16
# How to Use Xray with OpenCode on Ubuntu
27

38
[Xray-core](https://github.com/XTLS/Xray-core) is one of the most advanced, high-performance network tunneling and anti-censorship engines available for Linux. When combined with [OpenCode](https://github.com/anomaly/opencode), Xray provides resilient, low-latency connectivity to AI model endpoints across restricted networks. This guide explains how Xray-core integrates with OpenCode on **Ubuntu 24.04 LTS (x86_64)**, details client configuration generation, and showcases how [OpenCode Router](https://github.com/EhsanCreator/OpenCode-Router) manages the entire lifecycle automatically.

‎docs/guide/configuration.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Configuration Guide"
3+
description: "Configure runtime parameters, inbound proxy ports, test timeouts, candidate limits, and subscription sources for OpenCode Router."
4+
---
5+
16
# Configuration Guide
27

38
OpenCode Router is pre-configured to work out of the box with zero manual parameter setup. However, power users can customize runtime ports, timeouts, and paths using environment variables or a `.env` file.

‎docs/guide/faq.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Frequently Asked Questions (FAQ)"
3+
description: "Answers to common questions about OpenCode Router, rate limits, model token budgets, and system VPN coexistence."
4+
---
5+
16
# Frequently Asked Questions (FAQ)
27

38
### What is OpenCode Router?

‎docs/guide/getting-started.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Getting Started with OpenCode Router"
3+
description: "Quickstart guide to OpenCode Router. Learn the automated 3-stage health check workflow, proxy rotation, and one-command OpenCode execution."
4+
---
5+
16
# Getting Started with OpenCode Router
27

38
Welcome to **OpenCode Router**, an intelligent proxy discovery and routing manager designed specifically for [OpenCode](https://github.com/anomaly/opencode) on Linux.

‎docs/guide/installation.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Installation on Ubuntu Linux"
3+
description: "Prerequisites, automated environment setup, and installation steps for OpenCode Router on Ubuntu 24.04 LTS x86_64."
4+
---
5+
16
# Installation on Ubuntu Linux
27

38
This guide details system prerequisites, environment setup, and installation steps for **OpenCode Router** on Linux.

0 commit comments

Comments
 (0)