Skip to content

Commit

Permalink
.vitepress: add vitepress-plugin-git-changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegShchavelev committed Jul 11, 2024
1 parent ef1fccd commit defdf0e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
15 changes: 12 additions & 3 deletions .vitepress/config/shared.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
import { defineConfigWithTheme } from 'vitepress'
import { defineConfig } from 'vitepress'
import markdownTimeline from "vitepress-markdown-timeline"
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import UnoCSS from 'unocss/vite'
import {
GitChangelog,
GitChangelogMarkdownSection,
} from '@nolebase/vitepress-plugin-git-changelog/vite'

export const shared = defineConfigWithTheme({
export const shared = defineConfig({
title: "ALT Mobile Wiki",
titleTemplate: ':title — ALT Mobile Wiki',
base: '/ALTMobileWiki/',
srcDir: './docs',
vite: {
plugins: [
UnoCSS()
UnoCSS(),
GitChangelog({
// Fill in your repository URL here
repoURL: () => 'https://github.com/OlegShchavelev/ALTMobileWiki',
}),
GitChangelogMarkdownSection(),
],
optimizeDeps: {
exclude: ['@nolebase/vitepress-plugin-enhanced-readabilities/client']
Expand Down
8 changes: 8 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ import {
import type { Options } from '@nolebase/vitepress-plugin-enhanced-readabilities/client'
import { NolebaseEnhancedReadabilitiesPlugin } from '@nolebase/vitepress-plugin-enhanced-readabilities/client'
import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css'

import {
NolebaseGitChangelogPlugin
} from '@nolebase/vitepress-plugin-git-changelog/client'


import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'

import './styles/style.css'
import './styles/theme.css'
import 'uno.css'
import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css'
import '@nolebase/vitepress-plugin-git-changelog/client/style.css'
import "vitepress-markdown-timeline/dist/theme/index.css"
import { ERlocales } from '../data/lexicon'

Expand All @@ -35,6 +42,7 @@ export default {
},
enhanceApp({ app }) {
app.use(NolebaseEnhancedReadabilitiesPlugin, {locales: ERlocales} as Options)
app.use(NolebaseGitChangelogPlugin)
app.component('contribution', AMWContribution)
app.component('Video', AMWVideo)
enhanceAppWithTabs(app)
Expand Down
10 changes: 9 additions & 1 deletion .vitepress/theme/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,12 @@

.VPHomeSponsors .message {
max-width: 800px;
}
}

/**
* Component: GitChangeLog
* -------------------------------------------------------------------------- */
.bg-\$vp-custom-block-details-bg,
.bg-vp-custom-block-details-bg {
background-color: var(--vp-c-gray-3) !important;
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"devDependencies": {
"@nolebase/ui": "^2.2.2",
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.2.2",
"@nolebase/vitepress-plugin-git-changelog": "^2.2.0",
"@nolebase/vitepress-plugin-git-changelog": "^2.2.2",
"@types/node": "^20.14.8",
"vitepress": "^1.0.2",
"vitepress-markdown-timeline": "^1.2.1",
Expand Down

0 comments on commit defdf0e

Please sign in to comment.