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
4 changes: 3 additions & 1 deletion docs/data/skills.data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readdirSync, readFileSync } from "fs";
import { join } from "path";
import { join, relative } from "path";
import { fileURLToPath } from "url";
import { dirname } from "path";

Expand Down Expand Up @@ -38,6 +38,7 @@ function parseFrontmatter(content) {
export default {
async load() {
const skillsDir = join(__dirname, "../../.claude/skills");
const repoRoot = join(__dirname, "../..");
const skills = [];

try {
Expand All @@ -56,6 +57,7 @@ export default {
name: frontmatter.name || skillDir,
description: frontmatter.description || "",
content: body,
skillPath: relative(repoRoot, skillPath).replaceAll("\\", "/"),
path: skillPath,
});
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion docs/skills.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="skills-list">
<div v-for="skill in skills" :key="skill.id" class="skill-card">
<a
:href="`https://github.com/longbridge/gpui-component/tree/main/skills/${skill.id}/SKILL.md`"
:href="`https://github.com/longbridge/gpui-component/tree/main/${skill.skillPath}`"
target="_blank"
class="skill-link"
>
Expand Down
Loading