feat: 添加 GitLab 仓库卡片组件支持;合并pr-518
Code quality / quality (push) Has been cancelled
Build and Check / Astro Check for Node.js 22 (push) Has been cancelled
Build and Check / Astro Check for Node.js 23 (push) Has been cancelled
Build and Check / Astro Build for Node.js 22 (push) Has been cancelled
Build and Check / Astro Build for Node.js 23 (push) Has been cancelled

This commit is contained in:
2026-03-22 14:27:33 +08:00
5 changed files with 122 additions and 14 deletions
+2
View File
@@ -19,6 +19,7 @@ import { expressiveCodeConfig } from "./src/config.ts";
import { pluginLanguageBadge } from "./src/plugins/expressive-code/language-badge.ts";
import { AdmonitionComponent } from "./src/plugins/rehype-component-admonition.mjs";
import { GithubCardComponent } from "./src/plugins/rehype-component-github-card.mjs";
import { GitlabCardComponent } from "./src/plugins/rehype-component-gitlab-card.mjs";
import { parseDirectiveNode } from "./src/plugins/remark-directive-rehype.js";
import { remarkExcerpt } from "./src/plugins/remark-excerpt.js";
import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs";
@@ -120,6 +121,7 @@ export default defineConfig({
{
components: {
github: GithubCardComponent,
gitlab: GitlabCardComponent,
note: (x, y) => AdmonitionComponent(x, y, "note"),
tip: (x, y) => AdmonitionComponent(x, y, "tip"),
important: (x, y) => AdmonitionComponent(x, y, "important"),