diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index d8176990d..75aedc35c 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -92,7 +92,6 @@ cnf cnrilrgfclra codahale codinghorror -coi CONDSTORE convertpw copybox @@ -247,6 +246,7 @@ gethosterror getmail getscript gitlab +gitrev Gluster gmatch gno diff --git a/.vitepress/config.js b/.vitepress/config.js index b9f6082e0..89ea56ba9 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -2,15 +2,42 @@ import gitCommitInfo from 'git-commit-info' import { defineConfig } from 'vitepress' import { pagefindPlugin } from 'vitepress-plugin-pagefind' import { generateSidebar } from 'vitepress-sidebar' -import { dovecotMdExtend, initDovecotMd } from '../lib/markdown.js' +import { dovecotMdExtend } from '../lib/markdown.js' import { getExcludes } from '../lib/utility.js' const base = '/2.4' -// Need to bootstrap configuration for Dovecot markdown driver (specifically, -// loading all data files to allow existence checking), or else the markdown -// processing will begin before Dovecot link markup is enabled -await initDovecotMd(base) +export const dovecotConfig = { + data_paths: { + doveadm: '../data/doveadm.js', + event_categories: '../data/event_categories.js', + event_reasons: '../data/event_reasons.js', + events: '../data/events.js', + links_overrides: '../data/links_overrides.js', + lua: '../data/lua.js', + settings: '../data/settings.js', + updates: '../data/updates.js', + }, + gitrev: { + align: 'right', + hash: gitCommitInfo().shortHash, + }, + man_includes: [ + 'docs/core/man/include/*.inc' + ], + man_paths: [ + 'docs/core/man/*.[[:digit:]].md' + ], + plugin_paths: [ + 'docs/core/plugins/*.md' + ], + url_rewrite: false, + watch_paths: [ + 'docs/**/*.md', + 'docs/**/*.inc', + 'data/**/*' + ] +} export default defineConfig({ title: "Dovecot CE", @@ -99,15 +126,12 @@ export default defineConfig({ { icon: 'github', link: 'https://github.com/dovecot/' }, ], - /* Dovecot specific config: return gitrev for this build. */ - gitrev: { - align: 'right', - hash: gitCommitInfo().shortHash, - } + /* Dovecot config. */ + dovecot: dovecotConfig, }, markdown: { - config: (md) => dovecotMdExtend(md), + config: async (md) => await dovecotMdExtend(md), image: { lazyLoading: true, }, diff --git a/.vitepress/local.js.dist b/.vitepress/local.js.dist deleted file mode 100644 index a43e56659..000000000 --- a/.vitepress/local.js.dist +++ /dev/null @@ -1,58 +0,0 @@ -/* This file allows configuration overrides of various core settings. */ - -// Allows custom mapping of data sources. -// It is used by the VitePress data loaders to determine what data to -// load for export. -// -// By default, all data files are loaded from "../data" directory -// (paths are relative to "/lib"). -// -// Keys are data identifiers, Values are location RELATIVE TO -// * "/lib" DIRECTORY. -export const data_paths = { - // doveadm: '../data/doveadm.js', -} - -// A listing of files to watch to refresh data loaders in dev mode. -// See: https://vitepress.dev/guide/data-loading#data-from-local-files -// Paths are relative to project base. -// -// Supports fast-glob: https://github.com/mrmlnc/fast-glob#pattern-syntax -// -// Default: [ 'docs/**/*.md', 'docs/**/*.inc', 'data/**/*' ] -export const watch_paths = [] - -// A listing of paths containing man files. -// Paths are relative to project base. -// -// Supports fast-glob: https://github.com/mrmlnc/fast-glob#pattern-syntax -// -// Default: [ 'docs/core/man/*.[[:digit:]].md' ] -export const man_paths = [] - -// A listing of paths containing plugin files. -// Paths are relative to project base. -// -// Supports fast-glob: https://github.com/mrmlnc/fast-glob#pattern-syntax -// -// Default: [ 'docs/core/plugins/*.md' ] -export const plugin_paths = [] - -// Enable additional labels to support in Dovecot-specific markdown -// processing (i.e. [[xyz,...]]). -export const markdown_extend = { - - // Init function. Return value is configuration options to add to markdown - // object. - // init: () => { return {} }, - - // Opening tag function. Returns opening tag. - // open: (mode, parts, opts, env) => { return '' }, - - // Body function. Returns body text. - // body: (mode, env) => { return '' }, - - // Close tag function. Returns closing tag. - // close: (mode, env) => { return '' }, - -} diff --git a/.vitepress/theme/DovecotLayout.vue b/.vitepress/theme/DovecotLayout.vue index c8d501309..9e7f603ca 100644 --- a/.vitepress/theme/DovecotLayout.vue +++ b/.vitepress/theme/DovecotLayout.vue @@ -10,9 +10,9 @@ const { Layout } = DefaultTheme