DH_MKDOCS(1)
β¨ DH_MKDOCS(1) β¨ β the dh_mkdocs page, bestie edition π
okay so you found yourself in section 1 of the manual, the Debhelper zone, staring at dh_mkdocs and wondering what it even does. don't worry, i got you π«Ά
πΈ NAME πΈ
dh_mkdocs β she helps you package documentation that was generated by MkDocs. that's it, that's the job, and she eats every time π
π¦ SYNOPSIS π¦
dh_mkdocs [debhelper options] [-Xitem] [-Tpackage | --theme-package package]
like, look at her. so compact. so iconic π
π DESCRIPTION π
dh_mkdocs is a helper program for packaging documentation generated by MkDocs. and ngl she does a lot of heavy lifting behind the scenes, so let's break it down:
- she replaces static files with symlinks to their packaged versions whenever that's possible. and if your package is using non-standard themes, that's when you pull out the
--theme-packageoption, like so:
dh_mkdocs --theme-package mkdocs-bootstrap
heads up bestie: dh_mkdocs only symlinks non-empty files with identical content. no cap. empty files and files that differ? she's not touching those, periodt.
- for the standard
mkdocsandreadthedocsthemes, she replaces references to thehighlight.jslibrary from the CDN with references to the packaged version of that library. so you're not loading random stuff off the internet at runtime, you're loading the version that actually ships with your package. slay π - she adds the needed dependencies to the
${mkdocs:Depends}substitution variable. and please, please, add this variable to theDepends:field of your documentation package, or the whole thing just does not work. i'm begging π
and the actual cheat code: you can pass --with mkdocs to dh(1) and it will automatically call dh_mkdocs right after dh_installdocs. no manual invocation, no forgetting, just vibes π
π OPTIONS π
-Xitem,--exclude itemβ excludes files that contain item anywhere in their filename from being symlinked or edited. like, "not this one, not today." π
this option can be specified multiple times, so stack 'em up if you've got multiple things to exclude.
-Tpackage,--theme-package packageβ scans the specified additional package for files that can be used as symlink targets. this is the "hey, check over there too" move π
this option can also be specified multiple times. again: stack away.
π₯ SEE ALSO π₯
this program is meant to be used together with debhelper. like, they're a package deal, an inseparable duo, the main character and her bestie π«Ά
π AUTHOR π
Dmitry Shachnev <mitya57@debian.org> β thank you for your service, legend π«‘
and that's the whole page, bestie! this was the dh_mkdocs(1) manual, coming to you from the Debhelper source, dated 2025-03-16. go forth and package your docs, you're gonna do amazing πβ¨π
π¦ where this page comes from
- debian trixie: mkdocs 1.6.1+dfsg1-2 Β· BSD-2-Clause
- ubuntu resolute: mkdocs 1.6.1+dfsg1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms