Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Site

on:
push:
branches:
- main
paths:
- "site/**"
- "README.md"
- ".github/i18n/**"
- "web/src/app.css"
- "src/config.ts"
- "opencode-mem.example.jsonc"
- "web/public/favicon.*"
- ".github/workflows/site.yml"
pull_request:
paths:
- "site/**"
- "README.md"
- ".github/i18n/**"
- "web/src/app.css"
- "src/config.ts"
- "opencode-mem.example.jsonc"
- "web/public/favicon.*"
- ".github/workflows/site.yml"
schedule:
- cron: "17 3 * * *"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: site-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: build
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0

- uses: oven-sh/setup-bun@v2

- name: Install site dependencies
working-directory: site
run: bun install --frozen-lockfile

- name: Build site
working-directory: site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bun run build

- name: Typecheck site
working-directory: site
run: bun run check

- name: Check build output
working-directory: site
run: node scripts/check-dist.mjs

- uses: actions/upload-pages-artifact@v5
with:
path: site/dist

deploy:
name: deploy
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'tickernelz/opencode-mem'
needs: build
runs-on: ubuntu-26.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: pages
cancel-in-progress: false
steps:
- id: deployment
uses: actions/deploy-pages@v5
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ yarn.lock
.github
*.min.js
*.min.css
site/.astro
site/src/content/docs
site/src/generated
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export default ts.config(
"dist/**",
"node_modules/**",
"out/**",
"site/.astro/**",
"site/dist/**",
"site/node_modules/**",
"web/dist/**",
"web/node_modules/**",
],
Expand Down
7 changes: 7 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
.astro
src/generated
src/content/docs
public/favicon.svg
public/favicon.ico
51 changes: 51 additions & 0 deletions site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { readFileSync } from "node:fs";
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";

const map = JSON.parse(readFileSync(new URL("./docs-map.json", import.meta.url), "utf8"));
const groups = [...new Set(map.pages.map((page) => page.group))];
const sidebar = groups.map((label) => ({
label,
items: map.pages
.filter((page) => page.group === label)
.map((page) => ({ slug: page.slug ? `docs/${page.slug}` : "docs" })),
}));

export default defineConfig({
site: "https://opencode-mem.zhafron.my.id",
base: "/",
trailingSlash: "always",
integrations: [
starlight({
title: "opencode-mem",
description:
"Long-term memory for OpenCode agents. Docs generated from the opencode-mem README.",
logo: { src: "./src/assets/brain.svg", alt: "" },
favicon: "/favicon.svg",
social: [{ icon: "github", label: "GitHub", href: map.repository }],
defaultLocale: "root",
locales: {
root: { label: "English", lang: "en" },
de: { label: "Deutsch", lang: "de" },
zh: { label: "简体中文", lang: "zh-CN" },
ar: { label: "العربية", lang: "ar", dir: "rtl" },
tr: { label: "Türkçe", lang: "tr" },
nl: { label: "Nederlands", lang: "nl" },
},
sidebar,
lastUpdated: true,
customCss: ["./src/generated/tokens.css", "./src/styles/fonts.css", "./src/styles/docs.css"],
components: {
Head: "./src/components/docs/Head.astro",
SiteTitle: "./src/components/docs/SiteTitle.astro",
},
head: [
{ tag: "link", attrs: { rel: "icon", href: "/favicon.ico", sizes: "32x32" } },
{
tag: "meta",
attrs: { property: "og:image", content: "https://opencode-mem.zhafron.my.id/og.png" },
},
],
}),
],
});
872 changes: 872 additions & 0 deletions site/bun.lock

Large diffs are not rendered by default.

