diff --git a/README.md b/README.md index 79d06001a..2124a0336 100644 --- a/README.md +++ b/README.md @@ -274,3 +274,18 @@ Create a update tag based on a tag_name. The tag_name must be defined in `data/updates.js`. Example: `[[changed,tag_name]]` + +### Other Markdown Extensions + +#### TODO Container + +***Syntax:*** + +``` +::: todo +TODO text contents +::: +``` + +Outputs a formatted TODO container, using the (optional) TODO text contents +as the body. diff --git a/docs/core/admin/limits.md b/docs/core/admin/limits.md index ecfbc4167..3022b48ad 100644 --- a/docs/core/admin/limits.md +++ b/docs/core/admin/limits.md @@ -8,13 +8,11 @@ title: Limits Dovecot contains various built-in resource limits designed to prevent denial of service situations. This page lists those limits. +::: todo +This list is currently incomplete. +::: + ## Message Headers There is a `10 MB` limit for a single message header block, and a `50 MB` limit for all header blocks in a message. - -## TODO - -::: danger TODO -List other limits here -::: diff --git a/docs/core/config/imap.md b/docs/core/config/imap.md index 247706978..37f06025d 100644 --- a/docs/core/config/imap.md +++ b/docs/core/config/imap.md @@ -85,7 +85,8 @@ mail_attribute_dict = proxy::metadata ### SPECIAL-USE -TODO +::: todo +::: ### PREVIEW diff --git a/docs/developers/debugging.md b/docs/developers/debugging.md index 0a3f14069..6c795aaf5 100644 --- a/docs/developers/debugging.md +++ b/docs/developers/debugging.md @@ -151,8 +151,8 @@ dest=core.tar.gz ## Debugging Core Dumps in Other Systems -::: warning TODO -Move to Pro +::: todo +Move to Dovecot Pro documentation. ::: If you have a tar.gz generated from dovecot-sysreport, you can debug it diff --git a/lib/markdown.js b/lib/markdown.js index 2784f79e1..66c276d76 100644 --- a/lib/markdown.js +++ b/lib/markdown.js @@ -1,8 +1,18 @@ +import containerPlugin from 'markdown-it-container' import deflistPlugin from 'markdown-it-deflist' import { createMarkdownRenderer } from 'vitepress' import { loadData, loadDovecotLinks, resolveURL } from './utility.js' export async function dovecotMdExtend(md) { + md.use(containerPlugin, 'todo', { + render: function(tokens, idx) { + if (tokens[idx].nesting === 1) { + return '
\n

⚠️ TODO

' + } else { + return '
\n' + } + } + }) md.use(deflistPlugin) md.use(dovecot_markdown, { dovecotlinks: await loadDovecotLinks(), diff --git a/package-lock.json b/package-lock.json index 18f7ba225..917f48418 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "fast-glob": "^3.3.2", "git-commit-info": "^2.0.2", "import": "^0.0.6", + "markdown-it-container": "^4.0.0", "markdown-it-deflist": "^3.0.0", "markdown-it-mathjax3": "^4.3.2", "pagefind": "^1.1.0", @@ -22,7 +23,7 @@ "unified": "^11.0.5", "unist-util-map": "^4.0.0", "vitepress": "^1.2.3", - "vitepress-plugin-pagefind": "^0.4.1", + "vitepress-plugin-pagefind": "^0.4.3", "vitepress-sidebar": "^1.23.2" } }, @@ -2358,6 +2359,12 @@ "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", "dev": true }, + "node_modules/markdown-it-container": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-container/-/markdown-it-container-4.0.0.tgz", + "integrity": "sha512-HaNccxUH0l7BNGYbFbjmGpf5aLHAMTinqRZQAEQbMr2cdD3z91Q6kIo1oUn1CQndkT03jat6ckrdRYuwwqLlQw==", + "dev": true + }, "node_modules/markdown-it-deflist": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/markdown-it-deflist/-/markdown-it-deflist-3.0.0.tgz", diff --git a/package.json b/package.json index 67f2f94eb..612a33ecb 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "fast-glob": "^3.3.2", "git-commit-info": "^2.0.2", "import": "^0.0.6", + "markdown-it-container": "^4.0.0", "markdown-it-deflist": "^3.0.0", "markdown-it-mathjax3": "^4.3.2", "pagefind": "^1.1.0", @@ -17,7 +18,7 @@ "unified": "^11.0.5", "unist-util-map": "^4.0.0", "vitepress": "^1.2.3", - "vitepress-plugin-pagefind": "^0.4.1", + "vitepress-plugin-pagefind": "^0.4.3", "vitepress-sidebar": "^1.23.2" }, "scripts": {