├── .devcontainer └── devcontainer.json ├── .editorconfig ├── .github ├── FUNDING.yml ├── renovate.json └── workflows │ ├── ci-build.yaml │ ├── ci.yaml │ ├── preview-docs-deployment.yaml │ ├── production-docs-deployment.yaml │ └── release.yaml ├── .gitignore ├── .npmrc ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── README.zh-CN.md ├── bump.config.ts ├── changelogithub.config.ts ├── cspell.config.yaml ├── docs ├── .vitepress │ ├── config.ts │ ├── theme │ │ ├── assets │ │ │ ├── obsidian-logo.svg │ │ │ └── vitepress-logo-large.webp │ │ ├── components │ │ │ ├── HomeContent.vue │ │ │ ├── IntegrationCard.vue │ │ │ ├── NavHeader.vue │ │ │ ├── ThumbhashPreview.vue │ │ │ ├── VPHeroImageLogo.vue │ │ │ └── VPHeroImageLogoLayer.vue │ │ ├── index.ts │ │ └── styles │ │ │ ├── main.css │ │ │ └── vars.css │ └── twoslashConfig.ts ├── data │ ├── en │ │ └── recentUpdates.data.ts │ └── zh-CN │ │ └── recentUpdates.data.ts ├── package.json ├── pages │ ├── en │ │ ├── guide │ │ │ ├── _page.md │ │ │ ├── getting-started.md │ │ │ └── recent-updates.md │ │ ├── index.md │ │ ├── integrations │ │ │ ├── index.md │ │ │ ├── markdown-it-bi-directional-links │ │ │ │ ├── Bi-directional Links Example Page.md │ │ │ │ ├── Bi-directional Links Example Same Name Page.md │ │ │ │ ├── audios │ │ │ │ │ └── Applause.mp3 │ │ │ │ ├── getting-started.md │ │ │ │ ├── images │ │ │ │ │ ├── README.md │ │ │ │ │ ├── foxtail field.jpg │ │ │ │ │ ├── railway near by beach same name.jpg │ │ │ │ │ └── same-name │ │ │ │ │ │ └── railway near by beach same name.jpg │ │ │ │ ├── index.md │ │ │ │ ├── same-name │ │ │ │ │ └── Bi-directional Links Example Same Name Page.md │ │ │ │ ├── syntax.md │ │ │ │ └── videos │ │ │ │ │ └── Big rabbit came out of the hutch.mp4 │ │ │ ├── markdown-it-element-transform │ │ │ │ ├── assets │ │ │ │ │ ├── vite-plugin-inspect-screenshot-day-theme.png │ │ │ │ │ └── vite-plugin-inspect-screenshot-night-theme.png │ │ │ │ └── index.md │ │ │ ├── markdown-it-unlazy-img │ │ │ │ └── index.md │ │ │ ├── obsidian-plugin-unocss │ │ │ │ ├── assets │ │ │ │ │ ├── demo-1.en.mp4 │ │ │ │ │ ├── demo-2.en.mp4 │ │ │ │ │ ├── demo-3.en.mp4 │ │ │ │ │ ├── how-to-install-screenshot-1.png │ │ │ │ │ ├── how-to-install-screenshot-2.png │ │ │ │ │ ├── how-to-install-screenshot-3.png │ │ │ │ │ ├── how-to-install-screenshot-4.png │ │ │ │ │ ├── screenshot-1.png │ │ │ │ │ └── screenshot-2.png │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-breadcrumbs │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-enhanced-mark │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-enhanced-readabilities │ │ │ │ ├── assets │ │ │ │ │ └── demo-video-1.en.mov │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-git-changelog │ │ │ │ ├── configure-ui.md │ │ │ │ ├── configure-vite-plugins.md │ │ │ │ ├── getting-started.md │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-highlight-targeted-heading │ │ │ │ ├── assets │ │ │ │ │ └── demo-video-1.en.mov │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-index │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-inline-link-preview │ │ │ │ ├── configuration.md │ │ │ │ ├── getting-started.md │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-meta │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-og-image │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-page-properties │ │ │ │ └── index.md │ │ │ ├── vitepress-plugin-sidebar │ │ │ │ └── index.md │ │ │ └── vitepress-plugin-thumbnail-hash │ │ │ │ ├── getting-started.md │ │ │ │ ├── index.md │ │ │ │ └── thumbhash.md │ │ ├── releases │ │ │ ├── _page.md │ │ │ └── migrations │ │ │ │ ├── index.md │ │ │ │ ├── v1-to-v2.md │ │ │ │ └── v2-to-v3.md │ │ ├── snippets │ │ │ ├── _page.md │ │ │ ├── configure-on-your-own-warning.md │ │ │ ├── configure-tsconfig.md │ │ │ ├── details-colored-diff.md │ │ │ └── troubleshooting-cannot-find-module.md │ │ └── ui │ │ │ ├── _page.md │ │ │ ├── asciinema-player │ │ │ └── index.md │ │ │ ├── button │ │ │ └── index.md │ │ │ ├── index.md │ │ │ ├── input-horizontal-radio-group │ │ │ └── index.md │ │ │ ├── input-slider │ │ │ └── index.md │ │ │ ├── lazy-teleport-rive-canvas │ │ │ └── index.md │ │ │ └── tag │ │ │ └── index.md │ └── zh-CN │ │ ├── guide │ │ ├── _page.md │ │ ├── getting-started.md │ │ └── recent-updates.md │ │ ├── index.md │ │ ├── integrations │ │ ├── index.md │ │ ├── markdown-it-bi-directional-links │ │ │ ├── audios │ │ │ │ └── 鼓掌声.mp3 │ │ │ ├── getting-started.md │ │ │ ├── images │ │ │ │ ├── README.md │ │ │ │ ├── same-name │ │ │ │ │ └── 海滩铁轨 同名图片.jpg │ │ │ │ ├── 一片 狗尾草.jpg │ │ │ │ └── 海滩铁轨 同名图片.jpg │ │ │ ├── index.md │ │ │ ├── same-name │ │ │ │ └── 双向链接示例同名页面.md │ │ │ ├── syntax.md │ │ │ ├── videos │ │ │ │ └── 大兔子从兔窝中钻出.mp4 │ │ │ ├── 双向链接示例同名页面.md │ │ │ └── 双向链接示例页面.md │ │ ├── markdown-it-element-transform │ │ │ ├── assets │ │ │ │ ├── vite-plugin-inspect-screenshot-day-theme.png │ │ │ │ └── vite-plugin-inspect-screenshot-night-theme.png │ │ │ └── index.md │ │ ├── markdown-it-unlazy-img │ │ │ └── index.md │ │ ├── obsidian-plugin-unocss │ │ │ ├── assets │ │ │ │ ├── demo-1.zh-CN.mp4 │ │ │ │ ├── demo-2.zh-CN.mp4 │ │ │ │ ├── demo-3.zh-CN.mp4 │ │ │ │ ├── how-to-install-screenshot-1.zh-CN.png │ │ │ │ ├── how-to-install-screenshot-2.zh-CN.png │ │ │ │ ├── how-to-install-screenshot-3.zh-CN.png │ │ │ │ ├── how-to-install-screenshot-4.zh-CN.png │ │ │ │ ├── screenshot-1.png │ │ │ │ └── screenshot-2.png │ │ │ └── index.md │ │ ├── vitepress-plugin-breadcrumbs │ │ │ └── index.md │ │ ├── vitepress-plugin-enhanced-mark │ │ │ └── index.md │ │ ├── vitepress-plugin-enhanced-readabilities │ │ │ ├── assets │ │ │ │ └── demo-video-1.zh-CN.mov │ │ │ └── index.md │ │ ├── vitepress-plugin-git-changelog │ │ │ ├── configure-ui.md │ │ │ ├── configure-vite-plugins.md │ │ │ ├── getting-started.md │ │ │ └── index.md │ │ ├── vitepress-plugin-highlight-targeted-heading │ │ │ ├── assets │ │ │ │ └── demo-video-1.zh-CN.mov │ │ │ └── index.md │ │ ├── vitepress-plugin-index │ │ │ └── index.md │ │ ├── vitepress-plugin-inline-link-preview │ │ │ ├── configuration.md │ │ │ ├── getting-started.md │ │ │ └── index.md │ │ ├── vitepress-plugin-meta │ │ │ └── index.md │ │ ├── vitepress-plugin-og-image │ │ │ └── index.md │ │ ├── vitepress-plugin-page-properties │ │ │ └── index.md │ │ ├── vitepress-plugin-sidebar │ │ │ └── index.md │ │ └── vitepress-plugin-thumbnail-hash │ │ │ ├── getting-started.md │ │ │ ├── index.md │ │ │ └── thumbhash.md │ │ ├── releases │ │ ├── _page.md │ │ └── migrations │ │ │ ├── index.md │ │ │ ├── v1-to-v2.md │ │ │ └── v2-to-v3.md │ │ ├── snippets │ │ ├── _page.md │ │ ├── configure-on-your-own-warning.md │ │ ├── configure-tsconfig.md │ │ ├── details-colored-diff.md │ │ └── troubleshooting-cannot-find-module.md │ │ └── ui │ │ ├── _page.md │ │ ├── asciinema-player │ │ └── index.md │ │ ├── button │ │ └── index.md │ │ ├── index.md │ │ ├── input-horizontal-radio-group │ │ └── index.md │ │ ├── input-slider │ │ └── index.md │ │ ├── lazy-teleport-rive-canvas │ │ └── index.md │ │ └── tag │ │ └── index.md ├── public │ ├── _redirects │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── asciinema │ │ └── test-nyancat.cast │ ├── browserconfig.xml │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── icons │ │ ├── crystall-ball-emoji-animated.riv │ │ ├── easter-island-statue-emoji-animated.riv │ │ ├── rocket-emoji-animated.riv │ │ └── star-emoji-animated.riv │ ├── logo-dark.png │ ├── logo-light.png │ ├── logo.svg │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── obsidian-logo.svg │ ├── safari-pinned-tab.svg │ ├── site.webmanifest │ └── thumbhash-test-image.jpg ├── tsconfig.json ├── uno.config.ts ├── vite-env.d.ts ├── vite.config.ts └── yaml.d.ts ├── eslint.config.js ├── package.json ├── packages ├── integrations │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── vitepress │ │ │ ├── client │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ ├── slots.ts │ │ │ │ └── types.ts │ │ │ ├── index.ts │ │ │ ├── markdown-it │ │ │ ├── index.ts │ │ │ └── types.ts │ │ │ └── vite │ │ │ ├── index.ts │ │ │ └── types.ts │ ├── tsconfig.json │ └── yaml.d.ts ├── markdown-it-bi-directional-links │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.test.ts │ │ ├── index.ts │ │ ├── testdata │ │ │ ├── foo bar.md │ │ │ ├── foo.md │ │ │ ├── foo.mp3 │ │ │ ├── foo.mp4 │ │ │ └── foo.png │ │ └── utils.ts │ └── tsconfig.json ├── markdown-it-element-transform │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── markdown-it-unlazy-img │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── ui-asciinema │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── asciinema.d.ts │ │ ├── components │ │ │ ├── NuAsciinemaPlayer.vue │ │ │ └── deps.ts │ │ └── index.ts │ └── tsconfig.json ├── ui-rive-canvas │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── NuLazyTeleportRiveCanvas.vue │ │ │ └── deps.ts │ │ └── index.ts │ └── tsconfig.json ├── ui │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── NuButton.vue │ │ │ ├── NuInputHighlight.vue │ │ │ ├── NuInputHorizontalRadioGroup │ │ │ │ ├── Option.vue │ │ │ │ └── index.vue │ │ │ ├── NuInputSlider.vue │ │ │ ├── NuTag │ │ │ │ ├── Item.vue │ │ │ │ └── index.vue │ │ │ └── NuVerticalTransition.vue │ │ ├── composables │ │ │ └── i18n.ts │ │ └── index.ts │ └── tsconfig.json ├── unconfig-vitepress │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── plugins │ │ │ ├── index.ts │ │ │ └── nolebase │ │ │ │ └── index.ts │ │ ├── theme.ts │ │ └── types.ts │ ├── tsconfig.json │ └── yaml.d.ts ├── vitepress-plugin-breadcrumbs │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── client │ │ │ ├── components │ │ │ │ └── NolebaseBreadcrumbs.vue │ │ │ └── index.ts │ │ ├── test │ │ │ └── breadcrumbs-data-generator.test.ts │ │ └── vitepress │ │ │ ├── breadcrumbs-data-generator.ts │ │ │ └── index.ts │ └── tsconfig.json ├── vitepress-plugin-enhanced-mark │ ├── README.md │ ├── build.config.ts │ ├── package.json │ └── src │ │ └── client │ │ └── style.css ├── vitepress-plugin-enhanced-readabilities │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── client │ │ │ ├── components │ │ │ │ ├── LayoutSwitch.vue │ │ │ │ ├── LayoutSwitchContentLayoutMaxWidthSlider.vue │ │ │ │ ├── LayoutSwitchPageLayoutMaxWidthSlider.vue │ │ │ │ ├── Menu.vue │ │ │ │ ├── MenuHelp.vue │ │ │ │ ├── MenuTitle.vue │ │ │ │ ├── ScreenLayoutSwitch.vue │ │ │ │ ├── ScreenMenu.vue │ │ │ │ ├── ScreenSpotlight.vue │ │ │ │ ├── Spotlight.vue │ │ │ │ ├── SpotlightHoverBlock.vue │ │ │ │ ├── SpotlightStyles.vue │ │ │ │ └── deps.ts │ │ │ ├── composables │ │ │ │ ├── animation.ts │ │ │ │ └── i18n.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locales.ts │ │ │ ├── style.css │ │ │ └── types.ts │ │ └── locales │ │ │ ├── en.yaml │ │ │ ├── index.ts │ │ │ ├── ru-RU.yaml │ │ │ └── zh-CN.yaml │ ├── tsconfig.json │ └── yaml.d.ts ├── vitepress-plugin-git-changelog │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── client │ │ │ ├── components │ │ │ │ ├── Changelog.vue │ │ │ │ ├── CommitRegularLine.vue │ │ │ │ ├── CommitTagLine.vue │ │ │ │ └── Contributors.vue │ │ │ ├── composables │ │ │ │ ├── changelog.ts │ │ │ │ ├── i18n.ts │ │ │ │ └── index.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locales.ts │ │ │ ├── style.css │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── locales │ │ │ ├── en.yaml │ │ │ ├── index.ts │ │ │ ├── ru-RU.yaml │ │ │ ├── yaml.d.ts │ │ │ └── zh-CN.yaml │ │ ├── types │ │ │ ├── index.ts │ │ │ └── virtual.d.ts │ │ └── vite │ │ │ ├── git.ts │ │ │ ├── helpers.test.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── markdownSection.ts │ │ │ └── types.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── vitepress-plugin-graph-view │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── client │ │ │ ├── components │ │ │ │ └── GraphView.vue │ │ │ ├── index.ts │ │ │ └── style.css │ │ ├── types │ │ │ └── index.ts │ │ └── vite │ │ │ └── index.ts │ └── tsconfig.json ├── vitepress-plugin-highlight-targeted-heading │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ └── client │ │ │ ├── components │ │ │ └── HighlightTargetedHeading.vue │ │ │ ├── index.ts │ │ │ └── style.css │ └── tsconfig.json ├── vitepress-plugin-index │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── client │ │ │ ├── components │ │ │ │ └── NolebaseRecentUpdates.vue │ │ │ ├── composables │ │ │ │ └── i18n.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locales.ts │ │ │ ├── style.css │ │ │ └── types.ts │ │ ├── locales │ │ │ ├── en.yaml │ │ │ ├── index.ts │ │ │ └── zh-CN.yaml │ │ └── vitepress │ │ │ ├── index.ts │ │ │ └── recentUpdates.ts │ ├── tsconfig.json │ └── yaml.d.ts ├── vitepress-plugin-inline-link-preview │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── client │ │ │ ├── components │ │ │ │ ├── InlineLinkPreview.vue │ │ │ │ ├── LinkButton.vue │ │ │ │ └── PopupIframe.vue │ │ │ ├── composables │ │ │ │ ├── i18n.ts │ │ │ │ ├── iframe.ts │ │ │ │ └── mouse.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locales.ts │ │ │ ├── style.css │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── locales │ │ │ ├── en.yaml │ │ │ ├── index.ts │ │ │ └── zh-CN.yaml │ │ └── markdown-it │ │ │ ├── index.test.ts │ │ │ └── index.ts │ ├── tsconfig.json │ └── yaml.d.ts ├── vitepress-plugin-meta │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ └── vitepress │ │ │ ├── index.test.ts │ │ │ ├── index.ts │ │ │ └── testdata │ │ │ ├── index.en.html │ │ │ └── index.zh-CN.html │ └── tsconfig.json ├── vitepress-plugin-og-image │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ └── vitepress │ │ │ ├── assets │ │ │ ├── SourceHanSansSC.otf │ │ │ └── og-template.svg │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── options.test.ts │ │ │ ├── options.ts │ │ │ ├── types.ts │ │ │ └── utils │ │ │ ├── emoji.ts │ │ │ ├── svg │ │ │ ├── escape.ts │ │ │ └── render.ts │ │ │ ├── task.ts │ │ │ └── vitepress │ │ │ ├── locales.ts │ │ │ └── sidebar.ts │ └── tsconfig.json ├── vitepress-plugin-page-properties │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── client │ │ │ ├── components │ │ │ │ ├── Datetime.vue │ │ │ │ ├── PageProperties.vue │ │ │ │ ├── PagePropertiesEditor.vue │ │ │ │ └── ProgressBar.vue │ │ │ ├── composables │ │ │ │ ├── data.ts │ │ │ │ ├── i18n.ts │ │ │ │ └── propertyType.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locales.ts │ │ │ ├── style.css │ │ │ ├── types.ts │ │ │ ├── utils.ts │ │ │ └── virtual.d.ts │ │ ├── locales │ │ │ ├── en.yaml │ │ │ ├── index.ts │ │ │ └── zh-CN.yaml │ │ └── vite │ │ │ ├── index.ts │ │ │ ├── markdownSection.ts │ │ │ ├── pageProperties │ │ │ ├── dynamic │ │ │ │ └── readingTime.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ │ └── path.ts │ ├── tsconfig.json │ └── yaml.d.ts ├── vitepress-plugin-sidebar │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── sidebar.test.ts │ │ └── sidebar.ts │ └── tsconfig.json └── vitepress-plugin-thumbnail-hash │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ ├── client │ │ ├── components │ │ │ └── NolebaseUnlazyImg.vue │ │ ├── index.ts │ │ └── style.css │ ├── types │ │ └── index.ts │ └── vite │ │ ├── index.ts │ │ └── utils.ts │ └── tsconfig.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── tsconfig.json ├── uno.config.ts └── vitest.workspace.ts /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node 3 | { 4 | "name": "nolebase-integrations", 5 | // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile 6 | "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", 7 | 8 | // Features to add to the dev container. More info: https://containers.dev/features. 9 | "features": { 10 | "ghcr.io/devcontainers-contrib/features/pnpm:2": {} 11 | }, 12 | 13 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 14 | "forwardPorts": [5173, 4173], 15 | "portsAttributes": { 16 | "5173": { 17 | "label": "dev port" 18 | }, 19 | "4173": { 20 | "label": "build port" 21 | } 22 | }, 23 | 24 | // Use 'postCreateCommand' to run commands after the container is created. 25 | "postCreateCommand": "pnpm i", 26 | // "postStartCommand": "pnpm docs:dev", 27 | 28 | // Configure tool-specific properties. 29 | "customizations": { 30 | "vscode": { 31 | // Set *default* container specific settings.json values on container create. 32 | "extensions": [ 33 | "streetsidesoftware.code-spell-checker", 34 | "mikestead.dotenv", 35 | "EditorConfig.EditorConfig", 36 | "usernamehw.errorlens", 37 | "dbaeumer.vscode-eslint", 38 | "antfu.goto-alias", 39 | "lokalise.i18n-ally", 40 | "antfu.iconify", 41 | "yzhang.markdown-all-in-one", 42 | "antfu.unocss", 43 | "Vue.volar", 44 | "vitest.explorer", 45 | "redhat.vscode-yaml" 46 | ] 47 | }, 48 | "codespaces": { 49 | "openFiles": [ 50 | "./README.md" 51 | ] 52 | } 53 | } 54 | 55 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 56 | // "remoteUser": "root" 57 | } 58 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [LittleSound,nekomeowww] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["local>nolebase/renovate-config", "schedule:weekly"] 4 | } 5 | -------------------------------------------------------------------------------- /.github/workflows/production-docs-deployment.yaml: -------------------------------------------------------------------------------- 1 | name: Build Docs to Netlify 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'main' 7 | 8 | jobs: 9 | build: 10 | name: Build 11 | runs-on: ubuntu-24.04 12 | environment: 13 | name: Production Docs 14 | url: https://nolebase-integrations.ayaka.io 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | with: 19 | fetch-depth: 0 20 | 21 | - name: Setup pnpm 22 | uses: pnpm/action-setup@v4 23 | 24 | - name: Install Node.js 22.x 25 | uses: actions/setup-node@v4 26 | with: 27 | node-version: 22.16.0 28 | # registry-url required. Learn more at 29 | # https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages 30 | registry-url: 'https://registry.npmjs.org' 31 | cache: pnpm 32 | 33 | - name: Install dependencies 34 | run: pnpm install --frozen-lockfile 35 | 36 | - name: Build docs 37 | run: | 38 | pnpm packages:build 39 | pnpm docs:build 40 | env: 41 | # As suggested in Verbose Build option to be able to track down errors https://github.com/vuejs/vitepress/issues/422 42 | # vitepress build command does not have --debug option, so we need to set it manually where the debug package is used. 43 | # DEBUG: 'vitepress:*' 44 | VUE_PROD_HYDRATION_MISMATCH_DETAILS_FLAG: '1' 45 | 46 | - name: Install Netlify CLI 47 | run: pnpm install -g netlify-cli@17.36.0 48 | 49 | - name: Push to Netlify 50 | timeout-minutes: 10 51 | working-directory: docs/ 52 | run: | 53 | netlify deploy --dir 'docs/.vitepress/dist' --prod --debug 54 | env: 55 | NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} 56 | NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} 57 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | permissions: 9 | contents: write 10 | issues: write 11 | pull-requests: write 12 | id-token: write 13 | 14 | jobs: 15 | release: 16 | name: Release 17 | runs-on: ubuntu-24.04 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 23 | 24 | - name: Setup pnpm 25 | uses: pnpm/action-setup@v4 26 | 27 | - name: Install Node.js 22.x 28 | uses: actions/setup-node@v4 29 | with: 30 | node-version: 22.16.0 31 | # registry-url required. Learn more at 32 | # https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages 33 | registry-url: 'https://registry.npmjs.org' 34 | cache: pnpm 35 | 36 | - name: Install dependencies 37 | run: pnpm install --frozen-lockfile 38 | 39 | - name: Packages build 40 | run: pnpm run packages:build 41 | 42 | - name: Packages publish 43 | run: pnpm publish -r --access public --no-git-checks 44 | env: 45 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} 46 | NPM_CONFIG_PROVENANCE: true 47 | 48 | - name: Sync GitHub Release 49 | run: pnpm run changelogithub 50 | env: 51 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Trash/ 2 | .trash/ 3 | .DS_Store 4 | **/.obsidian/ 5 | 6 | .idea 7 | .nuxt 8 | .temp 9 | .vite-inspect 10 | *.local 11 | *.log 12 | components.d.ts 13 | dist 14 | node_modules 15 | .eslintcache 16 | **/.vitepress/docsMetadata.json 17 | **/.vitepress/cache/ 18 | 19 | **/.netlify/* 20 | **/.netlify/functions-serve/* 21 | 22 | coverage/ 23 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | link-workspace-packages=true 2 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "streetsidesoftware.code-spell-checker", 4 | "mikestead.dotenv", 5 | "EditorConfig.EditorConfig", 6 | "usernamehw.errorlens", 7 | "dbaeumer.vscode-eslint", 8 | "antfu.goto-alias", 9 | "lokalise.i18n-ally", 10 | "antfu.iconify", 11 | "yzhang.markdown-all-in-one", 12 | "antfu.unocss", 13 | "Vue.volar", 14 | "vitest.explorer", 15 | "redhat.vscode-yaml" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": false, 3 | "editor.codeActionsOnSave": { 4 | "source.fixAll.eslint": "explicit", 5 | "source.organizeImports": "never" 6 | }, 7 | // The following is optional. 8 | // It's better to put under project setting `.vscode/settings.json` 9 | // to avoid conflicts with working with different eslint configs 10 | // that does not support all formats. 11 | "eslint.validate": [ 12 | "javascript", 13 | "javascriptreact", 14 | "typescript", 15 | "typescriptreact", 16 | "vue", 17 | "html", 18 | "markdown", 19 | "json", 20 | "jsonc", 21 | "yaml" 22 | ], 23 | "typescript.tsdk": "node_modules/typescript/lib", 24 | "i18n-ally.localesPaths": [ 25 | "packages/**/src/locales" 26 | ], 27 | "i18n-ally.keystyle": "nested" 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023-PRESENT All the contributors of Nólëbase 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bump.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'bumpp' 2 | 3 | export default defineConfig({ 4 | recursive: true, 5 | commit: 'release: v%s', 6 | sign: true, 7 | }) 8 | -------------------------------------------------------------------------------- /changelogithub.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'changelogithub' 2 | 3 | export default defineConfig({ draft: true }) 4 | -------------------------------------------------------------------------------- /cspell.config.yaml: -------------------------------------------------------------------------------- 1 | version: "0.2" 2 | ignorePaths: [] 3 | dictionaryDefinitions: [] 4 | dictionaries: [] 5 | words: 6 | - antfu 7 | - apng 8 | - asciicast 9 | - asciinema 10 | - Astro 11 | - Attributify 12 | - avatar 13 | - ayaka 14 | - Baloo 15 | - baloo-2 16 | - blurhash 17 | - bumpp 18 | - canvaskit 19 | - Chakra 20 | - chakra-petch 21 | - changelogithub 22 | - cijiugechu 23 | - colorette 24 | - composables 25 | - contributor 26 | - datetime 27 | - defu 28 | - easytag 29 | - ElMassimo 30 | - emittypes 31 | - evanw 32 | - execa 33 | - frontmatter 34 | - Gitea 35 | - graymatter 36 | - iconify 37 | - jfif 38 | - Logseq 39 | - mkdist 40 | - napi 41 | - neko 42 | - Nisekoi5 43 | - nodir 44 | - Northword 45 | - Noto 46 | - octicon 47 | - Petch 48 | - pjpeg 49 | - quotepath 50 | - Rehype 51 | - resvg 52 | - retext 53 | - rizumu 54 | - Roboto 55 | - shikijs 56 | - taze 57 | - testdata 58 | - Twoslash 59 | - unconfig 60 | - uncrypto 61 | - unlazy 62 | - unocss 63 | - unplugin 64 | - Vite 65 | - vitepress 66 | - vueuse 67 | ignoreWords: [] 68 | import: 69 | - "@cspell/dict-ru_ru/cspell-ext.json" 70 | - "@nolebase/cspell-dict/cspell-ext.json" 71 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/assets/vitepress-logo-large.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/.vitepress/theme/assets/vitepress-logo-large.webp -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/HomeContent.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 28 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/NavHeader.vue: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/VPHeroImageLogoLayer.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vue' 2 | 3 | import { NuLazyTeleportRiveCanvas } from '@nolebase/ui-rive-canvas' 4 | import { defineThemeUnconfig } from '@nolebase/unconfig-vitepress' 5 | 6 | import { NolebasePluginPreset } from '@nolebase/unconfig-vitepress/plugins' 7 | import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' 8 | import { MotionPlugin } from '@vueuse/motion' 9 | import { h } from 'vue' 10 | 11 | import HomeContent from './components/HomeContent.vue' 12 | import IntegrationCard from './components/IntegrationCard.vue' 13 | import NavHeader from './components/NavHeader.vue' 14 | import ThumbhashPreview from './components/ThumbhashPreview.vue' 15 | import VPHeroImageLogo from './components/VPHeroImageLogo.vue' 16 | 17 | import 'virtual:uno.css' 18 | 19 | import '@shikijs/vitepress-twoslash/style.css' 20 | import 'asciinema-player/dist/bundle/asciinema-player.css' 21 | 22 | import './styles/vars.css' 23 | import './styles/main.css' 24 | 25 | export default defineThemeUnconfig({ 26 | layout: { 27 | slots: { 28 | 'layout-top': { 29 | node: [ 30 | () => h(NuLazyTeleportRiveCanvas), 31 | ], 32 | }, 33 | 'home-hero-before': { 34 | node: [ 35 | () => h(NavHeader), 36 | ], 37 | }, 38 | 'home-hero-image': { 39 | node: [ 40 | () => h(VPHeroImageLogo), 41 | ], 42 | }, 43 | }, 44 | }, 45 | enhanceApp: ({ app }) => { 46 | app.component('IntegrationCard', IntegrationCard) 47 | app.component('HomeContent', HomeContent) 48 | app.component('ThumbhashPreview', ThumbhashPreview) 49 | 50 | app.use(TwoslashFloatingVue as Plugin) 51 | app.use(MotionPlugin as Plugin) 52 | }, 53 | pluginPresets: [ 54 | NolebasePluginPreset({ 55 | gitChangelog: { 56 | enable: true, 57 | options: { 58 | commitsRelativeTime: true, 59 | }, 60 | }, 61 | }), 62 | ], 63 | }) 64 | -------------------------------------------------------------------------------- /docs/data/en/recentUpdates.data.ts: -------------------------------------------------------------------------------- 1 | import { createRecentUpdatesLoader } from '@nolebase/vitepress-plugin-index/vitepress' 2 | 3 | export default createRecentUpdatesLoader({ 4 | dir: 'pages/en', 5 | rewrites: [ 6 | { from: /^pages\/en\//, to: '' }, 7 | ], 8 | ignores: [ 9 | '**/snippets/**.md', 10 | ], 11 | }) 12 | -------------------------------------------------------------------------------- /docs/data/zh-CN/recentUpdates.data.ts: -------------------------------------------------------------------------------- 1 | import { createRecentUpdatesLoader } from '@nolebase/vitepress-plugin-index/vitepress' 2 | 3 | export default createRecentUpdatesLoader({ 4 | dir: 'pages/zh-CN', 5 | rewrites: [ 6 | { from: /^pages\/zh-CN\//, to: '' }, 7 | ], 8 | ignores: [ 9 | '**/snippets/**.md', 10 | ], 11 | }) 12 | -------------------------------------------------------------------------------- /docs/pages/en/guide/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: Guide 3 | sidebarCollapsed: false 4 | --- 5 | -------------------------------------------------------------------------------- /docs/pages/en/guide/getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Getting Started 3 | category: Index 4 | --- 5 | 6 | # Getting Started 7 | 8 | ::: warning 🚧 Constructing 9 | 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. 10 | ::: 11 | 12 | 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. 13 | -------------------------------------------------------------------------------- /docs/pages/en/guide/recent-updates.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Recent Updates 3 | nolebase: 4 | gitChangelog: false 5 | pageProperties: false 6 | --- 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bi-directional Links 3 | category: Bi-directional Links 4 | sidebarTitle: Bi-directional Links Example Page 5 | sidebarHide: true 6 | --- 7 | 8 | # Bi-directional Links Example Page 9 | 10 | Hi! This is a linked internal page. 11 | 12 | ## Section 2 13 | 14 | Section 2 content. 15 | 16 | ### Subsection 2.1 17 | 18 | Subsection 2.1 content. 19 | 20 | ## Section 3 21 | 22 | Section 3 content. 23 | 24 | ### Subsection 3.1 25 | 26 | Subsection 3.1 content. 27 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Same Name Page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bi-directional Links 3 | category: Bi-directional Links 4 | sidebarTitle: Bi-directional Links Example Same Name Page 5 | sidebarHide: true 6 | --- 7 | 8 | # Bi-directional Links Example Same Name Page 9 | 10 | Hi! This is a linked internal page. 11 | 12 | ## Section 2 13 | 14 | Section 2 content. 15 | 16 | ### Subsection 2.1 17 | 18 | Subsection 2.1 content. 19 | 20 | ## Section 3 21 | 22 | Section 3 content. 23 | 24 | ### Subsection 3.1 25 | 26 | Subsection 3.1 content. 27 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/audios/Applause.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/markdown-it-bi-directional-links/audios/Applause.mp3 -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/images/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarHide: true 3 | --- 4 | 5 | All images are provided by [Lorem Picsum](https://picsum.photos/) - The Lorem Ipsum for photos. 6 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/images/foxtail field.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/markdown-it-bi-directional-links/images/foxtail field.jpg -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/images/railway near by beach same name.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/markdown-it-bi-directional-links/images/railway near by beach same name.jpg -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/images/same-name/railway near by beach same name.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/markdown-it-bi-directional-links/images/same-name/railway near by beach same name.jpg -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/same-name/Bi-directional Links Example Same Name Page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bi-directional Links 3 | category: Bi-directional Links 4 | sidebarHide: true 5 | --- 6 | 7 | # Bi-directional Links Example Same Name Page 8 | 9 | Hi! This is a linked internal page. 10 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-bi-directional-links/videos/Big rabbit came out of the hutch.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/markdown-it-bi-directional-links/videos/Big rabbit came out of the hutch.mp4 -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-day-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-day-theme.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-night-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-night-theme.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/demo-1.en.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/demo-1.en.mp4 -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/demo-2.en.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/demo-2.en.mp4 -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/demo-3.en.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/demo-3.en.mp4 -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-1.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-2.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-3.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-4.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/screenshot-1.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/obsidian-plugin-unocss/assets/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/obsidian-plugin-unocss/assets/screenshot-2.png -------------------------------------------------------------------------------- /docs/pages/en/integrations/vitepress-plugin-enhanced-readabilities/assets/demo-video-1.en.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/vitepress-plugin-enhanced-readabilities/assets/demo-video-1.en.mov -------------------------------------------------------------------------------- /docs/pages/en/integrations/vitepress-plugin-highlight-targeted-heading/assets/demo-video-1.en.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/en/integrations/vitepress-plugin-highlight-targeted-heading/assets/demo-video-1.en.mov -------------------------------------------------------------------------------- /docs/pages/en/integrations/vitepress-plugin-index/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Index page 3 | category: Index page 4 | --- 5 | 6 | 9 | 10 | # Index page 11 | 12 | ::: warning 🚧 Constructing 13 | 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. 14 | ::: 15 | 16 | We are still working on it, stay tuned! 17 | 18 | ## Installation 19 | 20 | Install `@nolebase/vitepress-plugin-index` to your project dependencies by running the following command: 21 | 22 | ::: code-group 23 | 24 | ```shell [@antfu/ni] 25 | ni @nolebase/vitepress-plugin-index -D 26 | ``` 27 | 28 | ```shell [pnpm] 29 | pnpm add @nolebase/vitepress-plugin-index -D 30 | ``` 31 | 32 | ```shell [npm] 33 | npm install @nolebase/vitepress-plugin-index -D 34 | ``` 35 | 36 | ```shell [yarn] 37 | yarn add @nolebase/vitepress-plugin-index -D 38 | ``` 39 | 40 | ::: 41 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/vitepress-plugin-meta/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Page metadata generation 3 | category: Page metadata generation 4 | --- 5 | 6 | 9 | 10 | # Page `` metadata generation 11 | 12 | ::: warning 🚧 Constructing 13 | 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. 14 | ::: 15 | 16 | We are still working on it, stay tuned! 17 | 18 | ## Installation 19 | 20 | Install `@nolebase/vitepress-plugin-meta` to your project dependencies by running the following command: 21 | 22 | ::: code-group 23 | 24 | ```shell [@antfu/ni] 25 | ni @nolebase/vitepress-plugin-meta -D 26 | ``` 27 | 28 | ```shell [pnpm] 29 | pnpm add @nolebase/vitepress-plugin-meta -D 30 | ``` 31 | 32 | ```shell [npm] 33 | npm install @nolebase/vitepress-plugin-meta -D 34 | ``` 35 | 36 | ```shell [yarn] 37 | yarn add @nolebase/vitepress-plugin-meta -D 38 | ``` 39 | 40 | ::: 41 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/vitepress-plugin-og-image/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Previewing image (social media card) generation 3 | category: Previewing image (social media card) generation 4 | --- 5 | 6 | 9 | 10 | # Previewing image (social media card) generation 11 | 12 | ::: warning 🚧 Constructing 13 | 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. 14 | ::: 15 | 16 | We are still working on it, stay tuned! 17 | 18 | ## Installation 19 | 20 | Install `@nolebase/vitepress-plugin-og-image` to your project dependencies by running the following command: 21 | 22 | ::: code-group 23 | 24 | ```shell [@antfu/ni] 25 | ni @nolebase/vitepress-plugin-og-image -D 26 | ``` 27 | 28 | ```shell [pnpm] 29 | pnpm add @nolebase/vitepress-plugin-og-image -D 30 | ``` 31 | 32 | ```shell [npm] 33 | npm install @nolebase/vitepress-plugin-og-image -D 34 | ``` 35 | 36 | ```shell [yarn] 37 | yarn add @nolebase/vitepress-plugin-og-image -D 38 | ``` 39 | 40 | ::: 41 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/vitepress-plugin-page-properties/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Page properties 3 | category: Page properties 4 | tags: 5 | - Integrations/VitePress-Plugin 6 | - Integrations/VitePress-Plugin/Page-Properties 7 | - Markdown/frontmatter 8 | progress: 85 9 | url1: https://nolebase-integrations.ayaka.io/pages/en/ 10 | createdAt: 2024-01-23 11 | updatedAt: 2024-01-23 12 | --- 13 | 14 | 17 | 18 | # Page properties 19 | 20 | Page properties was born from the heavily inspiration of Notion's page properties feature. 21 | 22 | ## Installation 23 | 24 | Install `@nolebase/vitepress-plugin-page-properties` to your project dependencies by running the following command: 25 | 26 | ::: code-group 27 | 28 | ```shell [@antfu/ni] 29 | ni @nolebase/vitepress-plugin-page-properties -D 30 | ``` 31 | 32 | ```shell [pnpm] 33 | pnpm add @nolebase/vitepress-plugin-page-properties -D 34 | ``` 35 | 36 | ```shell [npm] 37 | npm install @nolebase/vitepress-plugin-page-properties -D 38 | ``` 39 | 40 | ```shell [yarn] 41 | yarn add @nolebase/vitepress-plugin-page-properties -D 42 | ``` 43 | 44 | ::: 45 | -------------------------------------------------------------------------------- /docs/pages/en/integrations/vitepress-plugin-thumbnail-hash/thumbhash.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Thumbnail hashing for images 3 | category: Thumbnail hashing for images 4 | sidebarTitle: Playground 5 | aside: false 6 | nolebase: 7 | gitChangelog: false 8 | pageProperties: false 9 | --- 10 | 11 | # Thumbhash 12 | 13 |
14 | 15 | 24 | -------------------------------------------------------------------------------- /docs/pages/en/releases/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: Releases 3 | sidebarCollapsed: false 4 | --- 5 | -------------------------------------------------------------------------------- /docs/pages/en/releases/migrations/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Migrations 3 | category: Index 4 | --- 5 | 6 | # Migration 7 | 8 | Currently the **ongoing developing version** of the project is: `v2`. 9 | 10 | You can find the migration guides here: 11 | 12 | - [Migrate from `v1` to `v2`](v1-to-v2.md) 13 | -------------------------------------------------------------------------------- /docs/pages/en/releases/migrations/v2-to-v3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Migrate from v2 to v3 3 | category: Migrations 4 | --- 5 | 6 | # Migrating from `v2` to `v3` 7 | 8 | ## Git-based page history 9 | 10 | ### UI configuration 11 | 12 | - `mapAuthors` is deprecated, please configure this option in the Vite plugin. 13 | -------------------------------------------------------------------------------- /docs/pages/en/snippets/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: Snippets 3 | sidebarHide: true 4 | --- 5 | -------------------------------------------------------------------------------- /docs/pages/en/snippets/configure-on-your-own-warning.md: -------------------------------------------------------------------------------- 1 | ::: warning Caution 2 | **Configure on your own** is for those who know and understand what they are doing. If you don't know what you are doing or encounter problems during configuration, please read and follow the [Integrate with VitePress](#integrate-with-vitepress) section. 3 | ::: 4 | -------------------------------------------------------------------------------- /docs/pages/en/snippets/configure-tsconfig.md: -------------------------------------------------------------------------------- 1 | ::: details A TypeScript User? 2 | 3 | You need to configure at least the following options: 4 | 5 | ```jsonc 6 | { 7 | "compilerOptions": { 8 | "module": "ESNext", // [!code hl] 9 | "moduleResolution": "Bundler", // [!code hl] 10 | }, 11 | "include": [ 12 | "**/.vitepress/**/*.ts", 13 | "**/.vitepress/**/*.mts", 14 | "**/.vitepress/**/*.vue" 15 | ], 16 | "exclude": [ 17 | "node_modules" 18 | ] 19 | } 20 | ``` 21 | 22 | And the options 23 | 24 | - `module` option specifies the JavaScript/TypeScript module format, and Nolebase Integrations uses the `ESNext`-compatible module format by default. 25 | - `moduleResolution` option specifies the module resolution policy, since all Nolebase Integrations plugins follow the latest ECMAScript specifications and export declarations, if you encounter a `Cannot find module ... or its corresponding type declarations` error you may need to set `moduleResolution` to `Bundler`. 26 | 27 | If you want more configurations, you can refer to the following example: 28 | 29 | ```jsonc 30 | { 31 | "compilerOptions": { 32 | "jsx": "preserve", 33 | "lib": [ 34 | "DOM", 35 | "ESNext" 36 | ], 37 | "module": "ESNext", 38 | "moduleResolution": "Bundler", 39 | "resolveJsonModule": true, 40 | "strict": true, 41 | "strictNullChecks": true, 42 | "noFallthroughCasesInSwitch": true, 43 | "noImplicitAny": true, 44 | "noUnusedLocals": true, 45 | "noUnusedParameters": true, 46 | "noEmit": true, 47 | "removeComments": false, 48 | "esModuleInterop": true, 49 | "forceConsistentCasingInFileNames": true, 50 | "isolatedModules": true, 51 | "verbatimModuleSyntax": true, 52 | "skipLibCheck": true 53 | }, 54 | "include": [ 55 | "**/.vitepress/**/*.ts", 56 | "**/.vitepress/**/*.mts", 57 | "**/.vitepress/**/*.vue" 58 | ], 59 | "exclude": [ 60 | "node_modules" 61 | ] 62 | } 63 | ``` 64 | 65 | ::: 66 | -------------------------------------------------------------------------------- /docs/pages/en/snippets/details-colored-diff.md: -------------------------------------------------------------------------------- 1 | ::: details If you've never seen a colored diff before 2 | This is a markup rule for displaying **diff** in the user interface (UI). 3 | 4 | Red parts usually represents the lines you are going to remove, commonly appeared with a Minus sign -, or you could simply understand it as: this line will be removed. 5 | 6 | Green parts usually represents the lines you are going to add, commonly appeared with a Plus sign +, or you could simply understand it as: this line will be added. 7 | 8 | > To learn more about **diff**, you can check out [this answer about the history of diffutils](https://unix.stackexchange.com/questions/196565/how-to-color-diff-output) and [Git's documentation](https://git-scm.com/docs/git-diff) 9 | ::: 10 | -------------------------------------------------------------------------------- /docs/pages/en/snippets/troubleshooting-cannot-find-module.md: -------------------------------------------------------------------------------- 1 | If you are encountering this error with Nolebase Integrations packages inside of `.ts` or `.vue` files, you may need to configure the `moduleResolution` option in your `tsconfig.json` file. 2 | 3 | ```jsonc 4 | { 5 | "compilerOptions": { 6 | "module": "ESNext", // [!code focus] 7 | "moduleResolution": "Bundler", // [!code focus] 8 | }, 9 | "include": [ 10 | "**/.vitepress/**/*.ts", 11 | "**/.vitepress/**/*.mts", 12 | "**/.vitepress/**/*.vue" 13 | ], 14 | "exclude": [ 15 | "node_modules" 16 | ] 17 | } 18 | ``` 19 | 20 | If the error persists, please submit a [GitHub issue](https://github.com/nolebase/integrations/issues) for further assistance and troubleshooting. 21 | -------------------------------------------------------------------------------- /docs/pages/en/ui/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarCollapsed: false 3 | --- 4 | -------------------------------------------------------------------------------- /docs/pages/en/ui/button/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Buttons 3 | category: UI 4 | --- 5 | 6 | 9 | 10 | # Buttons 11 | 12 | ::: danger 🛑 This package is in Alpha stage. 13 | This package is still in the Alpha stage, and it is not recommended to use it in production. The API may change in the future, and there may be bugs in the current version. Please use it with caution. 14 | ::: 15 | 16 | ::: warning 🚧 Constructing 17 | 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. 18 | ::: 19 | 20 |
21 | 22 | ABCD 23 | 24 |
25 | -------------------------------------------------------------------------------- /docs/pages/en/ui/input-slider/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Slider 3 | category: UI 4 | --- 5 | 6 | 9 | 10 | # Slider 11 | 12 | ::: danger 🛑 This package is still in the Alpha test stage. 13 | This package is still in the Alpha test stage and is not recommended for use in production. The API may change in the future, and there may be errors in the current version. Please use it with caution. 14 | ::: 15 | 16 | ## Example 17 | 18 | 25 | -------------------------------------------------------------------------------- /docs/pages/en/ui/tag/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tag 3 | category: UI 4 | --- 5 | 6 | 9 | 10 | # Tag 11 | 12 | ::: danger 🛑 This package is in Alpha stage. 13 | This package is still in the Alpha stage, and it is not recommended to use it in production. The API may change in the future, and there may be bugs in the current version. Please use it with caution. 14 | ::: 15 | 16 | ::: warning 🚧 Constructing 17 | 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. 18 | ::: 19 | 20 | ## Multiple states 21 | 22 | ### Normal state 23 | 24 |
25 | 26 | 27 | 28 | 29 |
30 | 31 | ### Editing state 32 | 33 |
34 | 35 | 36 | 37 | 38 |
39 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/guide/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: 指南 3 | sidebarCollapsed: false 4 | --- 5 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/guide/getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 如何开始 3 | category: 索引 4 | --- 5 | 6 | # 如何开始 7 | 8 | ::: warning 🚧 施工中 9 | 很高兴见到你!但很抱歉,这个页面还在施工中,如果没有找到你感兴趣的信息,你可以先在侧边栏的导航中寻找你感兴趣的内容来开始阅读 10 | ::: 11 | 12 | 你可以通过前往[集成](/pages/zh-CN/integrations/index.md)页面来寻找你感兴趣的集成,然后按照对应的集成的文档进行操作和配置。 13 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/guide/recent-updates.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 最近更新 3 | nolebase: 4 | gitChangelog: false 5 | pageProperties: false 6 | --- 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/audios/鼓掌声.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/audios/鼓掌声.mp3 -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/images/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarHide: true 3 | --- 4 | 5 | All images are provided by [Lorem Picsum](https://picsum.photos/) - The Lorem Ipsum for photos. 6 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/images/same-name/海滩铁轨 同名图片.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/images/same-name/海滩铁轨 同名图片.jpg -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/images/一片 狗尾草.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/images/一片 狗尾草.jpg -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/images/海滩铁轨 同名图片.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/images/海滩铁轨 同名图片.jpg -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/same-name/双向链接示例同名页面.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 双向链接 3 | category: 双向链接 4 | sidebarHide: true 5 | --- 6 | 7 | # 同名页面 8 | 9 | 嗨!这是一个内部页面。 10 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/videos/大兔子从兔窝中钻出.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/videos/大兔子从兔窝中钻出.mp4 -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/双向链接示例同名页面.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 双向链接 3 | category: 双向链接 4 | sidebarHide: true 5 | --- 6 | 7 | # 同名页面 8 | 9 | 嗨!这是一个内部页面。 10 | 11 | ## 章节 2 12 | 13 | 章节 2 内容。 14 | 15 | ### 子章节 2.1 16 | 17 | 子章节 2.1 内容。 18 | 19 | ## 章节 3 20 | 21 | 章节 3 内容。 22 | 23 | ### 子章节 3.1 24 | 25 | 子章节 3.1 内容。 26 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/双向链接示例页面.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 双向链接 3 | category: 双向链接 4 | sidebarHide: true 5 | --- 6 | 7 | # 双向链接示例页面 8 | 9 | 嗨!这是一个内部页面。 10 | 11 | ## 章节 2 12 | 13 | 章节 2 内容。 14 | 15 | ### 子章节 2.1 16 | 17 | 子章节 2.1 内容。 18 | 19 | ## 章节 3 20 | 21 | 章节 3 内容。 22 | 23 | ### 子章节 3.1 24 | 25 | 子章节 3.1 内容。 26 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-day-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-day-theme.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-night-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/markdown-it-element-transform/assets/vite-plugin-inspect-screenshot-night-theme.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/demo-1.zh-CN.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/demo-1.zh-CN.mp4 -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/demo-2.zh-CN.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/demo-2.zh-CN.mp4 -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/demo-3.zh-CN.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/demo-3.zh-CN.mp4 -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-1.zh-CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-1.zh-CN.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-2.zh-CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-2.zh-CN.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-3.zh-CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-3.zh-CN.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-4.zh-CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/how-to-install-screenshot-4.zh-CN.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/screenshot-1.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/obsidian-plugin-unocss/assets/screenshot-2.png -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/vitepress-plugin-enhanced-readabilities/assets/demo-video-1.zh-CN.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/vitepress-plugin-enhanced-readabilities/assets/demo-video-1.zh-CN.mov -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/vitepress-plugin-highlight-targeted-heading/assets/demo-video-1.zh-CN.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/pages/zh-CN/integrations/vitepress-plugin-highlight-targeted-heading/assets/demo-video-1.zh-CN.mov -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/vitepress-plugin-index/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 索引页 3 | category: 索引页 4 | --- 5 | 6 | 9 | 10 | # 索引页 11 | 12 | ::: warning 🚧 施工中 13 | 很高兴见到你!但很抱歉,这个页面还在施工中,如果没有找到你感兴趣的信息,你可以先在侧边栏的导航中寻找你感兴趣的内容来开始阅读 14 | ::: 15 | 16 | 内容施工中,敬请期待! 17 | 18 | ## 安装 19 | 20 | 通过运行以下命令将 `@nolebase/vitepress-plugin-index` 安装到您的项目依赖项中: 21 | 22 | ::: code-group 23 | 24 | ```shell [@antfu/ni] 25 | ni @nolebase/vitepress-plugin-index -D 26 | ``` 27 | 28 | ```shell [pnpm] 29 | pnpm add @nolebase/vitepress-plugin-index -D 30 | ``` 31 | 32 | ```shell [npm] 33 | npm install @nolebase/vitepress-plugin-index -D 34 | ``` 35 | 36 | ```shell [yarn] 37 | yarn add @nolebase/vitepress-plugin-index -D 38 | ``` 39 | 40 | ::: 41 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/vitepress-plugin-meta/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 页面 元信息生成 3 | category: 页面 元信息生成 4 | --- 5 | 6 | 9 | 10 | # 页面 `` 元信息生成 11 | 12 | ::: warning 🚧 施工中 13 | 很高兴见到你!但很抱歉,这个页面还在施工中,如果没有找到你感兴趣的信息,你可以先在侧边栏的导航中寻找你感兴趣的内容来开始阅读 14 | ::: 15 | 16 | 内容施工中,敬请期待! 17 | 18 | ## 安装 19 | 20 | 通过运行以下命令将 `@nolebase/vitepress-plugin-meta` 安装到您的项目依赖项中: 21 | 22 | ::: code-group 23 | 24 | ```shell [@antfu/ni] 25 | ni @nolebase/vitepress-plugin-meta -D 26 | ``` 27 | 28 | ```shell [pnpm] 29 | pnpm add @nolebase/vitepress-plugin-meta -D 30 | ``` 31 | 32 | ```shell [npm] 33 | npm install @nolebase/vitepress-plugin-meta -D 34 | ``` 35 | 36 | ```shell [yarn] 37 | yarn add @nolebase/vitepress-plugin-meta -D 38 | ``` 39 | 40 | ::: 41 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/vitepress-plugin-page-properties/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 页面属性 3 | category: 页面属性 4 | tags: 5 | - 集成/VitePress-插件 6 | - 集成/VitePress-插件/页面属性 7 | - Markdown/frontmatter 8 | progress: 35 9 | url1: https://nolebase-integrations.ayaka.io/pages/zh-CN/ 10 | createdAt: 2024-01-23 11 | updatedAt: 2024-01-23 12 | --- 13 | 14 | 17 | 18 | # 页面属性 19 | 20 | 「页面属性」功能因受 Notion 页面属性的巨大启发而诞生。 21 | 22 | ## 安装 23 | 24 | 通过运行以下命令将 `@nolebase/vitepress-plugin-page-properties` 安装到您的项目依赖项中: 25 | 26 | ::: code-group 27 | 28 | ```shell [@antfu/ni] 29 | ni @nolebase/vitepress-plugin-page-properties -D 30 | ``` 31 | 32 | ```shell [pnpm] 33 | pnpm add @nolebase/vitepress-plugin-page-properties -D 34 | ``` 35 | 36 | ```shell [npm] 37 | npm install @nolebase/vitepress-plugin-page-properties -D 38 | ``` 39 | 40 | ```shell [yarn] 41 | yarn add @nolebase/vitepress-plugin-page-properties -D 42 | ``` 43 | 44 | ::: 45 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/vitepress-plugin-thumbnail-hash/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 缩略图模糊哈希生成 3 | category: 缩略图模糊哈希生成 4 | sidebarTitle: 缩略图模糊哈希生成 5 | --- 6 | 7 | 10 | 11 | # 缩略图模糊哈希生成 12 | 13 | 为什么要使用缩略图?在渲染大型文档的页面时,如果没有缩略图、blurhash 或 thumbhash 辅佐优化图像的话,浏览器将尝试加载原始图像,加载可能会导致巨大的性能问题,加载后甚至导致页面布局抖动、闪烁和重绘,从而最终导致不佳的用户体验。 14 | 15 | 我们通过将 Thumbhash 算法集成到 VitePress 站点中解决了这个问题: 16 | 17 | ::: info 试试看与下面的 Thumbhash 预览组件互动,看看它是如何工作的! 18 | 19 | 可以替换成你的图片,或尝试编辑生成后的 Thumbhash base64。 20 | 21 | ::: 22 | 23 | 33 | 34 | 生成的 Thumbhash base64 将如下所示: 35 | 36 | ```plaintext 37 | HikOLYh4eXepiHecd/d3eoaAdwh4 38 | ``` 39 | 40 | 如果你有与 VitePress 连接的数据库或 CMS,可以将 Thumbhash base64 存储到数据库中,并在你的 VitePress 站点中使用它进行图像渲染。 41 | 它小到几乎没有存储压力,快到可以在你的 VitePress 站点中快速渲染。 42 | 43 | ## 功能 44 | 45 |
46 |
47 | 由 unlazy 提供底层技术实现 48 |
49 | 支持 JPEG、PNG、WebP 的 Thumbhash 生成 50 |
51 | 图像加载时平滑的动画过渡 52 |
53 | 54 | ## 安装 55 | 56 | 安装是非常简单容易的,请移步至[快速上手](./getting-started)阅读试试看吧! 57 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/integrations/vitepress-plugin-thumbnail-hash/thumbhash.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 缩略图模糊哈希生成 3 | category: 缩略图模糊哈希生成 4 | sidebarTitle: 尝试一下 5 | aside: false 6 | nolebase: 7 | gitChangelog: false 8 | pageProperties: false 9 | --- 10 | 11 | # 尝试 Thumbhash 12 | 13 |
14 | 15 | 24 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/releases/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: 发布 3 | sidebarCollapsed: false 4 | --- 5 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/releases/migrations/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 迁移 3 | category: Index 4 | --- 5 | 6 | # 迁移 7 | 8 | 目前,该项目的**正在进行的开发版本**是:`v2`。 9 | 10 | 您可以在这里找到迁移指南: 11 | 12 | - [自 `v1` 迁移至 `v2`](v1-to-v2.md) 13 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/releases/migrations/v2-to-v3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 自 v2 迁移至 v3 3 | category: 迁移 4 | --- 5 | 6 | # 自 `v2` 迁移至 `v3` 7 | 8 | ## 基于 Git 的页面历史 9 | 10 | ### UI 配置 11 | 12 | - `mapAuthors` 已被弃用,请在 Vite 插件中配置该选项。 13 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/snippets/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: 片段 3 | sidebarHide: true 4 | --- 5 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/snippets/configure-on-your-own-warning.md: -------------------------------------------------------------------------------- 1 | ::: warning 注意 2 | 自由配置是为那些了解并清楚自己在做什么的用户准备的,如果你不清楚自己在做什么,或者在配置期间遭遇到了问题,那么请使用开箱即用的 [VitePress 配置](#为-vitepress-配置)。 3 | ::: 4 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/snippets/configure-tsconfig.md: -------------------------------------------------------------------------------- 1 | ::: details 是 TypeScript 用户吗? 2 | 3 | 至少需要配置下面的几个选项: 4 | 5 | ```jsonc 6 | { 7 | "compilerOptions": { 8 | "module": "ESNext", // [!code hl] 9 | "moduleResolution": "Bundler", // [!code hl] 10 | }, 11 | "include": [ 12 | "**/.vitepress/**/*.ts", 13 | "**/.vitepress/**/*.mts", 14 | "**/.vitepress/**/*.vue" 15 | ], 16 | "exclude": [ 17 | "node_modules" 18 | ] 19 | } 20 | ``` 21 | 22 | 其中的 23 | 24 | - `module` 选项指定了 JavaScript/TypeScript 的模块格式,Nolebase Integrations 默认使用与 `ESNext` 相兼容的模块格式。 25 | - `moduleResolution` 选项指定了模块解析策略,因为所有的 Nolebase Integrations 插件都遵循最新的 ECMAScript 规范与导出声明,如果你遇到了 `Cannot find module ... or its corresponding type declarations` 的错误,你可能需要将 `moduleResolution` 设置为 `Bundler`。 26 | 27 | 如果你想要更多的配置,可以参考下面的示例: 28 | 29 | ```jsonc 30 | { 31 | "compilerOptions": { 32 | "jsx": "preserve", 33 | "lib": [ 34 | "DOM", 35 | "ESNext" 36 | ], 37 | "module": "ESNext", 38 | "moduleResolution": "Bundler", 39 | "resolveJsonModule": true, 40 | "strict": true, 41 | "strictNullChecks": true, 42 | "noFallthroughCasesInSwitch": true, 43 | "noImplicitAny": true, 44 | "noUnusedLocals": true, 45 | "noUnusedParameters": true, 46 | "noEmit": true, 47 | "removeComments": false, 48 | "esModuleInterop": true, 49 | "forceConsistentCasingInFileNames": true, 50 | "isolatedModules": true, 51 | "verbatimModuleSyntax": true, 52 | "skipLibCheck": true 53 | }, 54 | "include": [ 55 | "**/.vitepress/**/*.ts", 56 | "**/.vitepress/**/*.mts", 57 | "**/.vitepress/**/*.vue" 58 | ], 59 | "exclude": [ 60 | "node_modules" 61 | ] 62 | } 63 | ``` 64 | 65 | ::: 66 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/snippets/details-colored-diff.md: -------------------------------------------------------------------------------- 1 | ::: details 如果你未曾见过这种红色绿色的标记 2 | 这是一种用于在用户界面(UI)上展示**差异对比**的标记规则。 3 | 4 | 红色的部分是你需要删除的,通常也以「减号 -」来表示,或者你可以理解为:这行文本原本的模样; 5 | 6 | 绿色的部分是你需要添加的,通常也以「加号 +」来表示,或者你可以理解为:这行文本将会被修改为的模样。 7 | 8 | > 如果你想要了解更多有关「**差异对比**」的知识,你可以查看[这篇有关 diffutils 历史的英文回答](https://unix.stackexchange.com/questions/196565/how-to-color-diff-output)和 [Git 的文档](https://git-scm.com/docs/git-diff) 9 | ::: 10 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/snippets/troubleshooting-cannot-find-module.md: -------------------------------------------------------------------------------- 1 | 如果有任何的 Nolebase Integrations 插件在 `.ts` 或 `.vue` 文件中出现此错误,你可能需要在 `tsconfig.json` 文件中配置 `moduleResolution` 选项: 2 | 3 | ```jsonc 4 | { 5 | "compilerOptions": { 6 | "module": "ESNext", // [!code focus] 7 | "moduleResolution": "Bundler", // [!code focus] 8 | }, 9 | "include": [ 10 | "**/.vitepress/**/*.ts", 11 | "**/.vitepress/**/*.mts", 12 | "**/.vitepress/**/*.vue" 13 | ], 14 | "exclude": [ 15 | "node_modules" 16 | ] 17 | } 18 | ``` 19 | 20 | 如果错误仍然存在,请提交 [GitHub issue](https://github.com/nolebase/integrations/issues) 以获得进一步帮助并排除故障。 21 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/ui/_page.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarCollapsed: false 3 | --- 4 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/ui/button/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 按钮 3 | category: UI 4 | --- 5 | 6 | 9 | 10 | # 按钮 11 | 12 | ::: danger 🛑 此包仍处于 Alpha 测试阶段 13 | 此包仍处于 Alpha 测试阶段,不建议在生产中使用。未来 API 可能会发生变化,当前版本可能存在错误。请谨慎使用。 14 | ::: 15 | 16 | ::: warning 🚧 施工中 17 | 很高兴见到你!但很抱歉,这个页面还在施工中,如果没有找到你感兴趣的信息,你可以先在侧边栏的导航中寻找你感兴趣的内容来开始阅读 18 | ::: 19 | 20 |
21 | 22 | ABCD 23 | 24 |
25 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/ui/input-slider/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 滑块 3 | category: UI 4 | --- 5 | 6 | 9 | 10 | # 滑块 11 | 12 | ::: danger 🛑 此包仍处于 Alpha 测试阶段 13 | 此包仍处于 Alpha 测试阶段,不建议在生产中使用。未来 API 可能会发生变化,当前版本可能存在错误。请谨慎使用。 14 | ::: 15 | 16 | ## 示例 17 | 18 | 25 | -------------------------------------------------------------------------------- /docs/pages/zh-CN/ui/tag/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 标签 3 | category: UI 4 | --- 5 | 6 | 9 | 10 | # 标签 11 | 12 | ::: danger 🛑 此包仍处于 Alpha 测试阶段 13 | 此包仍处于 Alpha 测试阶段,不建议在生产中使用。未来 API 可能会发生变化,当前版本可能存在错误。请谨慎使用。 14 | ::: 15 | 16 | ::: warning 🚧 施工中 17 | 很高兴见到你!但很抱歉,这个页面还在施工中,如果没有找到你感兴趣的信息,你可以先在侧边栏的导航中寻找你感兴趣的内容来开始阅读 18 | ::: 19 | 20 | ## 多状态 21 | 22 | ### 普通状态 23 | 24 |
25 | 26 | 27 | 28 | 29 |
30 | 31 | ### 编辑状态 32 | 33 |
34 | 35 | 36 | 37 | 38 |
39 | -------------------------------------------------------------------------------- /docs/public/_redirects: -------------------------------------------------------------------------------- 1 | # Plausible.io analytics 2 | # 3 | # Proxying Plausible through Netlify | Plausible docs 4 | # https://plausible.io/docs/proxy/guides/netlify 5 | /assets/page-external-data/js/script.js https://plausible.io/js/script.js 200 6 | /api/v1/page-external-data/submit https://plausible.io/api/event 200 7 | 8 | # i18n 9 | /* /pages/en/:splat 301 10 | /* /pages/zh-CN/:splat 301 Language=zh-cn 11 | -------------------------------------------------------------------------------- /docs/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /docs/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/public/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #603cba 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/favicon-16x16.png -------------------------------------------------------------------------------- /docs/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/favicon-32x32.png -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/favicon.ico -------------------------------------------------------------------------------- /docs/public/icons/crystall-ball-emoji-animated.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/icons/crystall-ball-emoji-animated.riv -------------------------------------------------------------------------------- /docs/public/icons/easter-island-statue-emoji-animated.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/icons/easter-island-statue-emoji-animated.riv -------------------------------------------------------------------------------- /docs/public/icons/rocket-emoji-animated.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/icons/rocket-emoji-animated.riv -------------------------------------------------------------------------------- /docs/public/icons/star-emoji-animated.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/icons/star-emoji-animated.riv -------------------------------------------------------------------------------- /docs/public/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/logo-dark.png -------------------------------------------------------------------------------- /docs/public/logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/logo-light.png -------------------------------------------------------------------------------- /docs/public/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/mstile-144x144.png -------------------------------------------------------------------------------- /docs/public/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/mstile-150x150.png -------------------------------------------------------------------------------- /docs/public/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/mstile-310x150.png -------------------------------------------------------------------------------- /docs/public/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/mstile-310x310.png -------------------------------------------------------------------------------- /docs/public/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/mstile-70x70.png -------------------------------------------------------------------------------- /docs/public/obsidian-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/public/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "\u732b\u97f3\u77e5\u8bc6\u5e93", 3 | "short_name": "\u732b\u97f3\u77e5\u8bc6\u5e93", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /docs/public/thumbhash-test-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/docs/public/thumbhash-test-image.jpg -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "./yaml.d.ts", 6 | "node", 7 | "vite/client", 8 | "@nolebase/vitepress-plugin-git-changelog/types/virtual.d.ts", 9 | "@nolebase/vitepress-plugin-page-properties/client/virtual.d.ts" 10 | ], 11 | "noImplicitAny": false, 12 | "declaration": true, 13 | "noEmit": false, 14 | "outDir": "./.vitepress/dist" 15 | }, 16 | "include": [ 17 | "./.vitepress/**/*.ts", 18 | "./.vitepress/**/*.mts", 19 | "./.vitepress/**/*.tsx", 20 | "./.vitepress/**/*.d.ts", 21 | "./.vitepress/**/*.vue" 22 | ], 23 | "exclude": [ 24 | "**/.vitepress/dist/**", 25 | "node_modules" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /docs/uno.config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | defineConfig, 3 | presetAttributify, 4 | presetIcons, 5 | presetWebFonts, 6 | presetWind3, 7 | } from 'unocss' 8 | 9 | export default defineConfig({ 10 | shortcuts: [], 11 | presets: [ 12 | presetWind3({ 13 | dark: 'class', 14 | }), 15 | presetAttributify(), 16 | presetIcons({ 17 | prefix: 'i-', 18 | scale: 1.2, // size: 1.2 rem 19 | extraProperties: { 20 | 'display': 'inline-block', 21 | 'vertical-align': 'middle', 22 | 'min-width': '1.2rem', 23 | }, 24 | }), 25 | presetWebFonts({ 26 | fonts: { 27 | 'chakra-petch': ['Chakra Petch'], 28 | 'baloo-2': [ 29 | { 30 | name: 'Baloo 2', 31 | }, 32 | { 33 | name: 'Noto Sans', 34 | }, 35 | { 36 | name: 'Roboto', 37 | }, 38 | { 39 | name: 'sans-serif', 40 | provider: 'none', 41 | }, 42 | ], 43 | 'jura': ['Jura'], 44 | }, 45 | timeouts: { 46 | failure: 10000, 47 | warning: 10000, 48 | }, 49 | }), 50 | ], 51 | }) 52 | -------------------------------------------------------------------------------- /docs/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | // Env Variables and Modes | Vite 2 | // https://vitejs.dev/guide/env-and-mode#intellisense-for-typescript 3 | 4 | interface ImportMetaEnv { 5 | readonly VUE_PROD_HYDRATION_MISMATCH_DETAILS_FLAG?: '1' 6 | } 7 | 8 | interface ImportMeta { 9 | readonly env: ImportMetaEnv 10 | } 11 | -------------------------------------------------------------------------------- /docs/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import antfu from '@antfu/eslint-config' 2 | 3 | export default antfu({ 4 | unocss: true, 5 | ignores: [ 6 | '**/*.md', 7 | '**/*.yaml', 8 | '**/*.yml', 9 | ], 10 | }) 11 | -------------------------------------------------------------------------------- /packages/integrations/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/integrations` 2 | 3 | All-in-one package for VitePress plugins and VitePress theme extensions. 4 | 5 | Supporting all Nólëbase Integrations with default theme. 6 | 7 | ## Install 8 | 9 | ### Npm 10 | 11 | ```shell 12 | npm i @nolebase/integrations -D 13 | ``` 14 | 15 | ### Yarn 16 | 17 | ```shell 18 | yarn add @nolebase/integrations -D 19 | ``` 20 | 21 | ### Pnpm 22 | 23 | ```shell 24 | pnpm add @nolebase/integrations -D 25 | ``` 26 | 27 | ## Documentation 28 | 29 | Please refer to [Integrations](https://nolebase-integrations.ayaka.io/pages/en/integrations/) for more information. 30 | -------------------------------------------------------------------------------- /packages/integrations/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | externals: [ 5 | 'vue', 6 | 'vitepress', 7 | 'vite', 8 | 'node:process', 9 | ], 10 | }) 11 | -------------------------------------------------------------------------------- /packages/integrations/src/index.ts: -------------------------------------------------------------------------------- 1 | console.warn('Please import @nolebase/integrations/vitepress instead') 2 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/client/types.ts: -------------------------------------------------------------------------------- 1 | import type { Options as NolebaseEnhancedReadabilitiesOptions } from '@nolebase/vitepress-plugin-enhanced-readabilities/client' 2 | import type { Options as NolebaseGitChangelogOptions } from '@nolebase/vitepress-plugin-git-changelog/client' 3 | import type { Options as NolebaseInlineLinkPreviewOptions } from '@nolebase/vitepress-plugin-inline-link-preview/client' 4 | import type { Options as NolebasePagePropertiesOptions } from '@nolebase/vitepress-plugin-page-properties/client' 5 | 6 | export interface PresetClientOptions { 7 | enhancedMark?: false 8 | enhancedReadabilities?: false | { options?: NolebaseEnhancedReadabilitiesOptions } 9 | gitChangelog?: false | { options?: NolebaseGitChangelogOptions } 10 | highlightTargetedHeading?: false 11 | index?: false 12 | inlineLinkPreview?: false | { options?: NolebaseInlineLinkPreviewOptions } 13 | pageProperties?: false | { options?: NolebasePagePropertiesOptions } 14 | thumbnailHash?: false 15 | } 16 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/client/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types' 2 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/client/utils/slots.ts: -------------------------------------------------------------------------------- 1 | import type { Layout, Slots } from './types' 2 | 3 | export function applySlots(globalSlots: Record Slots[number]>> = {}, slots: Layout['slots']) { 4 | if (!slots) 5 | return 6 | 7 | for (const [key, value] of Object.entries(slots)) { 8 | if (value.override) { 9 | // Ensure value.node is treated as an array, even if it's a single function. 10 | globalSlots[key] = Array.isArray(value.node) ? value.node : [value.node] 11 | } 12 | else { 13 | // If the key doesn't exist, initialize it with an empty array. 14 | if (!globalSlots[key]) 15 | globalSlots[key] = [] 16 | 17 | // Concatenate the existing slots with the new ones, ensuring value.node is an array. 18 | globalSlots[key] = globalSlots[key].concat(Array.isArray(value.node) ? value.node : [value.node]) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/client/utils/types.ts: -------------------------------------------------------------------------------- 1 | import type { EnhanceAppContext as VitePressEnhanceAppContext } from 'vitepress' 2 | import type { h } from 'vue' 3 | 4 | export type Slots = ReturnType[] 5 | 6 | export interface Layout { 7 | slots?: Record Slots[number]>, override?: boolean }> 8 | } 9 | 10 | export interface PresetClient { 11 | enhanceLayout?: () => Record Slots[number]>> 12 | enhanceApp?: (ctx: VitePressEnhanceAppContext) => void | Promise 13 | } 14 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/index.ts: -------------------------------------------------------------------------------- 1 | console.warn('Please import @nolebase/integrations/vitepress/client instead') 2 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/markdown-it/index.ts: -------------------------------------------------------------------------------- 1 | import type { BiDirectionalLinksOptions } from '@nolebase/markdown-it-bi-directional-links' 2 | import type { UnlazyImagesOptions } from '@nolebase/markdown-it-unlazy-img' 3 | import type { PresetMarkdownIt } from './types' 4 | import { cwd } from 'node:process' 5 | import defu from 'defu' 6 | 7 | interface MarkdownItOptions { 8 | bidirectionalLinks?: | { options?: BiDirectionalLinksOptions } 9 | unlazyImages?: false | { options?: UnlazyImagesOptions } 10 | inlineLinkPreview?: false | { options?: { tag: string } } 11 | } 12 | 13 | export function presetMarkdownIt(options?: MarkdownItOptions): PresetMarkdownIt { 14 | const opts = defu(options, { 15 | bidirectionalLinks: { 16 | options: { 17 | dir: cwd(), 18 | }, 19 | }, 20 | unlazyImages: { 21 | options: { 22 | imgElementTag: 'NolebaseUnlazyImg', 23 | }, 24 | }, 25 | inlineLinkPreview: true as any, 26 | }) 27 | 28 | return { 29 | async install(md) { 30 | if (opts.bidirectionalLinks) { 31 | const { BiDirectionalLinks } = await import('@nolebase/markdown-it-bi-directional-links') 32 | md.use(BiDirectionalLinks(opts.bidirectionalLinks.options)) 33 | } 34 | if (opts.unlazyImages) { 35 | const { UnlazyImages } = await import('@nolebase/markdown-it-unlazy-img') 36 | md.use(UnlazyImages(), opts.unlazyImages.options) 37 | } 38 | 39 | if (opts.inlineLinkPreview) { 40 | const { InlineLinkPreviewElementTransform } = await import('@nolebase/vitepress-plugin-inline-link-preview/markdown-it') 41 | md.use(InlineLinkPreviewElementTransform, opts.inlineLinkPreview.options) 42 | } 43 | }, 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/markdown-it/types.ts: -------------------------------------------------------------------------------- 1 | export interface PresetMarkdownIt { 2 | install: (md: any) => Promise 3 | } 4 | -------------------------------------------------------------------------------- /packages/integrations/src/vitepress/vite/types.ts: -------------------------------------------------------------------------------- 1 | import type { GitChangelogMarkdownSectionOptions, GitChangelogOptions } from '@nolebase/vitepress-plugin-git-changelog/vite/types' 2 | import type { PagePropertiesMarkdownSectionOptions } from '@nolebase/vitepress-plugin-page-properties/vite' 3 | import type { Plugin } from 'vite' 4 | 5 | export interface PresetVite extends Plugin { 6 | plugins: () => Plugin[] 7 | } 8 | 9 | export interface PresetViteOptions { 10 | gitChangelog: false | { 11 | options: { 12 | gitChangelog: GitChangelogOptions 13 | markdownSection?: GitChangelogMarkdownSectionOptions 14 | } 15 | } 16 | pageProperties?: false | { 17 | options?: { 18 | markdownSection?: PagePropertiesMarkdownSectionOptions 19 | } 20 | } 21 | thumbnailHashImages?: false 22 | } 23 | -------------------------------------------------------------------------------- /packages/integrations/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "./yaml.d.ts", 6 | "node", 7 | "vite/client", 8 | "@nolebase/vitepress-plugin-git-changelog/types/virtual.d.ts", 9 | "@nolebase/vitepress-plugin-page-properties/client/virtual.d.ts" 10 | ], 11 | "noImplicitAny": false, 12 | "declaration": true, 13 | "noEmit": false, 14 | "outDir": "./dist" 15 | }, 16 | "include": [ 17 | "./src/**/*.ts", 18 | "./src/**/*.mts", 19 | "./src/**/*.tsx", 20 | "./src/**/*.d.ts", 21 | "./src/**/*.vue" 22 | ], 23 | "exclude": [ 24 | "**/dist/**", 25 | "node_modules" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /packages/integrations/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/markdown-it-bi-directional-links` 2 | 3 | A [`markdown-it`](https://github.com/markdown-it/markdown-it) plugin that adds Obsidian compatible internal links (bi-directional links) to your markdown. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/markdown-it-bi-directional-links -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/markdown-it-bi-directional-links -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/markdown-it-bi-directional-links -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Bi-directional Links](https://nolebase-integrations.ayaka.io/pages/en/integrations/markdown-it-bi-directional-links/) for more information. 28 | -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/markdown-it-bi-directional-links", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A markdown-it plugin that adds Obsidian compatible internal links (bi-directional links) to your markdown.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/integrations/markdown-it-bi-directional-links/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/markdown-it-bi-directional-links" 17 | }, 18 | "keywords": [ 19 | "vitepress", 20 | "nolebase", 21 | "readabilities", 22 | "markdown", 23 | "markdown-it", 24 | "markdown-it-plugin", 25 | "vitepress-plugin", 26 | "nolebase-integration" 27 | ], 28 | "exports": { 29 | ".": { 30 | "types": "./dist/index.d.ts", 31 | "import": "./dist/index.mjs", 32 | "require": "./dist/index.cjs" 33 | } 34 | }, 35 | "main": "dist/index.cjs", 36 | "module": "dist/index.mjs", 37 | "types": "dist/index.d.ts", 38 | "files": [ 39 | "dist" 40 | ], 41 | "scripts": { 42 | "stub": "unbuild --stub", 43 | "dev": "unbuild --stub", 44 | "build": "unbuild", 45 | "typecheck": "tsc --noEmit" 46 | }, 47 | "peerDependencies": { 48 | "markdown-it": ">=14.1.0" 49 | }, 50 | "dependencies": { 51 | "colorette": "^2.0.20", 52 | "debug": "^4.4.1", 53 | "tinyglobby": "^0.2.14" 54 | }, 55 | "devDependencies": { 56 | "@types/debug": "^4.1.12", 57 | "@types/markdown-it": "^14.1.2" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/src/testdata/foo bar.md: -------------------------------------------------------------------------------- 1 | # foo bar 2 | -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/src/testdata/foo.md: -------------------------------------------------------------------------------- 1 | # foo 2 | -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/src/testdata/foo.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/packages/markdown-it-bi-directional-links/src/testdata/foo.mp3 -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/src/testdata/foo.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/packages/markdown-it-bi-directional-links/src/testdata/foo.mp4 -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/src/testdata/foo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/packages/markdown-it-bi-directional-links/src/testdata/foo.png -------------------------------------------------------------------------------- /packages/markdown-it-bi-directional-links/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.d.ts" 12 | ], 13 | "exclude": [ 14 | "**/dist/**", 15 | "node_modules" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/markdown-it-element-transform/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/markdown-it-element-transform` 2 | 3 | A [`markdown-it`](https://github.com/markdown-it/markdown-it) plugin that transforms elements. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/markdown-it-element-transform -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/markdown-it-element-transform -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/markdown-it-element-transform -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Element Transform](https://nolebase-integrations.ayaka.io/pages/en/integrations/markdown-it-element-transform/) for more information. 28 | -------------------------------------------------------------------------------- /packages/markdown-it-element-transform/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/markdown-it-element-transform", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A markdown-it plugin that transforms elements.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/integrations/markdown-it-element-transform/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/markdown-it-element-transform" 17 | }, 18 | "keywords": [ 19 | "vitepress", 20 | "nolebase", 21 | "readabilities", 22 | "markdown", 23 | "markdown-it", 24 | "markdown-it-plugin", 25 | "vitepress-plugin", 26 | "nolebase-integration" 27 | ], 28 | "exports": { 29 | ".": { 30 | "types": "./dist/index.d.ts", 31 | "import": "./dist/index.mjs", 32 | "require": "./dist/index.cjs" 33 | } 34 | }, 35 | "main": "dist/index.cjs", 36 | "module": "dist/index.mjs", 37 | "types": "dist/index.d.ts", 38 | "files": [ 39 | "dist" 40 | ], 41 | "scripts": { 42 | "stub": "unbuild --stub", 43 | "dev": "unbuild --stub", 44 | "build": "unbuild", 45 | "typecheck": "tsc --noEmit" 46 | }, 47 | "peerDependencies": { 48 | "markdown-it": ">=14.1.0" 49 | }, 50 | "devDependencies": { 51 | "@types/markdown-it": "^14.1.2" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /packages/markdown-it-element-transform/src/index.ts: -------------------------------------------------------------------------------- 1 | import type { PluginWithOptions } from 'markdown-it' 2 | import type StateCore from 'markdown-it/lib/rules_core/state_core.mjs' 3 | import type Token from 'markdown-it/lib/token.mjs' 4 | 5 | export interface Options { 6 | /** 7 | * The function to transform the token 8 | * @param {Token} token The token to be transformed 9 | * @param {StateCore} state The state of the markdown-it 10 | * @param {object} env The environment of the markdown-it 11 | */ 12 | transform: (token: Token, state: StateCore, env: any) => void 13 | } 14 | 15 | /** 16 | * A markdown-it plugin to transform the token 17 | * @param md The markdown-it instance 18 | * @param options The options for the plugin 19 | * @param options.transform The function to transform the token 20 | */ 21 | export const ElementTransform: PluginWithOptions = (md, options) => { 22 | if (!options || !options.transform) 23 | throw new Error('The `transform` option is required') 24 | 25 | md.core.ruler.push( 26 | 'token_transform', 27 | (state) => { 28 | const transformFunc = options.transform === undefined ? function () { } : options.transform 29 | 30 | state.tokens.forEach((token) => { 31 | if (token.children && token.children.length) { 32 | token.children.forEach((token) => { 33 | transformFunc(token, state, state.env) 34 | }) 35 | } 36 | 37 | transformFunc(token, state, state.env) 38 | }) 39 | 40 | return false 41 | }, 42 | ) 43 | } 44 | -------------------------------------------------------------------------------- /packages/markdown-it-element-transform/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.d.ts" 12 | ], 13 | "exclude": [ 14 | "**/dist/**", 15 | "node_modules" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/markdown-it-unlazy-img/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/markdown-it-unlazy-img` 2 | 3 | A [`markdown-it`](https://github.com/markdown-it/markdown-it) plugin wraps and transforms image tags to support [unlazy](https://github.com/johannschopplich/unlazy) lazy loading with [blurhash](https://github.com/woltapp/blurhash), [thumbhash](https://github.com/evanw/thumbhash) encoding, and more. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/markdown-it-unlazy-img -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/markdown-it-unlazy-img -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/markdown-it-unlazy-img -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Lazy loading blurred images](https://nolebase-integrations.ayaka.io/pages/en/integrations/markdown-it-unlazy-img/) for more information. 28 | -------------------------------------------------------------------------------- /packages/markdown-it-unlazy-img/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/markdown-it-unlazy-img", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A markdown-it plugin wraps and transforms image tags to support lazy loading, blurhash, thumbhash, and more.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/integrations/markdown-it-unlazy-img/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/markdown-it-unlazy-img" 17 | }, 18 | "keywords": [ 19 | "vitepress", 20 | "nolebase", 21 | "readabilities", 22 | "markdown", 23 | "markdown-it", 24 | "markdown-it-plugin", 25 | "vitepress-plugin", 26 | "nolebase-integration", 27 | "image-optimization", 28 | "blurhash", 29 | "thumbhash" 30 | ], 31 | "exports": { 32 | ".": { 33 | "types": "./dist/index.d.ts", 34 | "import": "./dist/index.mjs", 35 | "require": "./dist/index.cjs" 36 | } 37 | }, 38 | "main": "dist/index.cjs", 39 | "module": "dist/index.mjs", 40 | "types": "dist/index.d.ts", 41 | "files": [ 42 | "dist" 43 | ], 44 | "scripts": { 45 | "stub": "unbuild --stub", 46 | "dev": "unbuild --stub", 47 | "build": "unbuild", 48 | "typecheck": "tsc --noEmit" 49 | }, 50 | "peerDependencies": { 51 | "markdown-it": ">=14.1.0" 52 | }, 53 | "dependencies": { 54 | "colorette": "^2.0.20", 55 | "tinyglobby": "^0.2.14", 56 | "vite": "catalog:" 57 | }, 58 | "devDependencies": { 59 | "@types/markdown-it": "^14.1.2" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /packages/markdown-it-unlazy-img/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.d.ts" 12 | ], 13 | "exclude": [ 14 | "**/dist/**", 15 | "node_modules" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/ui-asciinema/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/ui-asciinema` 2 | 3 | Wrapper of `asciinema-player` for VitePress documentation sites. 4 | 5 | > [!CAUTION] 6 | > 7 | > This package is in Alpha stage. 8 | > 9 | > This package is still in the Alpha stage, and it is not recommended to use it in production. The API may change in the future, and there may be bugs in the current version. Please use it with caution. 10 | 11 | > [!IMPORTANT] 12 | > 13 | > You will need to add the package to Vite's `ssr.noExternal` config [^1]. Without it your site may not build. 14 | > 15 | > ```typescript 16 | > // vite.config.ts 17 | > export default defineConfig({ 18 | > vite: { 19 | > ssr: { 20 | > noExternal: [ 21 | > "@nolebase/ui-asciinema", 22 | > ], 23 | > }, 24 | > }, 25 | > }) 26 | > ``` 27 | 28 | [^1]: Vite's `ssr.noExternal` config docs: https://vitejs.dev/guide/ssr.html#ssr-externals. 29 | 30 | ## Install 31 | 32 | ### Npm 33 | 34 | ```shell 35 | npm i @nolebase/ui-asciinema -D 36 | ``` 37 | 38 | ### Yarn 39 | 40 | ```shell 41 | yarn add @nolebase/ui-asciinema -D 42 | ``` 43 | 44 | ### Pnpm 45 | 46 | ```shell 47 | pnpm add @nolebase/ui-asciinema -D 48 | ``` 49 | 50 | ## Documentation 51 | 52 | Please refer to [Asciinema Player package's documentation site](https://nolebase-integrations.ayaka.io/pages/en/ui/asciinema-player/) for more information. 53 | -------------------------------------------------------------------------------- /packages/ui-asciinema/build.config.ts: -------------------------------------------------------------------------------- 1 | // Thanks to https://github.com/wobsoriano/vue-sfc-unbuild 2 | // and all the discussions in https://github.com/unjs/unbuild/issues/80 3 | // for the following configuration. 4 | 5 | import { exec } from 'node:child_process' 6 | import { promisify } from 'node:util' 7 | 8 | import { defineBuildConfig } from 'unbuild' 9 | 10 | const execAsync = promisify(exec) 11 | 12 | export default defineBuildConfig({ 13 | entries: [ 14 | { 15 | builder: 'mkdist', 16 | input: './src', 17 | pattern: ['**/*.vue'], 18 | loaders: ['vue'], 19 | }, 20 | { 21 | builder: 'mkdist', 22 | input: './src', 23 | pattern: ['**/*.ts'], 24 | format: 'cjs', 25 | loaders: ['js'], 26 | }, 27 | { 28 | builder: 'mkdist', 29 | input: './src', 30 | pattern: ['**/*.ts'], 31 | format: 'esm', 32 | loaders: ['js'], 33 | }, 34 | ], 35 | declaration: true, 36 | clean: true, 37 | externals: [ 38 | 'vue', 39 | ], 40 | hooks: { 41 | 'mkdist:done': async (ctx) => { 42 | if (ctx.options.stub) 43 | return 44 | // Since not all the users would choose to use unocss, 45 | // we bundle the styles from unocss here for users to opt-in. 46 | // 47 | // However, since the unocss doesn't provide a unplugin, or rollup 48 | // plugin for us to use, we have to use the CLI here. 49 | // 50 | // The use of CLI was suggested by how to use unocss with rollup? · unocss/unocss · Discussion #542 51 | // https:// github.com/unocss/unocss/discussions/542 52 | await execAsync('unocss "./src/**/*.vue" -o dist/style.css') 53 | }, 54 | }, 55 | }) 56 | -------------------------------------------------------------------------------- /packages/ui-asciinema/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/ui-asciinema", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "Wrapper of `asciinema-player` for VitePress documentation sites.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/ui/asciinema-player/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/ui-asciinema" 17 | }, 18 | "keywords": [ 19 | "unjs", 20 | "vue", 21 | "vite", 22 | "vitepress", 23 | "vitepress-plugin", 24 | "components", 25 | "component-library", 26 | "markdown", 27 | "frontmatter", 28 | "nolebase", 29 | "nolebase-integration", 30 | "asciinema", 31 | "asciinema-player" 32 | ], 33 | "sideEffects": [ 34 | "**/*.css" 35 | ], 36 | "exports": { 37 | ".": { 38 | "types": "./dist/index.d.ts", 39 | "import": "./dist/index.mjs", 40 | "require": "./dist/index.js" 41 | }, 42 | "./style.css": "./dist/style.css", 43 | "./*": { 44 | "types": "./dist/*", 45 | "import": "./dist/*.mjs", 46 | "require": "./dist/*.js" 47 | } 48 | }, 49 | "main": "./dist/index.js", 50 | "module": "./dist/index.mjs", 51 | "types": "./dist/index.d.ts", 52 | "typesVersions": { 53 | "*": { 54 | "*": [ 55 | "*", 56 | "dist/*", 57 | "dist/*.d.ts", 58 | "dist/*/index.d.ts" 59 | ] 60 | } 61 | }, 62 | "files": [ 63 | "README.md", 64 | "dist", 65 | "package.json" 66 | ], 67 | "scripts": { 68 | "dev": "unbuild --stub", 69 | "stub": "unbuild --stub", 70 | "build": "unbuild", 71 | "typecheck": "vue-tsc --noEmit" 72 | }, 73 | "peerDependencies": { 74 | "asciinema-player": "^3.9.0", 75 | "vitepress": "^1.5.0 || ^2.0.0-alpha.1" 76 | }, 77 | "dependencies": { 78 | "less": "^4.3.0", 79 | "vue": "catalog:" 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /packages/ui-asciinema/src/components/deps.ts: -------------------------------------------------------------------------------- 1 | // Collect optional external dependencies required by the components to avoid accessing them directly in `.vue` files. 2 | // Because users' vue-tsc may report errors due to missing optional dependencies when processing these `.vue` files in our repository. 3 | // 4 | // Ref: https://github.com/nolebase/integrations/pull/230 5 | 6 | // asciinema-player 7 | export * as AsciinemaPlayer from 'asciinema-player' 8 | -------------------------------------------------------------------------------- /packages/ui-asciinema/src/index.ts: -------------------------------------------------------------------------------- 1 | import NuAsciinemaPlayer from './components/NuAsciinemaPlayer.vue' 2 | 3 | export { 4 | NuAsciinemaPlayer, 5 | } 6 | -------------------------------------------------------------------------------- /packages/ui-asciinema/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "./src/asciinema.d.ts" 6 | ], 7 | "declaration": true, 8 | "emitDeclarationOnly": true, 9 | "noEmit": false, 10 | "outDir": "./dist" 11 | }, 12 | "include": [ 13 | "./src/**/*.ts", 14 | "./src/**/*.mts", 15 | "./src/**/*.tsx", 16 | "./src/**/*.d.ts", 17 | "./src/**/*.vue" 18 | ], 19 | "exclude": [ 20 | "**/dist/**", 21 | "node_modules" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /packages/ui-rive-canvas/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/ui-rive-canvas` 2 | 3 | Wrapper of `@rive-app/canvas` for VitePress documentation sites. 4 | 5 | > [!CAUTION] 6 | > 7 | > This package is in Alpha stage. 8 | > 9 | > This package is still in the Alpha stage, and it is not recommended to use it in production. The API may change in the future, and there may be bugs in the current version. Please use it with caution. 10 | 11 | > [!IMPORTANT] 12 | > 13 | > ## For users who imported VitePress related components 14 | > 15 | > If you are using VitePress, you will need to add the following configurations to your `vite.config.ts` file like this: 16 | > 17 | > ```typescript 18 | > export default defineConfig(() => { 19 | > return { 20 | > ssr: { 21 | > noExternal: [ 22 | > // Add this line to your vite.config.ts 23 | > '@nolebase/ui-rive-canvas', 24 | > ], 25 | > }, 26 | > } 27 | > }) 28 | > ``` 29 | > 30 | > For more information about why configure this, please refer to the [Server-Side Rendering | Vite](https://vitejs.dev/guide/ssr.html#ssr-externals) documentation. 31 | 32 | ## Install 33 | 34 | ### Npm 35 | 36 | ```shell 37 | npm i @nolebase/ui-rive-canvas -D 38 | ``` 39 | 40 | ### Yarn 41 | 42 | ```shell 43 | yarn add @nolebase/ui-rive-canvas -D 44 | ``` 45 | 46 | ### Pnpm 47 | 48 | ```shell 49 | pnpm add @nolebase/ui-rive-canvas -D 50 | ``` 51 | 52 | ## Documentation 53 | 54 | Please refer to [Rive Canvas](https://nolebase-integrations.ayaka.io/pages/en/ui/lazy-teleport-rive-canvas/) for more information. 55 | -------------------------------------------------------------------------------- /packages/ui-rive-canvas/build.config.ts: -------------------------------------------------------------------------------- 1 | // Thanks to https://github.com/wobsoriano/vue-sfc-unbuild 2 | // and all the discussions in https://github.com/unjs/unbuild/issues/80 3 | // for the following configuration. 4 | 5 | import { exec } from 'node:child_process' 6 | import { promisify } from 'node:util' 7 | 8 | import { defineBuildConfig } from 'unbuild' 9 | 10 | const execAsync = promisify(exec) 11 | 12 | export default defineBuildConfig({ 13 | entries: [ 14 | { 15 | builder: 'mkdist', 16 | input: './src', 17 | pattern: ['**/*.vue'], 18 | loaders: ['vue'], 19 | }, 20 | { 21 | builder: 'mkdist', 22 | input: './src', 23 | pattern: ['**/*.ts'], 24 | format: 'cjs', 25 | loaders: ['js'], 26 | }, 27 | { 28 | builder: 'mkdist', 29 | input: './src', 30 | pattern: ['**/*.ts'], 31 | format: 'esm', 32 | loaders: ['js'], 33 | }, 34 | ], 35 | declaration: true, 36 | clean: true, 37 | externals: [ 38 | '@rive-app/canvas', 39 | 'vue', 40 | ], 41 | hooks: { 42 | 'mkdist:done': async (ctx) => { 43 | if (ctx.options.stub) 44 | return 45 | // Since not all the users would choose to use unocss, 46 | // we bundle the styles from unocss here for users to opt-in. 47 | // 48 | // However, since the unocss doesn't provide a unplugin, or rollup 49 | // plugin for us to use, we have to use the CLI here. 50 | // 51 | // The use of CLI was suggested by how to use unocss with rollup? · unocss/unocss · Discussion #542 52 | // https:// github.com/unocss/unocss/discussions/542 53 | await execAsync('unocss "./src/**/*.vue" -o dist/style.css') 54 | }, 55 | }, 56 | }) 57 | -------------------------------------------------------------------------------- /packages/ui-rive-canvas/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/ui-rive-canvas", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "Wrapper of `@rive-app/canvas` for VitePress documentation sites.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/ui/lazy-teleport-rive-canvas/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/ui-rive-canvas" 17 | }, 18 | "keywords": [ 19 | "unjs", 20 | "vue", 21 | "vite", 22 | "vitepress", 23 | "vitepress-plugin", 24 | "components", 25 | "component-library", 26 | "markdown", 27 | "frontmatter", 28 | "nolebase", 29 | "nolebase-integration", 30 | "lottie", 31 | "rive" 32 | ], 33 | "sideEffects": [ 34 | "**/*.css" 35 | ], 36 | "exports": { 37 | ".": { 38 | "types": "./dist/index.d.ts", 39 | "import": "./dist/index.mjs", 40 | "require": "./dist/index.js" 41 | }, 42 | "./style.css": "./dist/style.css", 43 | "./*": { 44 | "types": "./dist/*", 45 | "import": "./dist/*.mjs", 46 | "require": "./dist/*.js" 47 | } 48 | }, 49 | "main": "./dist/index.js", 50 | "module": "./dist/index.mjs", 51 | "types": "./dist/index.d.ts", 52 | "typesVersions": { 53 | "*": { 54 | "*": [ 55 | "*", 56 | "dist/*", 57 | "dist/*.d.ts", 58 | "dist/*/index.d.ts" 59 | ] 60 | } 61 | }, 62 | "files": [ 63 | "README.md", 64 | "dist", 65 | "package.json" 66 | ], 67 | "scripts": { 68 | "dev": "unbuild --stub", 69 | "stub": "unbuild --stub", 70 | "build": "unbuild", 71 | "typecheck": "vue-tsc --noEmit" 72 | }, 73 | "peerDependencies": { 74 | "@rive-app/canvas": "^2.28.0", 75 | "vitepress": "^1.5.0 || ^2.0.0-alpha.1" 76 | }, 77 | "dependencies": { 78 | "less": "^4.3.0", 79 | "vue": "catalog:" 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /packages/ui-rive-canvas/src/components/deps.ts: -------------------------------------------------------------------------------- 1 | // Collect optional external dependencies required by the components to avoid accessing them directly in `.vue` files. 2 | // Because users' vue-tsc may report errors due to missing optional dependencies when processing these `.vue` files in our repository. 3 | // 4 | // Ref: https://github.com/nolebase/integrations/pull/230 5 | 6 | // @rive-app/canvas 7 | export * as rive from '@rive-app/canvas' 8 | export type { Rive } from '@rive-app/canvas' 9 | -------------------------------------------------------------------------------- /packages/ui-rive-canvas/src/index.ts: -------------------------------------------------------------------------------- 1 | import NuLazyTeleportRiveCanvas from './components/NuLazyTeleportRiveCanvas.vue' 2 | 3 | export { 4 | NuLazyTeleportRiveCanvas, 5 | } 6 | -------------------------------------------------------------------------------- /packages/ui-rive-canvas/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "emitDeclarationOnly": true, 6 | "noEmit": false, 7 | "outDir": "./dist" 8 | }, 9 | "include": [ 10 | "./src/**/*.ts", 11 | "./src/**/*.mts", 12 | "./src/**/*.tsx", 13 | "./src/**/*.d.ts", 14 | "./src/**/*.vue" 15 | ], 16 | "exclude": [ 17 | "**/dist/**", 18 | "node_modules" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /packages/ui/build.config.ts: -------------------------------------------------------------------------------- 1 | // Thanks to https://github.com/wobsoriano/vue-sfc-unbuild 2 | // and all the discussions in https://github.com/unjs/unbuild/issues/80 3 | // for the following configuration. 4 | 5 | import { exec } from 'node:child_process' 6 | import { promisify } from 'node:util' 7 | 8 | import { defineBuildConfig } from 'unbuild' 9 | 10 | const execAsync = promisify(exec) 11 | 12 | export default defineBuildConfig({ 13 | entries: [ 14 | { 15 | builder: 'mkdist', 16 | input: './src', 17 | pattern: ['**/*.vue'], 18 | loaders: ['vue'], 19 | }, 20 | { 21 | builder: 'mkdist', 22 | input: './src', 23 | pattern: ['**/*.ts'], 24 | format: 'cjs', 25 | loaders: ['js'], 26 | }, 27 | { 28 | builder: 'mkdist', 29 | input: './src', 30 | pattern: ['**/*.ts'], 31 | format: 'esm', 32 | loaders: ['js'], 33 | }, 34 | ], 35 | declaration: true, 36 | clean: true, 37 | externals: [ 38 | 'vue', 39 | ], 40 | hooks: { 41 | 'mkdist:done': async (ctx) => { 42 | if (ctx.options.stub) 43 | return 44 | // Since not all the users would choose to use unocss, 45 | // we bundle the styles from unocss here for users to opt-in. 46 | // 47 | // However, since the unocss doesn't provide a unplugin, or rollup 48 | // plugin for us to use, we have to use the CLI here. 49 | // 50 | // The use of CLI was suggested by how to use unocss with rollup? · unocss/unocss · Discussion #542 51 | // https:// github.com/unocss/unocss/discussions/542 52 | await execAsync('unocss "./src/**/*.vue" -o dist/style.css') 53 | }, 54 | }, 55 | }) 56 | -------------------------------------------------------------------------------- /packages/ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/ui", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A collection of Vue components Nolebase uses.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/ui/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/ui" 17 | }, 18 | "keywords": [ 19 | "unjs", 20 | "vue", 21 | "vite", 22 | "vitepress", 23 | "vitepress-plugin", 24 | "components", 25 | "component-library", 26 | "markdown", 27 | "frontmatter", 28 | "nolebase", 29 | "nolebase-integration" 30 | ], 31 | "sideEffects": [ 32 | "**/*.css" 33 | ], 34 | "exports": { 35 | ".": { 36 | "types": "./dist/index.d.ts", 37 | "import": "./dist/index.mjs", 38 | "require": "./dist/index.js" 39 | }, 40 | "./style.css": "./dist/style.css", 41 | "./*": { 42 | "types": "./dist/*", 43 | "import": "./dist/*.mjs", 44 | "require": "./dist/*.js" 45 | } 46 | }, 47 | "main": "./dist/index.js", 48 | "module": "./dist/index.mjs", 49 | "types": "./dist/index.d.ts", 50 | "typesVersions": { 51 | "*": { 52 | "*": [ 53 | "*", 54 | "dist/*", 55 | "dist/*.d.ts", 56 | "dist/*/index.d.ts" 57 | ] 58 | } 59 | }, 60 | "files": [ 61 | "README.md", 62 | "dist", 63 | "package.json" 64 | ], 65 | "scripts": { 66 | "dev": "unbuild --stub", 67 | "stub": "unbuild --stub", 68 | "build": "unbuild", 69 | "typecheck": "vue-tsc --noEmit" 70 | }, 71 | "peerDependencies": { 72 | "vitepress": "^1.5.0 || ^2.0.0-alpha.1" 73 | }, 74 | "dependencies": { 75 | "@iconify-json/octicon": "^1.2.6", 76 | "less": "^4.3.0", 77 | "vue": "catalog:" 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /packages/ui/src/components/NuButton.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 28 | -------------------------------------------------------------------------------- /packages/ui/src/components/NuInputHighlight.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | 19 | 31 | -------------------------------------------------------------------------------- /packages/ui/src/components/NuInputHorizontalRadioGroup/index.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 53 | -------------------------------------------------------------------------------- /packages/ui/src/components/NuTag/Item.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 30 | -------------------------------------------------------------------------------- /packages/ui/src/components/NuTag/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 52 | -------------------------------------------------------------------------------- /packages/ui/src/index.ts: -------------------------------------------------------------------------------- 1 | import NuButton from './components/NuButton.vue' 2 | import NuInputHighlight from './components/NuInputHighlight.vue' 3 | import NuInputHorizontalRadioGroup from './components/NuInputHorizontalRadioGroup/index.vue' 4 | import NuInputSlider from './components/NuInputSlider.vue' 5 | import NuTag from './components/NuTag/index.vue' 6 | import NuVerticalTransition from './components/NuVerticalTransition.vue' 7 | 8 | import { createI18n } from './composables/i18n' 9 | 10 | export { 11 | createI18n, 12 | NuButton, 13 | NuInputHighlight, 14 | NuInputHorizontalRadioGroup, 15 | NuInputSlider, 16 | NuTag, 17 | NuVerticalTransition, 18 | } 19 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "emitDeclarationOnly": true, 6 | "noEmit": false, 7 | "outDir": "./dist" 8 | }, 9 | "include": [ 10 | "./src/**/*.ts", 11 | "./src/**/*.mts", 12 | "./src/**/*.tsx", 13 | "./src/**/*.d.ts", 14 | "./src/**/*.vue" 15 | ], 16 | "exclude": [ 17 | "**/dist/**", 18 | "node_modules" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /packages/unconfig-vitepress/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/unconfig-vitepress` 2 | 3 | A unconfig (**un**ified **config**urations) for both VitePress and VitePress theme. Supporting all Nólëbase Integrations with default theme. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/unconfig-vitepress -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/unconfig-vitepress -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/unconfig-vitepress -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Unified Configuration of VitePress](https://nolebase-integrations.ayaka.io/pages/en/integrations/unconfig-vitepress/) for more information. 28 | -------------------------------------------------------------------------------- /packages/unconfig-vitepress/build.config.ts: -------------------------------------------------------------------------------- 1 | import builtins from 'builtin-modules' 2 | import { defineBuildConfig } from 'unbuild' 3 | 4 | export default defineBuildConfig({ 5 | entries: [ 6 | 'src/plugins/index.ts', 7 | 'src/index.ts', 8 | ], 9 | clean: true, 10 | sourcemap: true, 11 | declaration: true, 12 | externals: [ 13 | 'vue', 14 | 'vitepress', 15 | // builtins 16 | ...builtins, 17 | ], 18 | rollup: { 19 | emitCJS: true, 20 | }, 21 | }) 22 | -------------------------------------------------------------------------------- /packages/unconfig-vitepress/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './theme' 2 | -------------------------------------------------------------------------------- /packages/unconfig-vitepress/src/plugins/index.ts: -------------------------------------------------------------------------------- 1 | export { NolebasePluginPreset } from './nolebase' 2 | 3 | export type { NolebasePluginPresetOptions as NolebasePluginSetOptions } from './nolebase' 4 | -------------------------------------------------------------------------------- /packages/unconfig-vitepress/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { Theme, EnhanceAppContext as VitePressEnhanceAppContext } from 'vitepress' 2 | import type { h } from 'vue' 3 | 4 | export type Slots = ReturnType[] 5 | 6 | export interface Layout { 7 | slots?: { 8 | [key: string]: { 9 | node: Array<() => Slots[number]> 10 | override?: boolean 11 | } 12 | } 13 | } 14 | 15 | interface ConfigureLayoutContext { 16 | helpers: { 17 | defineSlot: (name: string, node: () => Slots[number], override?: boolean) => void 18 | } 19 | } 20 | 21 | interface EnhanceAppContext extends VitePressEnhanceAppContext { 22 | 23 | } 24 | 25 | export interface Plugin { 26 | configureLayout?: (context: ConfigureLayoutContext) => void 27 | enhanceApp?: (ctx: EnhanceAppContext) => void | Promise 28 | } 29 | 30 | export interface PluginSet { 31 | configureLayout?: (context: ConfigureLayoutContext) => void 32 | enhanceApp?: (ctx: EnhanceAppContext) => void | Promise 33 | } 34 | 35 | export interface DefineThemeUnconfigOptions { 36 | extends?: Theme 37 | layout?: Layout 38 | enhanceApp?: Theme['enhanceApp'] 39 | plugins?: Array 40 | pluginPresets?: Array 41 | } 42 | -------------------------------------------------------------------------------- /packages/unconfig-vitepress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "./yaml.d.ts", 6 | "node", 7 | "vite/client", 8 | "@nolebase/vitepress-plugin-git-changelog/types/virtual.d.ts", 9 | "@nolebase/vitepress-plugin-page-properties/client/virtual.d.ts" 10 | ], 11 | "noImplicitAny": false, 12 | "declaration": true, 13 | "noEmit": false, 14 | "outDir": "./dist" 15 | }, 16 | "include": [ 17 | "./src/**/*.ts", 18 | "./src/**/*.mts", 19 | "./src/**/*.tsx", 20 | "./src/**/*.d.ts", 21 | "./src/**/*.vue" 22 | ], 23 | "exclude": [ 24 | "**/dist/**", 25 | "node_modules" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /packages/unconfig-vitepress/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | ## Install 2 | 3 | A VitePress plugin that adds breadcrumbs to your documentation. 4 | 5 | ### Npm 6 | 7 | ```shell 8 | npm i @nolebase/vitepress-plugin-breadcrumbs -D 9 | ``` 10 | 11 | ### Yarn 12 | 13 | ```shell 14 | yarn add @nolebase/vitepress-plugin-breadcrumbs -D 15 | ``` 16 | 17 | ### Pnpm 18 | 19 | ```shell 20 | pnpm add @nolebase/vitepress-plugin-breadcrumbs -D 21 | ``` 22 | 23 | ## Documentation 24 | 25 | Please refer to [Breadcrumbs](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-breadcrumbs/) for more information. 26 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | entries: [ 5 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.vue'], loaders: ['vue'] }, 6 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'cjs', loaders: ['js'] }, 7 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'esm', loaders: ['js'] }, 8 | { builder: 'rollup', input: './src/vitepress/index', outDir: 'dist/vitepress/' }, 9 | ], 10 | rollup: { 11 | emitCJS: true, 12 | }, 13 | clean: true, 14 | sourcemap: true, 15 | declaration: true, 16 | }) 17 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/vitepress-plugin-breadcrumbs", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A VitePress plugin that adds breadcrumbs to your documentation.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-breadcrumbs/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/vitepress-plugin-breadcrumbs" 17 | }, 18 | "keywords": [ 19 | "vitepress", 20 | "nolebase", 21 | "vitepress-plugin", 22 | "nolebase-integration" 23 | ], 24 | "exports": { 25 | ".": { 26 | "types": "./dist/vitepress/index.d.ts", 27 | "import": "./dist/vitepress/index.mjs", 28 | "require": "./dist/vitepress/index.cjs" 29 | }, 30 | "./vitepress": { 31 | "types": "./dist/vitepress/index.d.ts", 32 | "import": "./dist/vitepress/index.mjs", 33 | "require": "./dist/vitepress/index.cjs" 34 | }, 35 | "./client": { 36 | "types": "./dist/client/index.d.ts", 37 | "import": "./dist/client/index.mjs", 38 | "require": "./dist/client/index.js" 39 | } 40 | }, 41 | "main": "./dist/vitepress/index.cjs", 42 | "module": "./dist/vitepress/index.mjs", 43 | "types": "./dist/vitepress/index.d.ts", 44 | "files": [ 45 | "README.md", 46 | "dist", 47 | "package.json" 48 | ], 49 | "scripts": { 50 | "dev": "unbuild --stub", 51 | "stub": "unbuild --stub", 52 | "build": "unbuild", 53 | "typecheck": "vue-tsc --noEmit" 54 | }, 55 | "peerDependencies": { 56 | "vitepress": "^1.5.0 || ^2.0.0-alpha.1" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/src/client/components/NolebaseBreadcrumbs.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | 51 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/src/client/index.ts: -------------------------------------------------------------------------------- 1 | import NolebaseBreadcrumbs from './components/NolebaseBreadcrumbs.vue' 2 | 3 | export { NolebaseBreadcrumbs } 4 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/src/test/breadcrumbs-data-generator.test.ts: -------------------------------------------------------------------------------- 1 | import type { PageData, TransformPageContext } from 'vitepress' 2 | import { expect, it } from 'vitest' 3 | import { generateBreadcrumbsData } from '../vitepress' 4 | 5 | it('page is not index', () => { 6 | const pageData = { 7 | relativePath: 'a/b/c/d.md', 8 | filePath: 'a/b/c/d.md', 9 | title: 'd', 10 | frontmatter: {}, 11 | } as PageData 12 | 13 | const context = { 14 | siteConfig: { 15 | site: { 16 | title: 'Home', 17 | }, 18 | pages: ['a', 'a/b', 'a/b/index.md', 'a/b/c/d.md'], 19 | }, 20 | } as TransformPageContext 21 | 22 | generateBreadcrumbsData(pageData, context) 23 | 24 | expect(pageData.frontmatter.breadcrumbs).toEqual([ 25 | { title: 'Home', link: '/a' }, 26 | { title: 'b', link: '/a/b' }, 27 | { title: 'c', link: '' }, 28 | { title: 'd', link: '/a/b/c/d' }, 29 | ]) 30 | }) 31 | 32 | it('page is index', () => { 33 | const pageData = { 34 | relativePath: 'a/b/c/d/index.md', 35 | filePath: 'a/b/c/d/index.md', 36 | title: 'd', 37 | frontmatter: {}, 38 | } as PageData 39 | 40 | const context = { 41 | siteConfig: { 42 | site: { 43 | title: 'Home', 44 | }, 45 | pages: ['a', 'a/b', 'a/b/index.md', 'a/b/c/d/index.md'], 46 | }, 47 | } as TransformPageContext 48 | 49 | generateBreadcrumbsData(pageData, context) 50 | 51 | expect(pageData.frontmatter.breadcrumbs).toEqual([ 52 | { title: 'Home', link: '/a' }, 53 | { title: 'b', link: '/a/b' }, 54 | { title: 'c', link: '' }, 55 | { title: 'd', link: '/a/b/c/d' }, 56 | ]) 57 | }) 58 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/src/vitepress/breadcrumbs-data-generator.ts: -------------------------------------------------------------------------------- 1 | import type { PageData, TransformPageContext } from 'vitepress' 2 | 3 | export function generateBreadcrumbsData(pageData: PageData, context: TransformPageContext) { 4 | const splitPath = pageData.filePath.split('/') 5 | const rootDirectory = splitPath[0] 6 | const pages = context.siteConfig.pages 7 | const breadcrumbs: { 8 | title: string 9 | link: string 10 | }[] = [{ 11 | title: context.siteConfig.site.title, 12 | link: `/${rootDirectory}`, 13 | }] 14 | 15 | for (let i = 1; i < splitPath.length; i++) { 16 | let link = '' 17 | let encodedLink = '' 18 | let title = splitPath[i] 19 | if (i === splitPath.length - 1) { 20 | title = pageData.title 21 | } 22 | 23 | for (let j = 0; j <= i; j++) { 24 | link += `${splitPath[j]}` 25 | encodedLink += `${encodeURIComponent(splitPath[j])}` 26 | 27 | if (j !== i) { 28 | link += `/` 29 | encodedLink += `/` 30 | } 31 | } 32 | 33 | if (!pages.includes(link) && !pages.includes(`${link}/index.md`)) { 34 | breadcrumbs.push({ title: splitPath[i], link: '' }) 35 | continue 36 | } 37 | 38 | if (link.endsWith('index.md')) { 39 | continue 40 | } 41 | 42 | if (link.endsWith('.md')) { 43 | encodedLink = encodedLink.slice(0, -3) 44 | } 45 | 46 | breadcrumbs.push({ title, link: `/${encodedLink}` }) 47 | } 48 | 49 | if (splitPath.length) 50 | pageData.frontmatter.breadcrumbs = breadcrumbs 51 | } 52 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/src/vitepress/index.ts: -------------------------------------------------------------------------------- 1 | export { generateBreadcrumbsData } from './breadcrumbs-data-generator' 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-breadcrumbs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-mark/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-enhanced-mark` 2 | 3 | A VitePress plugin that empowers `` elements. Adds CSS animations to the mark elements. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-enhanced-mark -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-enhanced-mark -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-enhanced-mark -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Enhanced `` element](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-enhanced-mark/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-mark/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | entries: [ 5 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.css'], loaders: ['postcss'] }, 6 | ], 7 | }) 8 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-mark/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/vitepress-plugin-enhanced-mark", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A VitePress plugin that empowers mark elements.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-enhanced-mark/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/vitepress-plugin-enhanced-mark" 17 | }, 18 | "keywords": [ 19 | "vitepress", 20 | "nolebase", 21 | "markdown", 22 | "css", 23 | "animation", 24 | "vitepress-plugin", 25 | "nolebase-integration" 26 | ], 27 | "sideEffects": [ 28 | "**/*.css" 29 | ], 30 | "exports": { 31 | "./client/style.css": "./dist/client/style.css" 32 | }, 33 | "files": [ 34 | "README.md", 35 | "dist", 36 | "package.json" 37 | ], 38 | "scripts": { 39 | "dev": "unbuild --stub", 40 | "stub": "unbuild --stub", 41 | "build": "unbuild" 42 | }, 43 | "peerDependencies": { 44 | "vitepress": "^1.5.0 || ^2.0.0-alpha.1" 45 | }, 46 | "dependencies": { 47 | "less": "^4.3.0" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-mark/src/client/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Thanks to the following resources: 3 | css - How can I animate my text to highlight from left to right? - Stack Overflow 4 | https://stackoverflow.com/questions/70364899/how-can-i-animate-my-text-to-highlight-from-left-to-right 5 | */ 6 | .vp-doc mark { 7 | --vp-nolebase-mark-bg-shift: 0.4lh; 8 | --vp-nolebase-mark-bg-color: #ffce0050; 9 | 10 | /* Override default styles of */ 11 | color: inherit; 12 | background-color: transparent; 13 | 14 | /* Configure animations */ 15 | animation-name: mark-highlight-animation; 16 | animation-duration: 1.5s; 17 | animation-delay: 0.5s; 18 | animation-fill-mode: forwards; 19 | 20 | /* Expand the background image width 2x larger than the default background width */ 21 | background-size: 200%; 22 | /* Init position of background image, otherwise it will cause a flicker */ 23 | background-position: 100% var(--vp-nolebase-mark-bg-shift); 24 | /* By default, background image will repeat, we don't want that */ 25 | background-repeat: no-repeat; 26 | /* Use background image with linear gradient to create the highlight effect */ 27 | background-image: linear-gradient(to right, var(--vp-nolebase-mark-bg-color) 50%, transparent 50%); 28 | } 29 | 30 | @keyframes mark-highlight-animation { 31 | from { 32 | color: inherit; 33 | background-position: 100% var(--vp-nolebase-mark-bg-shift); 34 | } 35 | 36 | to { 37 | color: var(--vp-c-text-1); 38 | background-position: 0% var(--vp-nolebase-mark-bg-shift); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-enhanced-readabilities` 2 | 3 | A VitePress plugin enhances the readabilities for VitePress built sites. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-enhanced-readabilities -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-enhanced-readabilities -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-enhanced-readabilities -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Enhanced Readabilities](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-enhanced-readabilities/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/components/MenuTitle.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 21 | 22 | 29 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/components/ScreenMenu.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 28 | 29 | 40 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/components/ScreenSpotlight.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 51 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/components/deps.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line ts/ban-ts-comment 2 | // @ts-nocheck - VitePress doesn't have types for its internal components 3 | 4 | import _VPFlyout from 'vitepress/dist/client/theme-default/components/VPFlyout.vue' 5 | // Isolate the types of Vitepress internal components to avoid typecheck errors 6 | export const VPFlyout: any = _VPFlyout 7 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/composables/animation.ts: -------------------------------------------------------------------------------- 1 | import { useDebounceFn, useMounted } from '@vueuse/core' 2 | 3 | export function useLayoutAppearanceChangeAnimation() { 4 | const mounted = useMounted() 5 | 6 | return { 7 | trigger: (animateElement: HTMLElement) => { 8 | animateElement.classList.add('VPNolebaseEnhancedReadabilitiesLayoutSwitchAnimated') 9 | 10 | const removeAnimatedClassName = useDebounceFn(() => { 11 | if (!(mounted.value && animateElement)) 12 | return 13 | 14 | animateElement.classList.remove('VPNolebaseEnhancedReadabilitiesLayoutSwitchAnimated') 15 | }, 5000) 16 | 17 | removeAnimatedClassName() 18 | }, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/composables/i18n.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from '@nolebase/ui' 2 | import { InjectionKey } from '../constants' 3 | import { defaultEnLocale, defaultLocales } from '../locales' 4 | 5 | export const useI18n = createI18n(InjectionKey, defaultLocales, defaultEnLocale) 6 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/constants.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey as VueInjectionKey } from 'vue' 2 | import type { Options } from './types' 3 | 4 | export const InjectionKey: VueInjectionKey = Symbol('vitepress-nolebase-enhanced-readabilities') 5 | 6 | export const LayoutSwitchModeStorageKey = 'vitepress-nolebase-enhanced-readabilities-layout-switch-mode' 7 | export const LayoutSwitchMaxWidthStrategyStorageKey = 'vitepress-nolebase-enhanced-readabilities-layout-switch-max-width-strategy' 8 | export const ContentLayoutMaxWidthStorageKey = 'vitepress-nolebase-enhanced-readabilities-content-layout-max-width' 9 | export const PageLayoutMaxWidthStorageKey = 'vitepress-nolebase-enhanced-readabilities-page-layout-max-width' 10 | 11 | export const SpotlightToggledStorageKey = 'vitepress-nolebase-enhanced-readabilities-spotlight-mode' 12 | export const SpotlightStylesStorageKey = 'vitepress-nolebase-enhanced-readabilities-spotlight-styles' 13 | 14 | export enum LayoutMode { 15 | FullWidth = 1, 16 | Original = 3, 17 | SidebarWidthAdjustableOnly = 4, 18 | BothWidthAdjustable = 5, 19 | } 20 | 21 | export const supportedLayoutModes = [ 22 | LayoutMode.FullWidth, 23 | LayoutMode.Original, 24 | LayoutMode.SidebarWidthAdjustableOnly, 25 | LayoutMode.BothWidthAdjustable, 26 | ] 27 | 28 | export enum SpotlightStyle { 29 | Under = 1, 30 | Aside = 2, 31 | } 32 | 33 | export const supportedSpotlightStyles = [ 34 | SpotlightStyle.Under, 35 | SpotlightStyle.Aside, 36 | ] 37 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/locales.ts: -------------------------------------------------------------------------------- 1 | import type { Locale } from './types' 2 | import { defaultEnLocale, defaultRuLocale, defaultZhCNLocale } from '../locales' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultRuLocale, 7 | defaultZhCNLocale, 8 | } 9 | 10 | export const defaultLocales: Record = { 11 | 'en-US': defaultEnLocale, 12 | 'en': defaultEnLocale, 13 | 'ru-RU': defaultRuLocale, 14 | 'ru': defaultRuLocale, 15 | 'zh-CN': defaultZhCNLocale, 16 | 'zh-Hans': defaultZhCNLocale, 17 | 'zh': defaultZhCNLocale, 18 | } 19 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "@nolebase/ui/style.css"; 2 | @import "./unocss.css"; 3 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/src/locales/index.ts: -------------------------------------------------------------------------------- 1 | import defaultEnLocale from './en.yaml' 2 | import defaultRuLocale from './ru-RU.yaml' 3 | import defaultZhCNLocale from './zh-CN.yaml' 4 | 5 | export { 6 | defaultEnLocale, 7 | defaultRuLocale, 8 | defaultZhCNLocale, 9 | } 10 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "./yaml.d.ts" 6 | ], 7 | "noImplicitAny": false, 8 | "declaration": false, 9 | "noEmit": false, 10 | "outDir": "./dist" 11 | }, 12 | "include": [ 13 | "./src/**/*.ts", 14 | "./src/**/*.mts", 15 | "./src/**/*.tsx", 16 | "./src/**/*.d.ts", 17 | "./src/**/*.vue" 18 | ], 19 | "exclude": [ 20 | "**/dist/**", 21 | "node_modules" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-enhanced-readabilities/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-git-changelog` 2 | 3 | A VitePress plugin enhances the readabilities for VitePress built sites. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-git-changelog -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-git-changelog -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-git-changelog -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Changelog & File history](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-git-changelog/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/client/composables/i18n.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from '@nolebase/ui' 2 | import { InjectionKey } from '../constants' 3 | import { defaultEnLocale, defaultLocales } from '../locales' 4 | 5 | export const useI18n = createI18n(InjectionKey, defaultLocales, defaultEnLocale) 6 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/client/composables/index.ts: -------------------------------------------------------------------------------- 1 | export * from './changelog' 2 | export * from './i18n' 3 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/client/constants.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey as VueInjectionKey } from 'vue' 2 | import type { Options } from './types' 3 | import { defaultLocales } from './locales' 4 | 5 | export const InjectionKey: VueInjectionKey = Symbol('vitepress-nolebase-git-changelog') 6 | 7 | export const defaultNumCommitHashLetters = 7 8 | 9 | export const defaultOptions: Options = { 10 | numCommitHashLetters: defaultNumCommitHashLetters, 11 | locales: defaultLocales, 12 | } 13 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/client/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vue' 2 | import type { Author, Changelog, Commit, Contributor } from '../types' 3 | 4 | import type { Locale, Options } from './types' 5 | import NolebaseGitChangelog from './components/Changelog.vue' 6 | 7 | import NolebaseGitContributors from './components/Contributors.vue' 8 | import { InjectionKey } from './constants' 9 | 10 | export { default as NolebaseGitChangelog } from './components/Changelog.vue' 11 | export { default as NolebaseGitContributors } from './components/Contributors.vue' 12 | 13 | const components = { 14 | NolebaseGitChangelog, 15 | NolebaseGitContributors, 16 | } 17 | 18 | export * from './composables' 19 | 20 | export const NolebaseGitChangelogPlugin: Plugin = { 21 | install(app, options?) { 22 | if (typeof options !== 'undefined' && typeof options === 'object') 23 | app.provide(InjectionKey, options) 24 | 25 | for (const key of Object.keys(components)) 26 | app.component(key, components[key as keyof typeof components]) 27 | }, 28 | } 29 | 30 | export { 31 | InjectionKey, 32 | } 33 | 34 | export type { 35 | Author, 36 | Changelog, 37 | Commit, 38 | Contributor, 39 | Locale, 40 | Options, 41 | } 42 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/client/locales.ts: -------------------------------------------------------------------------------- 1 | import type { Locale } from './types' 2 | import { defaultEnLocale, defaultRuLocale, defaultZhCNLocale } from '../locales' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultRuLocale, 7 | defaultZhCNLocale, 8 | } 9 | 10 | export const defaultLocales: Record = { 11 | 'en-US': defaultEnLocale, 12 | 'en': defaultEnLocale, 13 | 'ru-RU': defaultRuLocale, 14 | 'ru': defaultRuLocale, 15 | 'zh-CN': defaultZhCNLocale, 16 | 'zh-Hans': defaultZhCNLocale, 17 | 'zh': defaultZhCNLocale, 18 | } 19 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "@nolebase/ui/style.css"; 2 | @import "./unocss.css"; 3 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/locales/en.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | title: 'Changelog' 3 | titleId: 'changelog' 4 | noData: 'No recent changes' 5 | lastEdited: 'Last edited {{daysAgo}}' 6 | lastEditedDateFnsLocaleName: 'enUS' 7 | viewFullHistory: 'View full history' 8 | committedOn: ' on {{date}}' 9 | contributors: 10 | title: 'Contributors' 11 | titleId: 'contributors' 12 | noData: 'No contributors' 13 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/locales/index.ts: -------------------------------------------------------------------------------- 1 | import defaultEnLocale from './en.yaml' 2 | import defaultRuLocale from './ru-RU.yaml' 3 | import defaultZhCNLocale from './zh-CN.yaml' 4 | 5 | export { 6 | defaultEnLocale, 7 | defaultRuLocale, 8 | defaultZhCNLocale, 9 | } 10 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/locales/ru-RU.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | title: 'История изменений' 3 | titleId: 'история-изменений' 4 | noData: 'Нет изменений' 5 | lastEdited: 'Последнее редактирование {{daysAgo}}' 6 | lastEditedDateFnsLocaleName: 'ru' 7 | viewFullHistory: 'Показать историю' 8 | committedOn: ' от {{date}}' 9 | contributors: 10 | title: 'Авторы' 11 | titleId: 'авторы' 12 | noData: 'Нет информации' 13 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/locales/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/locales/zh-CN.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | title: '页面历史' 3 | titleId: '页面历史' 4 | noData: '暂无最近变更历史' 5 | lastEdited: '最后编辑于 {{daysAgo}}' 6 | lastEditedDateFnsLocaleName: 'zhCN' 7 | viewFullHistory: '查看完整历史' 8 | committedOn: ' 于 {{date}}' 9 | contributors: 10 | title: '贡献者' 11 | titleId: '贡献者' 12 | noData: '暂无相关贡献者' 13 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/types/virtual.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'virtual:nolebase-git-changelog' { 2 | import type { Changelog } from './types' 3 | 4 | const changelog: Changelog 5 | export default changelog 6 | } 7 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/src/vite/index.ts: -------------------------------------------------------------------------------- 1 | export type { Commit } from '../types' 2 | export * from './git' 3 | export * from './markdownSection' 4 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-git-changelog/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vite' 2 | import Yaml from '@rollup/plugin-yaml' 3 | import { defineConfig } from 'vitest/config' 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | Yaml() as Plugin, 8 | ], 9 | test: { 10 | coverage: { 11 | reporter: ['json'], 12 | }, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-graph-view/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-thumbnail-hash` 2 | 3 | A VitePress plugin that scan and generate data with [blurhash](https://github.com/woltapp/blurhash), [thumbhash](https://github.com/evanw/thumbhash) hashing algorithm for images, as well as a standalone component to render images with [blurhash](https://github.com/woltapp/blurhash) and [thumbhash](https://github.com/evanw/thumbhash). 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-thumbnail-hash -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-thumbnail-hash -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-thumbnail-hash -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Thumbnail hashing for images](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-thumbnail-hash/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-graph-view/build.config.ts: -------------------------------------------------------------------------------- 1 | import { exec } from 'node:child_process' 2 | import { promisify } from 'node:util' 3 | 4 | import builtins from 'builtin-modules' 5 | import { defineBuildConfig } from 'unbuild' 6 | 7 | const execAsync = promisify(exec) 8 | 9 | export default defineBuildConfig({ 10 | entries: [ 11 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.vue'], loaders: ['vue'] }, 12 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'cjs', loaders: ['js'] }, 13 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'esm', loaders: ['js'] }, 14 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.css'], loaders: ['postcss'] }, 15 | { builder: 'rollup', input: './src/vite/index', outDir: './dist/vite' }, 16 | ], 17 | clean: true, 18 | sourcemap: true, 19 | declaration: true, 20 | externals: [ 21 | 'vite', 22 | 'd3', 23 | 'd3-force', 24 | 'vitepress', 25 | // builtins 26 | ...builtins, 27 | ], 28 | rollup: { 29 | emitCJS: true, 30 | }, 31 | hooks: { 32 | 'mkdist:done': async (ctx) => { 33 | if (ctx.options.stub) 34 | return 35 | // Since not all the users would choose to use unocss, 36 | // we bundle the styles from unocss here for users to opt-in. 37 | // 38 | // However, since the unocss doesn't provide a unplugin, or rollup 39 | // plugin for us to use, we have to use the CLI here. 40 | // 41 | // The use of CLI was suggested by how to use unocss with rollup? · unocss/unocss · Discussion #542 42 | // https:// github.com/unocss/unocss/discussions/542 43 | await execAsync('unocss "./src/client/**/*.vue" -o dist/client/unocss.css') 44 | }, 45 | }, 46 | }) 47 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-graph-view/src/client/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NolebaseGraphView } from './components/GraphView.vue' 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-graph-view/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "./unocss.css" 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-graph-view/src/types/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/packages/vitepress-plugin-graph-view/src/types/index.ts -------------------------------------------------------------------------------- /packages/vitepress-plugin-graph-view/src/vite/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vite' 2 | 3 | export function GraphViewData(): Plugin { 4 | return { 5 | name: '@nolebase/vitepress-plugin-graph-view', 6 | enforce: 'pre', 7 | config() { 8 | return { 9 | optimizeDeps: { 10 | exclude: [ 11 | '@nolebase/vitepress-plugin-graph-view/client', 12 | ], 13 | }, 14 | ssr: { 15 | noExternal: [ 16 | '@nolebase/vitepress-plugin-graph-view', 17 | ], 18 | }, 19 | } 20 | }, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-graph-view/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-highlight-targeted-heading/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-highlight-targeted-heading` 2 | 3 | A VitePress plugin blinks to highlight the heading element when targeted and clicked. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-highlight-targeted-heading -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-highlight-targeted-heading -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-highlight-targeted-heading -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Blinking highlighted targeted heading](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-highlight-targeted-heading/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-highlight-targeted-heading/build.config.ts: -------------------------------------------------------------------------------- 1 | import { exec } from 'node:child_process' 2 | import { promisify } from 'node:util' 3 | 4 | import { defineBuildConfig } from 'unbuild' 5 | 6 | const execAsync = promisify(exec) 7 | 8 | export default defineBuildConfig({ 9 | entries: [ 10 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.vue'], loaders: ['vue'] }, 11 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'cjs', loaders: ['js'] }, 12 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'esm', loaders: ['js'] }, 13 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.css'], loaders: ['postcss'] }, 14 | ], 15 | clean: true, 16 | sourcemap: true, 17 | declaration: true, 18 | rollup: { 19 | emitCJS: true, 20 | }, 21 | hooks: { 22 | 'mkdist:done': async (ctx) => { 23 | if (ctx.options.stub) 24 | return 25 | 26 | // Since not all the users would choose to use unocss, 27 | // we bundle the styles from unocss here for users to opt-in. 28 | // 29 | // However, since the unocss doesn't provide a unplugin, or rollup 30 | // plugin for us to use, we have to use the CLI here. 31 | // 32 | // The use of CLI was suggested by how to use unocss with rollup? · unocss/unocss · Discussion #542 33 | // https:// github.com/unocss/unocss/discussions/542 34 | await execAsync('unocss -c "../uno.config.ts" -o "./dist/client/unocss.css" "./src/client/**/*.vue"') 35 | }, 36 | }, 37 | }) 38 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-highlight-targeted-heading/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/vitepress-plugin-highlight-targeted-heading", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A VitePress plugin blinks to highlight the heading element when targeted and clicked.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-highlight-targeted-heading/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/vitepress-plugin-highlight-targeted-heading" 17 | }, 18 | "keywords": [ 19 | "vitepress", 20 | "nolebase", 21 | "a11y", 22 | "readabilities", 23 | "markdown", 24 | "vitepress-plugin", 25 | "nolebase-integration" 26 | ], 27 | "sideEffects": [ 28 | "**/*.css" 29 | ], 30 | "exports": { 31 | ".": { 32 | "types": "./dist/client/index.d.ts", 33 | "import": "./dist/client/index.mjs", 34 | "require": "./dist/client/index.js" 35 | }, 36 | "./client": { 37 | "types": "./dist/client/index.d.ts", 38 | "import": "./dist/client/index.mjs", 39 | "require": "./dist/client/index.js" 40 | }, 41 | "./client/style.css": "./dist/client/style.css" 42 | }, 43 | "main": "./dist/client/index.js", 44 | "module": "./dist/client/index.mjs", 45 | "types": "./dist/client/index.d.ts", 46 | "files": [ 47 | "README.md", 48 | "dist", 49 | "package.json" 50 | ], 51 | "scripts": { 52 | "dev": "unbuild --stub", 53 | "stub": "unbuild --stub", 54 | "build": "unbuild", 55 | "typecheck": "vue-tsc --noEmit" 56 | }, 57 | "peerDependencies": { 58 | "vitepress": "^1.5.0 || ^2.0.0-alpha.1" 59 | }, 60 | "dependencies": { 61 | "less": "^4.3.0" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-highlight-targeted-heading/src/client/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vue' 2 | 3 | import NolebaseHighlightTargetedHeading from './components/HighlightTargetedHeading.vue' 4 | 5 | export { 6 | NolebaseHighlightTargetedHeading, 7 | } 8 | 9 | const components = { 10 | NolebaseHighlightTargetedHeading, 11 | } 12 | 13 | export const NolebaseNolebaseHighlightTargetedHeadingPlugin: Plugin = { 14 | install(app) { 15 | for (const key of Object.keys(components)) 16 | app.component(key, components[key as keyof typeof components]) 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-highlight-targeted-heading/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "./unocss.css" 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-highlight-targeted-heading/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": false, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-index` 2 | 3 | A VitePress plugin that consists loads of different index pages needed content loaders. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-index -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-index -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-index -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Index page](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-index/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/client/components/NolebaseRecentUpdates.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 39 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/client/composables/i18n.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from '@nolebase/ui' 2 | import { InjectionKey } from '../constants' 3 | import { defaultEnLocale, defaultLocales } from '../locales' 4 | 5 | export const useI18n = createI18n(InjectionKey, defaultLocales, defaultEnLocale) 6 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/client/constants.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey as VueInjectionKey } from 'vue' 2 | import type { Options } from './types' 3 | import { defaultLocales } from './locales' 4 | 5 | export const InjectionKey: VueInjectionKey = Symbol('vitepress-nolebase-index') 6 | 7 | export const defaultNumCommitHashLetters = 7 8 | 9 | export const defaultOptions: Options = { 10 | locales: defaultLocales, 11 | } 12 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/client/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vue' 2 | import type { Locale, Options } from './types' 3 | 4 | import NolebaseRecentUpdates from './components/NolebaseRecentUpdates.vue' 5 | import { InjectionKey } from './constants' 6 | 7 | export { 8 | NolebaseRecentUpdates, 9 | } 10 | 11 | const components = { 12 | NolebaseRecentUpdates, 13 | } 14 | 15 | export const NolebaseIndexPlugin: Plugin = { 16 | install(app, options?) { 17 | if (typeof options !== 'undefined' && typeof options === 'object') 18 | app.provide(InjectionKey, options) 19 | 20 | for (const key of Object.keys(components)) 21 | app.component(key, components[key as keyof typeof components]) 22 | }, 23 | } 24 | 25 | export { 26 | InjectionKey, 27 | } 28 | 29 | export type { 30 | Locale, 31 | Options, 32 | } 33 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/client/locales.ts: -------------------------------------------------------------------------------- 1 | import type { Locale } from './types' 2 | import { defaultEnLocale, defaultZhCNLocale } from '../locales' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultZhCNLocale, 7 | } 8 | 9 | export const defaultLocales: Record = { 10 | 'en-US': defaultEnLocale, 11 | 'en': defaultEnLocale, 12 | 'zh-CN': defaultZhCNLocale, 13 | 'zh-Hans': defaultZhCNLocale, 14 | 'zh': defaultZhCNLocale, 15 | } 16 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "./unocss.css"; 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/client/types.ts: -------------------------------------------------------------------------------- 1 | export interface Locale extends Record { 2 | recentUpdates?: { 3 | category?: string 4 | updatedAt?: string 5 | } 6 | } 7 | 8 | export interface Options { 9 | /** 10 | * Internationalization configuration 11 | * 12 | * When configuring, please configure according to the language code configured in 13 | * VitePress internationalization configuration. In the following configuration, 'en' 14 | * and 'zh-CN' are the language codes configured in VitePress internationalization 15 | * configuration. 16 | * 17 | * @default undefined 18 | * @example 19 | * ```ts 20 | * { 21 | * locales: { 22 | * 'en': { 23 | * recentUpdates: { 24 | * category: 'Category: ', 25 | * updatedAt: 'Updated at: ', 26 | * } 27 | * }, 28 | * 'zh-CN': { 29 | * recentUpdates: { 30 | * category: '类别:', 31 | * updatedAt: '更新于:', 32 | * } 33 | * }, 34 | * } 35 | * } 36 | * ``` 37 | */ 38 | locales?: Record 39 | } 40 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/locales/en.yaml: -------------------------------------------------------------------------------- 1 | recentUpdates: 2 | category: 'Recent Updates: ' 3 | updatedAt: 'Updated at: ' 4 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/locales/index.ts: -------------------------------------------------------------------------------- 1 | import defaultEnLocale from './en.yaml' 2 | import defaultZhCNLocale from './zh-CN.yaml' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultZhCNLocale, 7 | } 8 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/locales/zh-CN.yaml: -------------------------------------------------------------------------------- 1 | recentUpdates: 2 | category: '类别:' 3 | updatedAt: '更新时间:' 4 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/src/vitepress/index.ts: -------------------------------------------------------------------------------- 1 | export { createRecentUpdatesLoader } from './recentUpdates' 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "./yaml.d.ts", 6 | "node", 7 | "vite/client" 8 | ], 9 | "declaration": true, 10 | "noEmit": false, 11 | "outDir": "./dist" 12 | }, 13 | "include": [ 14 | "./src/**/*.ts", 15 | "./src/**/*.mts", 16 | "./src/**/*.tsx", 17 | "./src/**/*.d.ts", 18 | "./src/**/*.vue" 19 | ], 20 | "exclude": [ 21 | "**/dist/**", 22 | "node_modules" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-index/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-inline-link-preview` 2 | 3 | A VitePress plugin that adds a inline popup to help you preview links while reading. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-inline-link-preview -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-inline-link-preview -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-inline-link-preview -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Inline Links Previewing](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-inline-link-preview/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/components/LinkButton.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 28 | 29 | 34 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/composables/i18n.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from '@nolebase/ui' 2 | import { InjectionKey } from '../constants' 3 | import { defaultEnLocale, defaultLocales } from '../locales' 4 | 5 | export const useI18n = createI18n(InjectionKey, defaultLocales, defaultEnLocale) 6 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/composables/iframe.ts: -------------------------------------------------------------------------------- 1 | import { computed } from 'vue' 2 | 3 | export function useInIframe() { 4 | return { 5 | livesInIframe: computed(() => { 6 | try { 7 | return window.self !== window.top && window.top !== undefined && window.top !== null && 'location' in window.top 8 | } 9 | catch { 10 | return false 11 | } 12 | }), 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/composables/mouse.ts: -------------------------------------------------------------------------------- 1 | import { useDebounceFn, useMouse } from '@vueuse/core' 2 | import { computed, ref, watch } from 'vue' 3 | 4 | export function useMouseMovementDegree(options?: { interval: number, threshold: number }) { 5 | const interval = options?.interval === undefined ? 100 : options.interval 6 | const threshold = options?.threshold === undefined ? 20 : options.threshold 7 | 8 | const { x, y } = useMouse() 9 | const latestMouseX = ref(x.value) 10 | const latestMouseY = ref(y.value) 11 | 12 | const updateX = useDebounceFn((x) => { 13 | latestMouseX.value = x 14 | }, interval) 15 | const updateY = useDebounceFn((y) => { 16 | latestMouseY.value = y 17 | }, interval) 18 | 19 | watch(x, async (val) => { 20 | updateX(val) 21 | }) 22 | watch(y, async (val) => { 23 | updateY(val) 24 | }) 25 | 26 | const lastMovementDegree = ref(0) 27 | 28 | const movementDegree = computed(() => { 29 | const xDiff = x.value - latestMouseX.value 30 | const yDiff = y.value - latestMouseY.value 31 | if (Math.abs(xDiff) < threshold && Math.abs(yDiff) < threshold) 32 | return lastMovementDegree.value 33 | 34 | const degree = (Math.atan2(yDiff, xDiff)) 35 | lastMovementDegree.value = (360 + Math.round(degree)) % 360 36 | return lastMovementDegree.value 37 | }) 38 | 39 | return { 40 | movementDegree, 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/constants.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey as VueInjectionKey } from 'vue' 2 | 3 | import type { Options } from './types' 4 | 5 | export const InjectionKey: VueInjectionKey = Symbol('VPNolebaseInlineLinkPreview') 6 | export const ComponentName = 'VPNolebaseInlineLinkPreview' 7 | 8 | export const defaultLinkPreviewPopupOptions: Options = { 9 | popupWidth: 600, 10 | popupHeight: 480, 11 | previewLocalHostName: true, 12 | selectorsToBeHided: ['.VPNav', '.VPFooter', '.VPLocalNav', '.VPSidebar', '.VPDocFooter > .prev-next'], 13 | popupTeleportTargetSelector: 'body', 14 | popupDelay: 500, 15 | } 16 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vue' 2 | 3 | import type { Options } from './types' 4 | import InlineLinkPreview from './components/InlineLinkPreview.vue' 5 | 6 | import PopupIframe from './components/PopupIframe.vue' 7 | import { InjectionKey } from './constants' 8 | 9 | export type { 10 | Options, 11 | } 12 | 13 | export { 14 | InjectionKey, 15 | InlineLinkPreview as NolebaseInlineLinkPreview, 16 | PopupIframe, 17 | } 18 | 19 | const components = { 20 | VPNolebaseInlineLinkPreview: InlineLinkPreview, 21 | } 22 | 23 | export const NolebaseInlineLinkPreviewPlugin: Plugin = { 24 | install(app, options?) { 25 | if (typeof options !== 'undefined' && typeof options === 'object') 26 | app.provide(InjectionKey, options) 27 | 28 | for (const key of Object.keys(components)) 29 | app.component(key, components[key as keyof typeof components]) 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/locales.ts: -------------------------------------------------------------------------------- 1 | import type { Locale } from './types' 2 | import { defaultEnLocale, defaultZhCNLocale } from '../locales' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultZhCNLocale, 7 | } 8 | 9 | export const defaultLocales: Record = { 10 | 'zh-CN': defaultZhCNLocale, 11 | 'zh-Hans': defaultZhCNLocale, 12 | 'zh': defaultZhCNLocale, 13 | 'en-US': defaultEnLocale, 14 | 'en': defaultEnLocale, 15 | } 16 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "./unocss.css" 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/client/utils.ts: -------------------------------------------------------------------------------- 1 | export function attemptWithDelay(maxTryIterate: number, delayMs: number, attempt: () => (T | null) | Promise): Promise { 2 | return new Promise((resolve, reject) => { 3 | let tryIterate = 0 4 | 5 | function attemptWithDelayInner() { 6 | tryIterate++ 7 | 8 | try { 9 | const result = attempt() 10 | 11 | if (result instanceof Promise) { 12 | result.then((result) => { 13 | if (result) 14 | resolve(result) 15 | else if (tryIterate < maxTryIterate) 16 | setTimeout(attemptWithDelayInner, delayMs) 17 | else 18 | resolve(null) 19 | }).catch((e) => { 20 | if (tryIterate < maxTryIterate) 21 | setTimeout(attemptWithDelayInner, delayMs) 22 | else 23 | reject(e) 24 | }) 25 | } 26 | else { 27 | if (result) 28 | resolve(result) 29 | else if (tryIterate < maxTryIterate) 30 | setTimeout(attemptWithDelayInner, delayMs) 31 | else 32 | resolve(null) 33 | } 34 | } 35 | catch (e) { 36 | if (tryIterate < maxTryIterate) 37 | setTimeout(attemptWithDelayInner, delayMs) 38 | else 39 | reject(e) 40 | } 41 | } 42 | 43 | attemptWithDelayInner() 44 | }) 45 | } 46 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/locales/en.yaml: -------------------------------------------------------------------------------- 1 | popup: 2 | loading: 'Loading' 3 | loadingAriaLabel: 'Loading' 4 | openInCurrentPage: 'Open in current page' 5 | openInCurrentPageAriaLabel: 'Open in current page' 6 | iframeAriaLabel: 'Inline link preview of link at {href}' 7 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/locales/index.ts: -------------------------------------------------------------------------------- 1 | import defaultEnLocale from './en.yaml' 2 | import defaultZhCNLocale from './zh-CN.yaml' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultZhCNLocale, 7 | } 8 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/src/locales/zh-CN.yaml: -------------------------------------------------------------------------------- 1 | popup: 2 | loading: '加载中' 3 | loadingAriaLabel: '加载中' 4 | openInCurrentPage: '在当前页面打开' 5 | openInCurrentPageAriaLabel: '在当前页面打开' 6 | iframeAriaLabel: '在 {href} 的链接的行内链接预览' 7 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "./yaml.d.ts", 6 | "node", 7 | "vite/client" 8 | ], 9 | "declaration": true, 10 | "noEmit": false, 11 | "outDir": "./dist" 12 | }, 13 | "include": [ 14 | "./src/**/*.ts", 15 | "./src/**/*.mts", 16 | "./src/**/*.tsx", 17 | "./src/**/*.d.ts", 18 | "./src/**/*.vue" 19 | ], 20 | "exclude": [ 21 | "**/dist/**", 22 | "node_modules" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-inline-link-preview/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-meta/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-meta` 2 | 3 | A vitepress plugin to add `` (excerpts, author, authors, etc.) to your rendered pages to maximize SEO and social media sharing capabilities. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-meta -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-meta -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-meta -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [`` generation](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-meta/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-meta/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | entries: [ 5 | { builder: 'rollup', input: './src/vitepress/index', outDir: 'dist/vitepress/' }, 6 | ], 7 | clean: true, 8 | sourcemap: true, 9 | declaration: true, 10 | externals: [ 11 | 'vite', 12 | ], 13 | rollup: { 14 | emitCJS: true, 15 | }, 16 | }) 17 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-meta/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-og-image` 2 | 3 | A vitepress plugin to generate [Open Graph Protocol](https://ogp.me/) previewing images (a.k.a. [social media cards](https://www.semrush.com/blog/open-graph/)) for your site. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-og-image -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-og-image -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-og-image -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Previewing image generation](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-og-image/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/build.config.ts: -------------------------------------------------------------------------------- 1 | import { copy } from 'fs-extra' 2 | import { defineBuildConfig } from 'unbuild' 3 | 4 | export default defineBuildConfig({ 5 | entries: [ 6 | { builder: 'rollup', input: './src/vitepress/index', outDir: 'dist/vitepress/' }, 7 | ], 8 | clean: true, 9 | sourcemap: true, 10 | declaration: true, 11 | externals: [ 12 | 'vite', 13 | 'vitepress', 14 | 'fs-extra', 15 | 'glob', 16 | 'emoji-regex', 17 | 'gray-matter', 18 | '@resvg/resvg-wasm', 19 | ], 20 | rollup: { 21 | emitCJS: true, 22 | }, 23 | hooks: { 24 | 'build:done': async () => { 25 | // copy all things under src/assets to dist/assets 26 | await copy('src/vitepress/assets', 'dist/vitepress/assets') 27 | }, 28 | }, 29 | }) 30 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/src/vitepress/assets/SourceHanSansSC.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nolebase/integrations/bd8f0743410b4bb665c7c04a26e390fec64a3b82/packages/vitepress-plugin-og-image/src/vitepress/assets/SourceHanSansSC.otf -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/src/vitepress/constants.ts: -------------------------------------------------------------------------------- 1 | import { cyan, gray } from 'colorette' 2 | 3 | export const logModulePrefix = `${cyan(`@nolebase/vitepress-plugin-og-image`)}${gray(':')}` 4 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/src/vitepress/utils/emoji.ts: -------------------------------------------------------------------------------- 1 | import regexCreator from 'emoji-regex' 2 | 3 | const emojiRegex = regexCreator() 4 | 5 | export function removeEmoji(str: string) { 6 | return str.replace(emojiRegex, '') 7 | } 8 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/src/vitepress/utils/svg/escape.ts: -------------------------------------------------------------------------------- 1 | // miketheprogrammer/xml-escape: Escape XML in javascript (NodeJS) 2 | // https://github.com/miketheprogrammer/xml-escape 3 | 4 | const escapeMap: Record = { 5 | '<': '<', 6 | '>': '>', 7 | '\'': ''', 8 | '"': '"', 9 | '&': '&', 10 | } 11 | 12 | export function escape(content: string, ignore?: string): string { 13 | ignore = (ignore || '').replace(/[^&"<>']/g, '') 14 | const pattern = '([&"<>\'])'.replace(new RegExp(`[${ignore}]`, 'g'), '') 15 | 16 | return content.replace(new RegExp(pattern, 'g'), (_, item) => { 17 | return escapeMap[item] 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/src/vitepress/utils/vitepress/locales.ts: -------------------------------------------------------------------------------- 1 | import type { DefaultTheme, SiteData } from 'vitepress' 2 | 3 | export function getLocales(siteData: SiteData) { 4 | const locales: string[] = [] 5 | locales.push(siteData.lang ?? 'root') 6 | 7 | if (Object.keys(siteData.locales).length === 0) 8 | return locales 9 | 10 | for (const locale in siteData.locales) { 11 | if (locale !== siteData.lang) 12 | locales.push(locale) 13 | } 14 | 15 | return locales 16 | } 17 | 18 | export function getTitleWithLocales(siteData: SiteData, locale: string): string { 19 | if (Object.keys(siteData.locales).length > 0) { 20 | const title = siteData.locales[locale]?.title 21 | if (title) 22 | return title 23 | if (siteData.locales.root.title) 24 | return siteData.locales.root.title 25 | return siteData.title 26 | } 27 | 28 | return siteData.title 29 | } 30 | 31 | export function getDescriptionWithLocales(siteData: SiteData, locale: string): string { 32 | if (Object.keys(siteData.locales).length > 0) { 33 | const description = siteData.locales[locale]?.description 34 | if (description) 35 | return description 36 | if (siteData.locales.root.description) 37 | return siteData.locales.root.description 38 | return siteData.description 39 | } 40 | 41 | return siteData.description 42 | } 43 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-og-image/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-page-properties` 2 | 3 | A VitePress plugin that renders frontmatter as page properties, and makes them editable. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-page-properties -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-page-properties -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-page-properties -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Page properties](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-page-properties/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/components/Datetime.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 23 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/components/ProgressBar.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 57 | 58 | 74 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/composables/i18n.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from '@nolebase/ui' 2 | import { InjectionKey } from '../constants' 3 | import { defaultEnLocale, defaultLocales } from '../locales' 4 | 5 | export const useI18n = createI18n(InjectionKey, defaultLocales, defaultEnLocale) 6 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/constants.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey as VueInjectionKey } from 'vue' 2 | import type { Options } from './types' 3 | 4 | export const InjectionKey: VueInjectionKey> = Symbol('vitepress-nolebase-page-properties') 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vue' 2 | 3 | import type { 4 | DatetimeProperty, 5 | DynamicProperty, 6 | DynamicPropertyType, 7 | DynamicReadingTimeProperty, 8 | DynamicWordsCountProperty, 9 | LinkProperty, 10 | Locale, 11 | LocaleName, 12 | Options, 13 | PlainProperty, 14 | ProgressProperty, 15 | Property, 16 | PropertyType, 17 | TagsProperty, 18 | } from './types' 19 | import NolebasePageProperties from './components/PageProperties.vue' 20 | import NolebasePagePropertiesEditor from './components/PagePropertiesEditor.vue' 21 | import { InjectionKey } from './constants' 22 | 23 | const components = { 24 | NolebasePageProperties, 25 | NolebasePagePropertiesEditor, 26 | } 27 | 28 | export function NolebasePagePropertiesPlugin

(): Plugin[]> { 29 | return { 30 | install(app, options?) { 31 | if (typeof options !== 'undefined' && typeof options === 'object') 32 | app.provide(InjectionKey, options) 33 | 34 | for (const key of Object.keys(components)) 35 | app.component(key, components[key as keyof typeof components]) 36 | }, 37 | } 38 | } 39 | 40 | export { 41 | InjectionKey, 42 | NolebasePageProperties, 43 | NolebasePagePropertiesEditor, 44 | } 45 | 46 | export type { 47 | DatetimeProperty, 48 | DynamicProperty, 49 | DynamicPropertyType, 50 | DynamicReadingTimeProperty, 51 | DynamicWordsCountProperty, 52 | LinkProperty, 53 | Locale, 54 | LocaleName, 55 | Options, 56 | PlainProperty, 57 | ProgressProperty, 58 | Property, 59 | PropertyType, 60 | TagsProperty, 61 | } 62 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/locales.ts: -------------------------------------------------------------------------------- 1 | import type { Locale } from './types' 2 | import { defaultEnLocale, defaultZhCNLocale } from '../locales' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultZhCNLocale, 7 | } 8 | 9 | export const defaultLocales: Record = { 10 | 'zh-CN': defaultZhCNLocale, 11 | 'zh-Hans': defaultZhCNLocale, 12 | 'zh': defaultZhCNLocale, 13 | 'en-US': defaultEnLocale, 14 | 'en': defaultEnLocale, 15 | } 16 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "@nolebase/ui/style.css"; 2 | @import "./unocss.css"; 3 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/utils.ts: -------------------------------------------------------------------------------- 1 | import type { LocaleName } from './types' 2 | import { formatDistanceToNow, formatDuration, toDate } from 'date-fns' 3 | 4 | import * as DateFnsLocales from 'date-fns/locale' 5 | 6 | export function formatDistanceToNowFromValue(value: string | number | Date, localeName: LocaleName = 'enUS') { 7 | try { 8 | return formatDistanceToNow(toDate(value), { 9 | locale: DateFnsLocales[localeName] || 'enUS', 10 | addSuffix: true, 11 | }) 12 | } 13 | catch { 14 | return value 15 | } 16 | } 17 | 18 | export function formatDurationFromValue(value: number, localeName: LocaleName = 'enUS') { 19 | const parsedValue = Number.parseInt(String(value)) 20 | 21 | try { 22 | return formatDuration({ 23 | minutes: Number.isNaN(parsedValue) ? 0 : parsedValue, 24 | }, { 25 | locale: DateFnsLocales[localeName] || 'enUS', 26 | }) 27 | } 28 | catch { 29 | return value 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/client/virtual.d.ts: -------------------------------------------------------------------------------- 1 | interface TagsProperty { 2 | type: 'tags' 3 | key: K 4 | title: string 5 | omitEmpty?: boolean 6 | } 7 | 8 | interface PlainProperty { 9 | type: 'plain' 10 | key: K 11 | title: string 12 | omitEmpty?: boolean 13 | } 14 | 15 | interface DatetimeProperty { 16 | type: 'datetime' 17 | key: K 18 | title: string 19 | formatAsFrom?: boolean 20 | dateFnsLocaleName?: import('./types').LocaleName 21 | format?: string 22 | omitEmpty?: boolean 23 | } 24 | 25 | interface ProgressProperty { 26 | type: 'progress' 27 | key: K 28 | title: string 29 | omitEmpty?: boolean 30 | } 31 | 32 | interface LinkProperty { 33 | type: 'link' 34 | key: K 35 | title: string 36 | omitEmpty?: boolean 37 | } 38 | 39 | interface DynamicProperty { 40 | type: 'dynamic' 41 | key: K | string 42 | title: string 43 | options: 44 | DynamicWordsCountProperty | 45 | DynamicReadingTimeProperty 46 | } 47 | 48 | interface DynamicWordsCountProperty { 49 | type: 'wordsCount' 50 | } 51 | 52 | interface DynamicReadingTimeProperty { 53 | type: 'readingTime' 54 | dateFnsLocaleName?: import('./types').LocaleName 55 | } 56 | 57 | type Property = 58 | TagsProperty | 59 | PlainProperty | 60 | DatetimeProperty | 61 | ProgressProperty | 62 | LinkProperty | 63 | DynamicProperty 64 | 65 | type PropertyType = Property['type'] 66 | type DynamicPropertyType = DynamicProperty['options']['type'] 67 | 68 | declare module 'virtual:nolebase-page-properties' { 69 | const pagePropertiesData: Record 73 | 74 | export default pagePropertiesData 75 | } 76 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/locales/en.yaml: -------------------------------------------------------------------------------- 1 | pageProperties: 2 | wordsCount: '{{wordsCount}} words' 3 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/locales/index.ts: -------------------------------------------------------------------------------- 1 | import defaultEnLocale from './en.yaml' 2 | import defaultZhCNLocale from './zh-CN.yaml' 3 | 4 | export { 5 | defaultEnLocale, 6 | defaultZhCNLocale, 7 | } 8 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/locales/zh-CN.yaml: -------------------------------------------------------------------------------- 1 | pageProperties: 2 | wordsCount: '{{wordsCount}} 字' 3 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/vite/index.ts: -------------------------------------------------------------------------------- 1 | export * from './markdownSection' 2 | export * from './pageProperties' 3 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/vite/pageProperties/types.ts: -------------------------------------------------------------------------------- 1 | export type PagePropertiesData = Record 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/src/vite/path.ts: -------------------------------------------------------------------------------- 1 | import { normalizePath } from 'vite' 2 | 3 | export function pathEquals(path: string, equals: string): boolean { 4 | return normalizePath(path) === (normalizePath(equals)) 5 | } 6 | 7 | export function pathStartsWith(path: string, startsWith: string): boolean { 8 | return normalizePath(path).startsWith(normalizePath(startsWith)) 9 | } 10 | 11 | export function pathEndsWith(path: string, startsWith: string): boolean { 12 | return normalizePath(path).endsWith(normalizePath(startsWith)) 13 | } 14 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "node", 6 | "vite/client", 7 | "./src/client/virtual.d.ts", 8 | "./yaml.d.ts" 9 | ], 10 | "declaration": false, 11 | "noEmit": false 12 | }, 13 | "include": [ 14 | "./src/**/*.ts", 15 | "./src/**/*.mts", 16 | "./src/**/*.tsx", 17 | "./src/**/*.d.ts", 18 | "./src/**/*.vue" 19 | ], 20 | "exclude": [ 21 | "**/dist/**", 22 | "node_modules" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-page-properties/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.yaml' { 2 | const value: Record | Array> 3 | export default value 4 | } 5 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-sidebar/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-sidebar` 2 | 3 | A vitepress plugin to generate sidebar for your site. 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-sidebar -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-sidebar -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-sidebar -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Sidebar](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-sidebar/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-sidebar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nolebase/vitepress-plugin-sidebar", 3 | "type": "module", 4 | "version": "2.17.1", 5 | "description": "A vitepress plugin to generate sidebar for your site.", 6 | "author": { 7 | "name": "Nólëbase", 8 | "email": "nolebase@ayaka.moe", 9 | "url": "https://github.com/nolebase" 10 | }, 11 | "license": "MIT", 12 | "homepage": "https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-sidebar/", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/nolebase/integrations.git", 16 | "directory": "packages/vitepress-plugin-sidebar" 17 | }, 18 | "keywords": [ 19 | "vitepress", 20 | "nolebase", 21 | "markdown", 22 | "vitepress-plugin", 23 | "nolebase-integration", 24 | "sidebar" 25 | ], 26 | "sideEffects": [ 27 | "**/*.css" 28 | ], 29 | "exports": { 30 | ".": { 31 | "types": "./dist/index.d.ts", 32 | "import": "./dist/index.mjs", 33 | "require": "./dist/index.cjs" 34 | } 35 | }, 36 | "main": "./dist/index.cjs", 37 | "module": "./dist/index.mjs", 38 | "types": "./dist/index.d.ts", 39 | "files": [ 40 | "README.md", 41 | "dist", 42 | "package.json" 43 | ], 44 | "scripts": { 45 | "dev": "concurrently \"pnpm run stub\"", 46 | "stub": "unbuild --stub", 47 | "build": "unbuild", 48 | "typecheck": "tsc --noEmit" 49 | }, 50 | "peerDependencies": { 51 | "vitepress": "^1.5.0 || ^2.0.0-alpha.1" 52 | }, 53 | "dependencies": { 54 | "fs-extra": "^11.3.0", 55 | "gray-matter": "^4.0.3", 56 | "tinyglobby": "^0.2.14" 57 | }, 58 | "devDependencies": { 59 | "@types/fs-extra": "^11.0.4" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-sidebar/src/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | calculateSidebar, 3 | } from './sidebar' 4 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-sidebar/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-thumbnail-hash/README.md: -------------------------------------------------------------------------------- 1 | # `@nolebase/vitepress-plugin-thumbnail-hash` 2 | 3 | A VitePress plugin that scan and generate data with [blurhash](https://github.com/woltapp/blurhash), [thumbhash](https://github.com/evanw/thumbhash) hashing algorithm for images, as well as a standalone component to render images with [blurhash](https://github.com/woltapp/blurhash) and [thumbhash](https://github.com/evanw/thumbhash). 4 | 5 | ## Install 6 | 7 | ### Npm 8 | 9 | ```shell 10 | npm i @nolebase/vitepress-plugin-thumbnail-hash -D 11 | ``` 12 | 13 | ### Yarn 14 | 15 | ```shell 16 | yarn add @nolebase/vitepress-plugin-thumbnail-hash -D 17 | ``` 18 | 19 | ### Pnpm 20 | 21 | ```shell 22 | pnpm add @nolebase/vitepress-plugin-thumbnail-hash -D 23 | ``` 24 | 25 | ## Documentation 26 | 27 | Please refer to [Thumbnail hashing for images](https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-thumbnail-hash/) for more information. 28 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-thumbnail-hash/build.config.ts: -------------------------------------------------------------------------------- 1 | import { exec } from 'node:child_process' 2 | import { promisify } from 'node:util' 3 | 4 | import builtins from 'builtin-modules' 5 | import { defineBuildConfig } from 'unbuild' 6 | 7 | const execAsync = promisify(exec) 8 | 9 | export default defineBuildConfig({ 10 | entries: [ 11 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.vue'], loaders: ['vue'] }, 12 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'cjs', loaders: ['js'] }, 13 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.ts'], format: 'esm', loaders: ['js'] }, 14 | { builder: 'mkdist', input: './src/client', outDir: './dist/client', pattern: ['**/*.css'], loaders: ['postcss'] }, 15 | { builder: 'rollup', input: './src/vite/index', outDir: './dist/vite' }, 16 | ], 17 | clean: true, 18 | sourcemap: true, 19 | declaration: true, 20 | externals: [ 21 | 'vite', 22 | 'canvaskit-wasm', 23 | 'colorette', 24 | 'uncrypto', 25 | 'unlazy', 26 | 'vitepress', 27 | // builtins 28 | ...builtins, 29 | ], 30 | rollup: { 31 | emitCJS: true, 32 | }, 33 | hooks: { 34 | 'mkdist:done': async (ctx) => { 35 | if (ctx.options.stub) 36 | return 37 | // Since not all the users would choose to use unocss, 38 | // we bundle the styles from unocss here for users to opt-in. 39 | // 40 | // However, since the unocss doesn't provide a unplugin, or rollup 41 | // plugin for us to use, we have to use the CLI here. 42 | // 43 | // The use of CLI was suggested by how to use unocss with rollup? · unocss/unocss · Discussion #542 44 | // https:// github.com/unocss/unocss/discussions/542 45 | await execAsync('unocss "./src/client/**/*.vue" -o dist/client/unocss.css') 46 | }, 47 | }, 48 | }) 49 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-thumbnail-hash/src/client/components/NolebaseUnlazyImg.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 50 | 51 | 56 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-thumbnail-hash/src/client/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NolebaseUnlazyImg } from './components/NolebaseUnlazyImg.vue' 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-thumbnail-hash/src/client/style.css: -------------------------------------------------------------------------------- 1 | @import "./unocss.css" 2 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-thumbnail-hash/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export interface ThumbHashAsset { 2 | /** 3 | * The file name of the image. Will be normalized to be relative to the 4 | * root of the VitePress configuration file. 5 | */ 6 | assetFileName: string 7 | /** 8 | * The full file name of the image. 9 | */ 10 | assetFullFileName: string 11 | /** 12 | * The hash of the image. 13 | */ 14 | assetFullHash: string 15 | /** 16 | * The base64 encoded url safe hash of the image. 17 | */ 18 | assetFileHash: string 19 | /** 20 | * The asset URL of the image. Will be used to render as `src` attribute 21 | * in the HTML. 22 | */ 23 | assetUrl: string 24 | /** 25 | * The asset URL of the image with base. Will be used to render as `data-src` 26 | * attribute in the HTML used by unlazy. 27 | * 28 | * Value will be automatically calculated based on the `base` field 29 | * configured in the VitePress configuration. 30 | */ 31 | assetUrlWithBase: string 32 | } 33 | 34 | export interface ThumbHashCalculated { 35 | /** 36 | * The thumbhash data URL of the image. Will be used to render as 37 | * `src` attribute in the HTML. 38 | */ 39 | dataUrl: string 40 | /** 41 | * The thumbhash data base64 of the image. Will be used to render as 42 | * `data-thumbhash` attribute in the HTML. 43 | */ 44 | dataBase64: string 45 | /** 46 | * The resized width of the image (thumbhash requires the image to be 47 | * resized to less than 100px in width or height). 48 | */ 49 | width: number 50 | /** 51 | * The original width of the image. 52 | */ 53 | originalWidth: number 54 | /** 55 | * The resized height of the image (thumbhash requires the image to 56 | * be resized to less than 100px in width or height). 57 | */ 58 | height: number 59 | /** 60 | * The original height of the image. 61 | */ 62 | originalHeight: number 63 | } 64 | 65 | export type ThumbHash = ThumbHashAsset & ThumbHashCalculated 66 | -------------------------------------------------------------------------------- /packages/vitepress-plugin-thumbnail-hash/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "noEmit": false, 6 | "outDir": "./dist" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts", 10 | "./src/**/*.mts", 11 | "./src/**/*.tsx", 12 | "./src/**/*.d.ts", 13 | "./src/**/*.vue" 14 | ], 15 | "exclude": [ 16 | "**/dist/**", 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - packages/** 3 | - '!**/dist/**' 4 | - docs 5 | catalog: 6 | vite: ^6.3.5 7 | vue: ^3.5.14 8 | -------------------------------------------------------------------------------- /uno.config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | defineConfig, 3 | presetAttributify, 4 | presetIcons, 5 | presetUno, 6 | presetWebFonts, 7 | } from 'unocss' 8 | 9 | export default defineConfig({ 10 | shortcuts: [], 11 | presets: [ 12 | presetUno({ 13 | dark: 'class', 14 | }), 15 | presetAttributify(), 16 | presetIcons({ 17 | prefix: 'i-', 18 | scale: 1.2, // size: 1.2 rem 19 | extraProperties: { 20 | 'display': 'inline-block', 21 | 'vertical-align': 'middle', 22 | 'min-width': '1.2rem', 23 | }, 24 | }), 25 | presetWebFonts({ 26 | fonts: { 27 | 'chakra-petch': ['Chakra Petch'], 28 | 'baloo-2': [ 29 | { 30 | name: 'Baloo 2', 31 | }, 32 | { 33 | name: 'Noto Sans', 34 | }, 35 | { 36 | name: 'Roboto', 37 | }, 38 | { 39 | name: 'sans-serif', 40 | provider: 'none', 41 | }, 42 | ], 43 | 'jura': ['Jura'], 44 | }, 45 | }), 46 | ], 47 | }) 48 | -------------------------------------------------------------------------------- /vitest.workspace.ts: -------------------------------------------------------------------------------- 1 | import { defineWorkspace } from 'vitest/config' 2 | 3 | export default defineWorkspace([ 4 | 'packages/*', 5 | ]) 6 | --------------------------------------------------------------------------------