Skip to content

Commit 68604ef

Browse files
committed
docs: added docs for plugins
1 parent b8d9934 commit 68604ef

26 files changed

Lines changed: 1430 additions & 48 deletions

File tree

.markdownlint.jsonc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
// Example markdownlint JSON(C) configuration with all properties set to their default value
3+
// Default state for all rules
4+
"default": true,
5+
6+
// Path to configuration file to extend
7+
"extends": null,
8+
9+
// MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time
10+
"MD001": false,
11+
12+
// MD013/line-length - Line length
13+
"MD013": false,
14+
15+
"MD024": false,
16+
17+
// MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
18+
"MD041": false,
19+
20+
// MD033/no-inline-html - Inline HTML
21+
"MD033": false,
22+
23+
// MD045/no-bare-urls - Images should have alternate text (alt text)
24+
"MD045": false,
25+
26+
// MD010/no-hard-tabs - Hard tabs
27+
"MD010": false,
28+
29+
// MD029/ol-prefix - Ordered list item prefix
30+
"MD029": false,
31+
32+
// MD007/ul-indent - Unordered list indentation
33+
"MD007": false,
34+
35+
"MD028": false
36+
}

.markdownlintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CHANGELOG.md
2+
node_modules

docs/.vitepress/config.ts

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import MarkdownItBiDirectionalLinks from '@nolebase/markdown-it-bi-directional-l
44

