Multilingual documentation for @hamdymohamedak/openfetch (fetch-only HTTP client: interceptors, middleware, retry, memory cache, RSC-friendly).
- Library (GitHub): github.com/openfetch-js/OpenFetch
- npm package: npmjs.com/package/@hamdymohamedak/openfetch
Local package source (optional): ../openFetch if you clone the monorepo sibling in this workspace.
This folder is a VitePress site.
- Default language: English at
/(overview, guides, API reference pages). - Language hub:
/languages/— links to every locale. - Navbar: Guide (getting started) and Languages; the globe icon (desktop) switches locale while keeping the same page when translations exist (
i18nRouting).
cd openFetchDocs
npm install
npm run dev # local dev server (default http://localhost:5173)
npm run build # static output → .vitepress/dist
npm run preview # serve the production build locallyAfter npm run build, upload .vitepress/dist to any static host (Netlify, Vercel, GitHub Pages, S3, etc.).
GitHub Pages URL depends on who owns the repo (same base: /openfetch-docs/ in both cases):
base is /openfetch-docs/ in .vitepress/config.mts. For local dev open http://localhost:5173/openfetch-docs/ (VitePress applies base there too).
That means GitHub Pages is serving Jekyll from a branch, not the VitePress artifact from Actions.
- Open View Page Source on the live URL. If you see
<meta name="generator" content="Jekyll v3.10.0" />
(and a singleassets/css/style.cssfrom GitHub’s theme), this repo is not deployed via the workflow below.
Fix (required once per repo):
- Settings → Pages → Build and deployment.
- Source: select GitHub Actions (not “Deploy from a branch”).
- Run the workflow: push to
main, or in Actions → Deploy docs → Run workflow.
The workflow .github/workflows/deploy-docs.yml uploads .vitepress/dist. After a successful run, a new deployment appears under Settings → Pages (deployed by github-pages).
The build output also includes public/.nojekyll in dist so static assets are not processed as Jekyll if you ever publish that folder manually.
If you move hosting to the domain root, change base to "/".
| Path prefix | Language | Notes |
|---|---|---|
/ |
English (default) | Full guide set including HTTP methods & React/Vue |
/ar/ |
Arabic (العربية) | RTL · full parity with English sidebar |
/es/ |
Spanish | |
/fa/ |
Persian (Farsi) | RTL |
/fr/ |
French | |
/hi/ |
Hindi | |
/it/ |
Italian | |
/ja/ |
Japanese | |
/kr/ |
Korean | HTML lang is ko |
/ku/ |
Kurdish |
index.md— Overviewgetting-started.md— Install, default client,createClient, middlewarehttp-methods.md— GET, POST, PUT, PATCH, DELETE,request(), bodies & paramsframework-guides.md— React, RSC, Vue 3, SSR notesconfiguration.md—OpenFetchConfig, merge rules,unwrapResponseinterceptors-middleware.md— Interceptors,use(), orderingretry-cache.md— Retry middleware, memory cache, SWRerrors-security.md—OpenFetchError,toShape,assertSafeHttpUrllanguages/index.md— Landing page listing all locales
Translated locales live under ar/, es/, etc. (same filenames where translated).
public/llms.txt— Copied to site root as/llms.txtwhen built (concise API + doc map).skills.md— Repo-only companion for AI tools (excluded from VitePress pages viasrcExclude).
The docs site reads the displayed version from .vitepress/openfetch-version.ts (single source of truth for pages, hero “Ask ChatGPT / Claude” links, and generated public/llms.txt). Bump that file when you cut a release. For runtime behavior details and file-level architecture, see docs/PROJECT_FLOW.md in the library repository.