150 changes: 150 additions & 0 deletions site/docs-map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"repository": "https://github.com/tickernelz/opencode-mem",
"source": "README.md",
"translations": {
"de": ".github/i18n/README.de.md",
"zh": ".github/i18n/README.zh.md",
"ar": ".github/i18n/README.ar.md",
"tr": ".github/i18n/README.tr.md",
"nl": ".github/i18n/README.nl.md"
},
"untranslated": {
"Memory credential redaction": ["de", "zh", "ar", "tr", "nl"]
},
"dropLines": ["^\\[!\\[", "^!\\[", "README\\.[a-z]{2}\\.md\\)"],
"configPages": ["configure/"],
"configSources": ["opencode-mem.example.jsonc", "src/config.ts"],
"pages": [
{
"slug": "",
"group": "Start",
"title": "Overview",
"sections": ["OpenCode Memory", "Core Features"]
},
{
"slug": "start/prerequisites",
"group": "Start",
"sections": ["Prerequisites", "Hardware / resource expectations"]
},
{
"slug": "start/getting-started",
"group": "Start",
"sections": ["Getting Started", "Automatic memory context on OpenCode v2"]
},
{
"slug": "start/local-checkout",
"group": "Start",
"sections": ["Using a local checkout"]
},
{
"slug": "start/encryption",
"group": "Start",
"sections": ["Optional database encryption at rest"]
},
{
"slug": "use/day-to-day",
"group": "Use",
"sections": ["How to use day-to-day", "Typical daily flow", "Automatic vs manual memory"]
},
{
"slug": "use/memory-agents-skills",
"group": "Use",
"sections": ["Memory vs AGENTS.md vs Skills", "Shared Skills (V2)"]
},
{
"slug": "use/auto-capture-and-profile",
"group": "Use",
"sections": ["Intelligent prompt-based memory extraction", "User profile"]
},
{
"slug": "use/web-ui",
"group": "Use",
"sections": ["Web UI", "Health stats"]
},
{
"slug": "use/examples",
"group": "Use",
"sections": ["Usage Examples"]
},
{
"slug": "configure",
"group": "Configure",
"sections": ["Configuration Essentials"]
},
{
"slug": "configure/auto-capture-provider",
"group": "Configure",
"sections": ["Auto-Capture AI Provider"]
},
{
"slug": "configure/embeddings",
"group": "Configure",
"sections": ["Choosing / configuring embeddings"]
},
{
"slug": "configure/markdown-vault",
"group": "Configure",
"sections": ["Markdown vault backend (`memoryBackend`)"]
},
{
"slug": "configure/chat-message",
"group": "Configure",
"sections": ["Chat message capture and injection (`chatMessage`)"]
},
{
"slug": "configure/update-on-capture",
"group": "Configure",
"sections": ["Update-on-capture (optional)"]
},
{
"slug": "configure/dreaming",
"group": "Configure",
"sections": ["Dreaming (optional memory consolidation)"]
},
{
"slug": "configure/memory-scope",
"group": "Configure",
"sections": ["Memory Scope"]
},
{
"slug": "configure/web-ui-auth",
"group": "Configure",
"sections": ["Web UI HTTP Basic Auth"]
},
{
"slug": "operate/credential-redaction",
"group": "Operate",
"sections": ["Memory credential redaction"]
},
{
"slug": "operate/legacy-sqlite",
"group": "Operate",
"sections": ["Upgrading from legacy SQLite shards"]
},
{
"slug": "operate/schema-migrations",
"group": "Operate",
"sections": ["Schema migrations"]
},
{
"slug": "operate/nested-repos",
"group": "Operate",
"sections": ["Sharing One Project Memory Across Nested Repos"]
},
{
"slug": "operate/moving-recovering",
"group": "Operate",
"sections": ["Moving or Recovering Project Memories"]
},
{
"slug": "reference/subpath-exports",
"group": "Reference",
"sections": ["Public Subpath Exports", "`opencode-mem/tags`"]
},
{
"slug": "reference/contributing",
"group": "Reference",
"sections": ["Development & Contribution", "License & Links"]
}
]
}
23 changes: 23 additions & 0 deletions site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "opencode-mem-site",
"private": true,
"type": "module",
"scripts": {
"build": "node scripts/build-tokens.mjs && node scripts/build-docs.mjs && node scripts/fetch-numbers.mjs && astro build",
"dev": "node scripts/build-tokens.mjs && node scripts/build-docs.mjs && astro dev",
"preview": "astro preview",
"check": "astro check"
},
"dependencies": {
"@astrojs/starlight": "0.42.8",
"@fontsource-variable/bricolage-grotesque": "5.3.0",
"@fontsource-variable/jetbrains-mono": "5.3.0",
"astro": "7.4.5",
"github-slugger": "2.0.0",
"sharp": "0.35.5"
},
"devDependencies": {
"@astrojs/check": "0.9.12",
"typescript": "6.0.3"
}
}
1 change: 1 addition & 0 deletions site/public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opencode-mem.zhafron.my.id
Binary file added site/public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions site/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://opencode-mem.zhafron.my.id/sitemap-index.xml
Loading
Loading