55
// https://vitepress.dev/reference/site-config
66
export default defineConfig({
7+
lastUpdated: true,
78
themeConfig: {
9+
outline: 'deep',
810
socialLinks: [
911
{ icon: 'github', link: 'https://github.com/nolebase/integrations' },
1012
],
@@ -32,12 +34,18 @@ export default defineConfig({
3234
text: 'Integrations',
3335
items: [
3436
{ text: 'Overview', link: '/pages/en/integrations/' },
35-
{
36-
text: 'Markdown It Plugins',
37-
items: [
38-
{ text: 'Bi-directional links', link: '/pages/en/integrations/markdown-it-bi-directional-links/' },
39-
],
40-
},
37+
],
38+
},
39+
{
40+
text: 'Markdown It Plugins',
41+
items: [
42+
{ text: 'Bi-directional links', link: '/pages/en/integrations/markdown-it-bi-directional-links/' },
43+
],
44+
},
45+
{
46+
text: 'VitePress Plugins',
47+
items: [
48+
{ text: 'Enhanced Readabilities', link: '/pages/en/integrations/vitepress-plugin-enhanced-readabilities/' },
4149
],
4250
},
4351
],
@@ -65,12 +73,19 @@ export default defineConfig({
6573
text: '集成',
6674
items: [
6775
{ text: '概览', link: '/pages/zh-CN/integrations/' },
68-
{
69-
text: 'Markdown It 插件',
70-
items: [
71-
{ text: '双向链接', link: '/pages/zh-CN/integrations/markdown-it-bi-directional-links/' },
72-
],
73-
},
76+
77+
],
78+
},
79+
{
80+
text: 'Markdown It 插件',
81+
items: [
82+
{ text: '双向链接', link: '/pages/zh-CN/integrations/markdown-it-bi-directional-links/' },
83+
],
84+
},
85+
{
86+
text: 'VitePress 插件',
87+
items: [
88+
{ text: '阅读增强', link: '/pages/zh-CN/integrations/vitepress-plugin-enhanced-readabilities/' },
7489
],
7590
},
7691
],
33.2 KB
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<script setup lang="ts">
2+
import { useData } from 'vitepress'
3+
import VitePressLogo from '../assets/vitepress-logo-large.webp'
4+
5+
enum IntegrationType {
6+
markdownIt = 'markdown-it',
7+
vitepress = 'vitepress',
8+
}
9+
10+
const props = defineProps<{
11+
type: IntegrationType
12+
title: string
13+
package: string
14+
}>()
15+
16+
const data = useData()
17+
</script>
18+
19+
<template>
20+
<a :href="`/pages/${data.lang.value}/integrations/${props.package}/`"
21+
p-4
22+
flex="~ row" items-center
23+
bg="zinc-100 hover:zinc-200 active:zinc-300 dark:zinc-900 dark:hover:zinc-800 dark:active:zinc-900"
24+
rounded-lg
25+
transition="all duration-200 ease"
26+
select-none cursor-pointer
27+
class="text-$vp-c-text-1!">
28+
<span flex="~ col 1">
29+
<span>{{ props.title }}</span>
30+
<span>@nolebase/{{ props.package }}</span>
31+
</span>
32+
<template v-if="props.type === IntegrationType.markdownIt">
33+
<span class="i-octicon:markdown-16" text-5xl w-15 h-15 />
34+
</template>
35+
<template v-else-if="props.type === IntegrationType.vitepress">
36+
<img :src="VitePressLogo" w-15 h-15 />
37+
</template>
38+
</a>
39+
</template>

docs/.vitepress/theme/index.ts

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
1-
// https://vitepress.dev/guide/custom-theme
21
import { h } from 'vue'
3-
import Theme from 'vitepress/theme'
2+
import DefaultTheme from 'vitepress/theme'
3+
import type { Theme as ThemeConfig } from 'vitepress'
4+
45
import {
56
NolebaseEnhancedReadabilitiesMenu,
67
NolebaseEnhancedReadabilitiesScreenMenu,
78
} from '@nolebase/vitepress-plugin-enhanced-readabilities'
89

10+
import 'virtual:uno.css'
11+
912
import '@nolebase/vitepress-plugin-enhanced-readabilities/dist/style.css'
1013
import './styles/vars.css'
1114
import './styles/main.css'
1215

13-
export default {
14-
extends: Theme,
16+
import IntegrationCard from './components/IntegrationCard.vue'
17+
18+
export const Theme: ThemeConfig = {
19+
extends: DefaultTheme,
1520
Layout: () => {
16-
return h(Theme.Layout, null, {
17-
// https://vitepress.dev/guide/extending-default-theme#layout-slots
18-
'nav-bar-content-after': () => h(NolebaseEnhancedReadabilitiesMenu),
19-
'nav-screen-content-after': () => h(NolebaseEnhancedReadabilitiesScreenMenu),
21+
return h(DefaultTheme.Layout, null, {
22+
'nav-bar-content-after': () => [
23+
h(NolebaseEnhancedReadabilitiesMenu),
24+
],
25+
'nav-screen-content-after': () => [
26+
h(NolebaseEnhancedReadabilitiesScreenMenu),
27+
],
2028
})
2129
},
22-
enhanceApp() {
23-
// ...
30+
enhanceApp({ app }) {
31+
app.component('IntegrationCard', IntegrationCard)
2432
},
2533
}
34+
35+
export default Theme

docs/.vitepress/theme/styles/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ html, body {
77
opacity: 0.8;
88
}
99

10+
.VPSocialLinks.VPNavBarSocialLinks.social-links {
11+
margin-right: 0;
12+
}
13+
1014
.vp-doc a {
1115
text-decoration: none;
1216
transition: all 0.3s ease;

docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"docs:preview": "vitepress preview"
1111
},
1212
"devDependencies": {
13+
"@iconify-json/icon-park-outline": "^1.1.12",
14+
"@iconify-json/octicon": "^1.1.49",
1315
"@nolebase/markdown-it-bi-directional-links": "workspace:^",
1416
"@nolebase/markdown-it-element-transform": "workspace:^",
1517
"@nolebase/vitepress-plugin-enhanced-readabilities": "workspace:^",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
# Getting Started
2+
3+
::: warning 🚧 Constructing
4+
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.
5+
:::
6+
7+
You could find the integration you interested in by navigating to the [Integrations](/pages/en/integrations/index.md) page, and then follow the documentation of the corresponding integration to operate and configure.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
# Integrations
2+
3+
Welcome to the integrations section of the documentation!
4+
5+
Nólëbase Integrations project provides a variety of integrations, plugins, components and libraries to facilitate the use of our pre-packaged variety of features in [Obsidian](https://obsidian.md), [VitePress](https://vitepress.dev) and other projects compatible with [Markdown It](https://github.com/markdown-it/markdown-it), [Vite](https://vitejs.dev/) and [Vue](https://vuejs.org/).
6+
7+
## Integrations List
8+
9+
<IntegrationCard type="markdown-it" title="Bi-Directional Links" package="markdown-it-bi-directional-links" />
10+
11+
<br />
12+
13+
<IntegrationCard type="vitepress" title="Enhanced Readabilities" package="vitepress-plugin-enhanced-readabilities" />

0 commit comments

Comments
 (0)