Skip to content

Commit 016bfef

Browse files
committed
Replace documentation with new vitepress based documentation
1 parent e0146df commit 016bfef

File tree

4,460 files changed

+58132
-121820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,460 files changed

+58132
-121820
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ name: CI
33
on: pull_request
44

55
jobs:
6-
76
build:
87
runs-on: ubuntu-latest
98
steps:
10-
- uses: actions/checkout@v4
11-
- name: Prepare manpages
12-
run: |
13-
for path in source/man source/*-man; do
14-
if [ -d $path ]; then
15-
make -C $path
16-
fi
17-
done
18-
- uses: dovecot/[email protected]
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Setup Node
12+
uses: actions/setup-node@v3
13+
with:
14+
node-version: 20
15+
cache: npm
16+
- name: Install Dependencies
17+
run: npm ci
18+
- name: Build with VitePress
19+
run: |
20+
npm run docs:build

.vitepress/config.js

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
import path from 'path'
2+
import { defineConfig } from 'vitepress'
3+
import { pagefindPlugin } from 'vitepress-plugin-pagefind'
4+
import { generateSidebar } from 'vitepress-sidebar'
5+
import { dovecotMdExtend } from '../lib/markdown.js'
6+
import { frontmatterIter } from '../lib/utility.js'
7+
8+
const base = '/dovecot-ce-documentation'
9+
10+
// No need to include the "dummy" index files, used to build titles
11+
// for the sidebar, into the final documentation bundles
12+
const excludes = []
13+
await frontmatterIter(function (f, data) {
14+
if (data.exclude) {
15+
excludes.push(path.relative('docs/', f))
16+
}
17+
})
18+
19+
export default defineConfig({
20+
title: "Dovecot CE",
21+
description: "Dovecot CE Documentation",
22+
lang: "en-us",
23+
24+
srcDir: "docs",
25+
srcExclude: excludes,
26+
27+
base: base,
28+
sitemap: {
29+
hostname: 'https://doc.dovecot.org' + base
30+
},
31+
32+
vite: {
33+
build: {
34+
chunkSizeWarningLimit: 1000,
35+
},
36+
plugins: [
37+
pagefindPlugin()
38+
],
39+
},
40+
41+
ignoreDeadLinks: 'localhostLinks',
42+
43+
themeConfig: {
44+
nav: [
45+
{
46+
text: '2.4',
47+
items: [
48+
{ text: '2.3', link: 'https://doc.dovecot.org/' },
49+
]
50+
},
51+
{
52+
text: 'Dovecot Home',
53+
link: 'https://www.dovecot.org/'
54+
},
55+
{
56+
text: 'Repositories',
57+
link: 'https://repo.dovecot.org/'
58+
},
59+
],
60+
61+
sidebar: generateSidebar({
62+
documentRootPath: '/docs',
63+
useTitleFromFrontmatter: true,
64+
useFolderTitleFromIndexFile: true,
65+
includeFolderIndexFile: true,
66+
collapseDepth: 1,
67+
excludeFiles: [],
68+
excludeFilesByFrontmatterName: 'exclude',
69+
sortMenusByName: true,
70+
}),
71+
72+
outline: "deep",
73+
externalLinkIcon: true,
74+
lastUpdated: {},
75+
76+
docFooter: {
77+
prev: false,
78+
next: false,
79+
},
80+
footer: {
81+
copyright: 'Copyright © Open-Xchange GmbH',
82+
},
83+
84+
logo: '/dovecot_logo.png',
85+
86+
editLink: {
87+
pattern: 'https://github.com/dovecot/documentation/edit/main/docs/:path'
88+
},
89+
90+
socialLinks: [
91+
{ icon: 'github', link: 'https://github.com/dovecot/core/' },
92+
],
93+
},
94+
95+
markdown: {
96+
config: async (md) => await dovecotMdExtend(md),
97+
image: {
98+
lazyLoading: true,
99+
},
100+
math: true,
101+
},
102+
103+
head: [
104+
['link', { rel: 'icon', type: 'image/x-icon', href: base + '/favicon.ico' } ]
105+
],
106+
})

.vitepress/local.js.dist

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/* This file allows configuration overwrite of default paths. */
2+
3+
// Allows custom mapping of data sources.
4+
// It is used by the VitePress data loaders to determine what data to
5+
// load for export.
6+
//
7+
// By default, all data files are loaded from "../data" directory
8+
// (paths are relative to "<base>/lib").
9+
//
10+
// Keys are data identifiers, Values are location RELATIVE TO
11+
// * "<base>/lib" DIRECTORY.
12+
export const data_paths = {
13+
// doveadm: '../data/doveadm.js',
14+
}
15+
16+
// A listing of source files (.md) for the documentation.
17+
// Paths are relative to project base.
18+
//
19+
// Supports fast-glob: https://github.com/mrmlnc/fast-glob#pattern-syntax
20+
//
21+
// Default: [ 'docs/**/*.md' ]
22+
export const source_paths = []
23+
24+
// A listing of files to watch to refresh data loaders in dev mode.
25+
// See: https://vitepress.dev/guide/data-loading#data-from-local-files
26+
// Paths are relative to project base.
27+
//
28+
// Supports fast-glob: https://github.com/mrmlnc/fast-glob#pattern-syntax
29+
//
30+
// Default: [ 'docs/**/*.md', 'docs/**/*.inc', 'data/**/*' ]
31+
export const watch_paths = []
32+
33+
// A listing of source path translations.
34+
//
35+
// This is the same format as VitePress' 'rewrite' setting:
36+
// https://vitepress.dev/reference/site-config#rewrites
37+
//
38+
// Default: {}
39+
export const source_path_translations = {}
40+
41+
// A listing of paths containing man files.
42+
// Paths are relative to project base.
43+
//
44+
// Supports fast-glob: https://github.com/mrmlnc/fast-glob#pattern-syntax
45+
//
46+
// Default: [ 'docs/core/man/*.[[:digit:]].md' ]
47+
export const man_paths = []

.vitepress/theme/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
3+
const modules = import.meta.glob(
4+
'../../components/*.vue',
5+
{
6+
eager: true
7+
}
8+
)
9+
10+
export default {
11+
extends: DefaultTheme,
12+
/* This code loads all .vue components and globally registers them. */
13+
enhanceApp({ app }) {
14+
for (const path in modules) {
15+
const c = modules[path].default
16+
app.component(c.__name, c)
17+
}
18+
}
19+
}

Makefile

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)