Skip to content

Commit 68b2155

Browse files
authored
feat(docs): better docs, fixed ui components previewing, type issues (#116)
1 parent 7ab5334 commit 68b2155

28 files changed

Lines changed: 296 additions & 81 deletions

File tree

docs/.vitepress/theme/components/IntegrationCard.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@ const data = useData()
2121
<template>
2222
<a
2323
:href="`/pages/${data.lang.value}/integrations/${props.package}/`"
24-
2524
flex="~ row"
2625
bg="zinc-100 hover:zinc-200 active:zinc-300 dark:zinc-900 dark:hover:zinc-800 dark:active:zinc-900"
27-
2826
transition="all duration-200 ease"
29-
cursor-pointer select-none items-center rounded-lg p-4
27+
cursor-pointer select-none items-center rounded-lg p-4 decoration="!none"
3028
class="text-$vp-c-text-1!"
3129
>
32-
<span v-if="props.type === IntegrationType.markdownIt || props.type === IntegrationType.vitepress" flex="~ col 1">
33-
<span>{{ props.title }}</span>
34-
<span>@nolebase/{{ props.package }}</span>
30+
<span v-if="props.type === IntegrationType.markdownIt || props.type === IntegrationType.vitepress" flex="~ col 1" gap-2>
31+
<span>{{ props.title }} <slot name="badge" /></span>
32+
<span text="sm zinc-400 dark:zinc-600">@nolebase/{{ props.package }}</span>
3533
</span>
36-
<span v-if="props.type === IntegrationType.obsidian" flex="~ col 1">
37-
<span>{{ props.title }}</span>
38-
<span>{{ props.package }}</span>
34+
<span v-if="props.type === IntegrationType.obsidian" flex="~ col 1" gap-2>
35+
<span>{{ props.title }} <slot name="badge" /></span>
36+
<span text="sm zinc-400 dark:zinc-600">{{ props.package }}</span>
3937
</span>
4038
<template v-if="props.type === IntegrationType.markdownIt">
4139
<span class="i-octicon:markdown-16" h-15 w-15 text-5xl />

docs/.vitepress/theme/styles/vars.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@
6666
--vp-c-brand-2: var(--vp-c-sky-2);
6767
--vp-c-brand-3: var(--vp-c-sky-3);
6868
--vp-c-brand-soft: var(--vp-c-sky-soft);
69+
--vp-c-tip-1: #1ba6f6;
70+
--vp-badge-tip-bg: #b8e5ff75;
71+
}
72+
73+
.dark:root {
74+
--vp-c-tip-1: #75c8f7;
75+
--vp-badge-tip-bg: #0e5c8975;
6976
}
7077

