Skip to content

Commit 47a88fa

Browse files
committed
Serve registry skill docs from nginx
1 parent fff7d47 commit 47a88fa

File tree

7 files changed

+10
-27
lines changed

7 files changed

+10
-27
lines changed

web/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN pnpm build
88

99
FROM nginx:alpine
1010
COPY --from=build /app/dist /usr/share/nginx/html
11+
COPY --from=build /app/src/docs/skill.md /usr/share/nginx/html/registry/skill.md
1112
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
1213
COPY runtime-config.js.template /usr/share/nginx/html/runtime-config.js.template
1314
COPY docker-entrypoint.d/30-runtime-config.sh /docker-entrypoint.d/30-runtime-config.sh

web/nginx.conf.template

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ server {
4545
add_header Cache-Control "public, immutable";
4646
}
4747

48+
location = /registry/skill.md {
49+
default_type text/plain;
50+
add_header Content-Disposition "inline";
51+
add_header X-Content-Type-Options "nosniff";
52+
try_files $uri =404;
53+
}
54+
4855
location = /runtime-config.js {
4956
add_header Cache-Control "no-store";
5057
try_files $uri =404;

web/src/app/layout.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ export function Layout() {
1010
const pathname = useRouterState({ select: (s) => s.location.pathname })
1111
const { user, isLoading } = useAuth()
1212

13-
if (pathname === '/registry/skill') {
14-
return (
15-
<Suspense fallback={null}>
16-
<Outlet />
17-
</Suspense>
18-
)
19-
}
20-
2113
const navItems: Array<{
2214
label: string
2315
to: string

web/src/app/router.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const SearchPage = createLazyRouteComponent(() => import('@/pages/search'), 'Sea
6060
const TermsOfServicePage = createLazyRouteComponent(() => import('@/pages/terms'), 'TermsOfServicePage')
6161
const NamespacePage = createLazyRouteComponent(() => import('@/pages/namespace'), 'NamespacePage')
6262
const SkillDetailPage = createLazyRouteComponent(() => import('@/pages/skill-detail'), 'SkillDetailPage')
63-
const RegistrySkillPage = createLazyRouteComponent(() => import('@/pages/registry-skill'), 'RegistrySkillPage')
6463
const DashboardPage = createLazyRouteComponent(() => import('@/pages/dashboard'), 'DashboardPage')
6564
const MySkillsPage = createLazyRouteComponent(() => import('@/pages/dashboard/my-skills'), 'MySkillsPage')
6665
const PublishPage = createLazyRouteComponent(() => import('@/pages/dashboard/publish'), 'PublishPage')
@@ -215,12 +214,6 @@ const skillDetailRoute = createRoute({
215214
component: SkillDetailPage,
216215
})
217216

218-
const registrySkillRoute = createRoute({
219-
getParentRoute: () => rootRoute,
220-
path: '/registry/skill',
221-
component: RegistrySkillPage,
222-
})
223-
224217
const dashboardRoute = createRoute({
225218
getParentRoute: () => rootRoute,
226219
path: 'dashboard',
@@ -367,7 +360,6 @@ const routeTree = rootRoute.addChildren([
367360
termsRoute,
368361
namespaceRoute,
369362
skillDetailRoute,
370-
registrySkillRoute,
371363
dashboardRoute,
372364
dashboardSkillsRoute,
373365
dashboardPublishRoute,

web/src/i18n/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
},
108108
"agent": {
109109
"description": "Send a prompt to your Agent to set up the SkillHub Registry",
110-
"command": "Read https://www.example.com/registry/skill and follow the instructions to setup SkillHub Skills Registry"
110+
"command": "Read https://www.example.com/registry/skill.md and follow the instructions to setup SkillHub Skills Registry"
111111
},
112112
"human": {
113113
"description": "Use the CLI tool to install Skills",

web/src/i18n/locales/zh.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
},
108108
"agent": {
109109
"description": "发送提示词给你的 Agent,以设置SkillHub Registry",
110-
"command": "Read https://www.example.com/registry/skill and follow the instructions to setup SkillHub Skills Registry"
110+
"command": "Read https://www.example.com/registry/skill.md and follow the instructions to setup SkillHub Skills Registry"
111111
},
112112
"human": {
113113
"description": "使用CLI工具安装Skills",

web/src/pages/registry-skill.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)