7178
/**

docs/pages/en/index.md

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,75 @@ Nólëbase Integrations project provides a variety of integrations, plugins, com
3737

3838
<div class="grid gap-5 lg:grid-cols-2 max-w-172 lg:max-w-none mx-auto">
3939

40-
<IntegrationCard type="markdown-it" title="Bi-Directional Links" package="markdown-it-bi-directional-links" />
41-
42-
<IntegrationCard type="markdown-it" title="Elements Transformation" package="markdown-it-element-transform" />
43-
44-
<IntegrationCard type="vitepress" title="Enhanced Readabilities" package="vitepress-plugin-enhanced-readabilities" />
45-
46-
<IntegrationCard type="vitepress" title="Inline Link Previewing" package="vitepress-plugin-inline-link-preview" />
47-
48-
<IntegrationCard type="vitepress" title="Blinking highlight targeted heading" package="vitepress-plugin-highlight-targeted-heading" />
49-
50-
<IntegrationCard type="vitepress" title="Changelog & File history" package="vitepress-plugin-git-changelog" />
51-
52-
<IntegrationCard type="vitepress" title="Page properties" package="vitepress-plugin-page-properties" />
53-
54-
<IntegrationCard type="obsidian" title="UnoCSS" package="obsidian-plugin-unocss" />
40+
<IntegrationCard type="markdown-it" title="Bi-Directional Links" package="markdown-it-bi-directional-links">
41+
<template v-slot:badge>
42+
<Badge type="tip" text="v1.24.2" />
43+
</template>
44+
</IntegrationCard>
45+
46+
<br />
47+
48+
<IntegrationCard type="markdown-it" title="Elements Transformation" package="markdown-it-element-transform">
49+
<template v-slot:badge>
50+
<Badge type="tip" text="v1.24.2" />
51+
</template>
52+
</IntegrationCard>
53+
54+
<br />
55+
56+
<IntegrationCard type="vitepress" title="Enhanced Readabilities" package="vitepress-plugin-enhanced-readabilities">
57+
<template v-slot:badge>
58+
<Badge type="tip" text="v1.24.2" />
59+
</template>
60+
</IntegrationCard>
61+
62+
<br />
63+
64+
<IntegrationCard type="vitepress" title="Inline Link Previewing" package="vitepress-plugin-inline-link-preview">
65+
<template v-slot:badge>
66+
<Badge type="warning" text="Beta" />
67+
</template>
68+
</IntegrationCard>
69+
70+
<br />
71+
72+
<IntegrationCard type="vitepress" title="Blinking highlight targeted heading" package="vitepress-plugin-highlight-targeted-heading">
73+
<template v-slot:badge>
74+
<Badge type="tip" text="v1.24.2" />
75+
</template>
76+
</IntegrationCard>
77+
78+
<br />
79+
80+
<IntegrationCard type="vitepress" title="Changelog & File history" package="vitepress-plugin-git-changelog">
81+
<template v-slot:badge>
82+
<Badge type="danger" text="Alpha" />
83+
</template>
84+
</IntegrationCard>
85+
86+
<br />
87+
88+
<IntegrationCard type="vitepress" title="Previewing image (social media card) generation" package="vitepress-plugin-og-image">
89+
<template v-slot:badge>
90+
<Badge type="warning" text="Beta" />
91+
</template>
92+
</IntegrationCard>
93+
94+
<br />
95+
96+
<IntegrationCard type="vitepress" title="Page properties" package="vitepress-plugin-page-properties">
97+
<template v-slot:badge>
98+
<Badge type="danger" text="Alpha" />
99+
</template>
100+
</IntegrationCard>
101+
102+
<br />
103+
104+
<IntegrationCard type="obsidian" title="UnoCSS" package="obsidian-plugin-unocss">
105+
<template v-slot:badge>
106+
<Badge type="warning" text="Beta" />
107+
</template>
108+
</IntegrationCard>
55109

56110
</div>
57111

docs/pages/en/integrations/index.md

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,72 @@ Nólëbase Integrations project provides a variety of integrations, plugins, com
66

77
## Integrations List
88

9-
<IntegrationCard type="markdown-it" title="Bi-Directional Links" package="markdown-it-bi-directional-links" />
9+
<IntegrationCard type="markdown-it" title="Bi-Directional Links" package="markdown-it-bi-directional-links">
10+
<template v-slot:badge>
11+
<Badge type="tip" text="v1.24.2" />
12+
</template>
13+
</IntegrationCard>
1014

1115
<br />
1216

13-
<IntegrationCard type="markdown-it" title="Elements Transformation" package="markdown-it-element-transform" />
17+
<IntegrationCard type="markdown-it" title="Elements Transformation" package="markdown-it-element-transform">
18+
<template v-slot:badge>
19+
<Badge type="tip" text="v1.24.2" />
20+
</template>
21+
</IntegrationCard>
1422

1523
<br />
1624

17-
<IntegrationCard type="vitepress" title="Enhanced Readabilities" package="vitepress-plugin-enhanced-readabilities" />
25+
<IntegrationCard type="vitepress" title="Enhanced Readabilities" package="vitepress-plugin-enhanced-readabilities">
26+
<template v-slot:badge>
27+
<Badge type="tip" text="v1.24.2" />
28+
</template>
29+
</IntegrationCard>
1830

1931
<br />
2032

21-
<IntegrationCard type="vitepress" title="Inline Link Previewing" package="vitepress-plugin-inline-link-preview" />
33+
<IntegrationCard type="vitepress" title="Inline Link Previewing" package="vitepress-plugin-inline-link-preview">
34+
<template v-slot:badge>
35+
<Badge type="warning" text="Beta" />
36+
</template>
37+
</IntegrationCard>
2238

2339
<br />
2440

25-
<IntegrationCard type="vitepress" title="Blinking highlight targeted heading" package="vitepress-plugin-highlight-targeted-heading" />
41+
<IntegrationCard type="vitepress" title="Blinking highlight targeted heading" package="vitepress-plugin-highlight-targeted-heading">
42+
<template v-slot:badge>
43+
<Badge type="tip" text="v1.24.2" />
44+
</template>
45+
</IntegrationCard>
2646

2747
<br />
2848

29-
<IntegrationCard type="vitepress" title="Changelog & File history" package="vitepress-plugin-git-changelog" />
49+
<IntegrationCard type="vitepress" title="Changelog & File history" package="vitepress-plugin-git-changelog">
50+
<template v-slot:badge>
51+
<Badge type="danger" text="Alpha" />
52+
</template>
53+
</IntegrationCard>
3054

3155
<br />
3256

33-
<IntegrationCard type="vitepress" title="Page properties" package="vitepress-plugin-page-properties" />
57+
<IntegrationCard type="vitepress" title="Previewing image (social media card) generation" package="vitepress-plugin-og-image">
58+
<template v-slot:badge>
59+
<Badge type="warning" text="Beta" />
60+
</template>
61+
</IntegrationCard>
3462

3563
<br />
3664

37-
<IntegrationCard type="obsidian" title="UnoCSS" package="obsidian-plugin-unocss" />
65+
<IntegrationCard type="vitepress" title="Page properties" package="vitepress-plugin-page-properties">
66+
<template v-slot:badge>
67+
<Badge type="danger" text="Alpha" />
68+
</template>
69+
</IntegrationCard>
70+
71+
<br />
72+
73+
<IntegrationCard type="obsidian" title="UnoCSS" package="obsidian-plugin-unocss">
74+
<template v-slot:badge>
75+
<Badge type="warning" text="Beta" />
76+
</template>
77+
</IntegrationCard>

docs/pages/en/integrations/markdown-it-bi-directional-links/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bi-directional Links
1+
# Bi-directional Links <Badge type="tip" text="v1.24.2" />
22

33
## Demo
44

docs/pages/en/integrations/markdown-it-element-transform/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Elements Transformation
1+
# Elements Transformation <Badge type="tip" text="v1.24.2" />
22

33
::: warning 🚧 Constructing
44
Nice to meet you! But sorry, this page is still under construction. If you don’t find the information you are interested in, you can first find the content you are interested in in the navigation in the sidebar to start reading.

docs/pages/en/integrations/obsidian-plugin-unocss/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UnoCSS Plugin
1+
# UnoCSS Plugin <Badge type="warning" text="Beta" />
22

33
When crafting documentation in [Nólëbase](https://github.com/nolebase/nolebase), creating numerous visual components is crucial for enhancing the documents with dynamic and interactive user interfaces. This not only makes the content more digestible but also more engaging.
44
Previously, [Obsidian](https://obsidian.md) lacked the functionality to effectively integrate and apply styles from atomic CSS frameworks like [Tailwind CSS](https://tailwindcss.com/docs/display) and [Windi CSS](https://windicss.org/) to HTML elements within its platform.

docs/pages/en/integrations/vitepress-plugin-enhanced-readabilities/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Enhanced Readabilities
1+
# Enhanced Readabilities <Badge type="tip" text="v1.24.2" />
22

33
## Demo
44

docs/pages/en/integrations/vitepress-plugin-git-changelog/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Changelog & File history
1+
# Changelog & File history <Badge type="danger" text="Alpha" />
22

33
::: warning 🚧 Constructing
44
Nice to meet you! But sorry, this page is still under construction. If you don’t find the information you are interested in, you can first find the content you are interested in in the navigation in the sidebar to start reading.

docs/pages/en/integrations/vitepress-plugin-highlight-targeted-heading/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Blinking highlight targeted heading
1+
# Blinking highlight targeted heading <Badge type="tip" text="v1.24.2" />
22

33
## Demo
44

0 commit comments

Comments
 (0)