From d236bb417887d958e23352dbb0c092eec5783df4 Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Wed, 26 Aug 2026 00:19:50 -0700 Subject: [PATCH] Restore Docusaurus admonitions under MDX v2. Convert: ::tip Title to :::tip[Title], keep the generator output compatible, and turn off CSS cascade layers so callouts render again. Co-authored-by: Cursor --- docs/install/archlinux.md | 2 +- docs/install/choosemethod.md | 2 +- docs/install/compose.md | 2 +- docs/install/configuration.md | 2 +- docs/install/includes/archiveaccess.md | 2 +- docs/install/includes/dockerconfigfile.md | 2 +- docs/install/includes/dockerdatamount.md | 2 +- docs/install/linux.md | 2 +- docs/install/unraid.md | 4 ++-- docs/install/windows.md | 4 ++-- docusaurus.config.js | 22 ++++++++++++---------- generate.sh | 15 +++++++++++++++ 12 files changed, 39 insertions(+), 22 deletions(-) diff --git a/docs/install/archlinux.md b/docs/install/archlinux.md index 6a5df62..a7c9c20 100644 --- a/docs/install/archlinux.md +++ b/docs/install/archlinux.md @@ -9,7 +9,7 @@ description: Install Unpackerr on an Arch Linux server. import ArchiveAccess from './includes/archiveaccess.md'; import Permissions from './includes/linuxpermissions.md'; -:::info Root Access +:::info[Root Access] This installation method requires root. If you don't have root on your shell, then check out the non-root directions. ::: diff --git a/docs/install/choosemethod.md b/docs/install/choosemethod.md index 6b72087..032fc36 100644 --- a/docs/install/choosemethod.md +++ b/docs/install/choosemethod.md @@ -23,7 +23,7 @@ reside. Read more about that on the [Docker page](docker#folder-watcher). - [macOS](/docs/install/macos) - [Windows](/docs/install/windows) -:::tip CPU Hog +:::tip[CPU Hog] Unpackerr uses a lot CPU while extracting, and tends not to work well when running on smaller systems like Synology NAS devices. Running Unpackerr on a system with a large CPU is ideal to avoid system performance degradation. diff --git a/docs/install/compose.md b/docs/install/compose.md index 58bd462..78812b1 100644 --- a/docs/install/compose.md +++ b/docs/install/compose.md @@ -75,7 +75,7 @@ Or whatever download path you mounted; just put it there for ease of finding it. ## More Notes -:::danger Security Opts +:::danger[Security Opts] Do not include this in your compose. It will make Unpackerr not work properly. If you know how to adjust caps, go for it, but please don't ask for help without removing this first: diff --git a/docs/install/configuration.md b/docs/install/configuration.md index b1847ee..882763c 100644 --- a/docs/install/configuration.md +++ b/docs/install/configuration.md @@ -93,7 +93,7 @@ extractions and cause extra disk IO. You may also specify a password file by providing a "password" in this format: `filepath:/path/to/passwords.txt`. The file must contain 1 password per line. -:::info Other Secrets +:::info[Other Secrets] You may store any string parameter (except time intervals) into a separate file by setting the value to `filepath:/path/to/file.txt`. In other words, if you want your Radarr API key to be read from a separate file, instead of storing it directly diff --git a/docs/install/includes/archiveaccess.md b/docs/install/includes/archiveaccess.md index 20c5258..b4273de 100644 --- a/docs/install/includes/archiveaccess.md +++ b/docs/install/includes/archiveaccess.md @@ -1,4 +1,4 @@ -:::caution Archive Access +:::caution[Archive Access] Unpackerr requires write access to your download location. Make sure you set the `path` variables correctly in the configuration. Even if they're set incorrectly Unpackerr makes a best effort attempt diff --git a/docs/install/includes/dockerconfigfile.md b/docs/install/includes/dockerconfigfile.md index d9492a5..7c9378c 100644 --- a/docs/install/includes/dockerconfigfile.md +++ b/docs/install/includes/dockerconfigfile.md @@ -1,4 +1,4 @@ -:::info Default Config File +:::info[Default Config File] When you start Unpackerr in Docker it checks for a `/config` directory. If one exists, and there is no `unpackerr.conf` file within it, a brand new file is written with all default values. We still recommend using the [generator](https://notifiarr.com/unpackerr) to build yourself a new file. diff --git a/docs/install/includes/dockerdatamount.md b/docs/install/includes/dockerdatamount.md index 3e3766f..1700b80 100644 --- a/docs/install/includes/dockerdatamount.md +++ b/docs/install/includes/dockerdatamount.md @@ -1,4 +1,4 @@ -:::tip Data Mount +:::tip[Data Mount] The `/data` or `/downloads` mount you use for Starr apps should be set the same for Unpackerr. Using the same mount path keeps consistency and makes troubleshooting Unpackerr easier. Most importantly, it allows Unpackerr to find your files. diff --git a/docs/install/linux.md b/docs/install/linux.md index 19d4f0c..7ce39ca 100644 --- a/docs/install/linux.md +++ b/docs/install/linux.md @@ -17,7 +17,7 @@ Use the command (script) below to automatically install the GoLift repo and unpackerr in one command. If your system does not use `yum` (`rpm`) or `apt` (`dpkg`) then these directions are not for you. -:::info Root Access +:::info[Root Access] This installation method requires root. If you don't have root on your shell, then check out the non-root directions. ::: diff --git a/docs/install/unraid.md b/docs/install/unraid.md index 04e36fe..216d1f4 100644 --- a/docs/install/unraid.md +++ b/docs/install/unraid.md @@ -16,7 +16,7 @@ on unRAID. Install it from the `Apps` page; see screenshot that follows. On the install screen, fill in the `URL` and `API_KEY` for one or more of the Starr apps. -:::note Multiple Instances +:::note[Multiple Instances] If you have, for instance, two Radarrs, you can simply add two new variables: `UN_RADARR_1_URL` and `UN_RADARR_1_API_KEY`. If you have 3, then increase the `1` to a `2` and so on. This works for all starr apps, folders, webhooks and command @@ -28,7 +28,7 @@ It's recommended to put it in your downloads location, and an example follows. ![Bind volume for Unpackerr log file](/img/screenshots/unraid/bindvolume.png "bind volume") -:::tip Download Location +:::tip[Download Location] The most common misconfiguration on unRAID, by far, and it's not even a close second, is having the correct path mounted for your download location. As you see in the screenshot above, it's set to `host:/mnt/user/downloads` and `container:/downloads`. This is almost certainly diff --git a/docs/install/windows.md b/docs/install/windows.md index bdb7a7a..232c2c0 100644 --- a/docs/install/windows.md +++ b/docs/install/windows.md @@ -10,7 +10,7 @@ import ArchiveAccess from './includes/archiveaccess.md'; # Windows Installation -:::tip Install Location +:::tip[Install Location] A default Windows install runs from `C:\`; if you installed Windows in another location, then replace it accordingly. ::: @@ -33,7 +33,7 @@ A default Windows install runs from `C:\`; if you installed Windows in another l ## Running unpackerr as a Windows service -:::info Community Contribution +:::info[Community Contribution] The following content was provided by a community member, [IamGimli](https://github.com/IamGimli). ::: diff --git a/docusaurus.config.js b/docusaurus.config.js index 05b7ddc..1b42710 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -2,8 +2,6 @@ // `@type` JSDoc annotations allow editor autocompletion and type checking // (when paired with `@ts-check`). -import {themes as prismThemes} from 'prism-react-renderer'; - /** @type {import('@docusaurus/types').Config} */ const config = { title: 'Unpackerr Extracter', @@ -12,7 +10,14 @@ const config = { // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future future: { - v4: true, + v4: { + removeLegacyPostBuildHeadAttribute: true, + fasterByDefault: true, + siteStorageNamespacing: true, + mdx1CompatDisabledByDefault: true, + // Infima cascade layers restyle the existing custom CSS. + useCssCascadeLayers: false, + }, }, url: 'https://unpackerr.zip', @@ -25,6 +30,10 @@ const config = { hooks: { onBrokenMarkdownLinks: 'warn', }, + mdx1Compat: { + // Keep :::tip Title working for docs and generate.sh output. + admonitions: true, + }, }, i18n: { @@ -51,9 +60,6 @@ const config = { themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ - colorMode: { - respectPrefersColorScheme: true, - }, navbar: { logo: { alt: 'Unpackerr', @@ -121,10 +127,6 @@ const config = { Copyright © 2018-${new Date().getFullYear()} Go Lift `, }, - prism: { - theme: prismThemes.github, - darkTheme: prismThemes.dracula, - }, }), }; diff --git a/generate.sh b/generate.sh index 61f724d..a4d3346 100755 --- a/generate.sh +++ b/generate.sh @@ -8,3 +8,18 @@ go env -w 'GOPRIVATE=github.com/Unpackerr/*' # Run the config generator directly from github. go run github.com/Unpackerr/unpackerr/init/config@${UNPACKERR_BRANCH} --type docusaurus --output docs/install/generated + +# Docusaurus MDX v2 needs :::note[Title]; the generator still emits :::note Title. +python3 - <<'PY' +from pathlib import Path +import re +pat = re.compile( + r"^(:::(?:note|tip|info|caution|danger|warning|important|success|secondary)) +(.+)$", + re.M, +) +for path in Path("docs/install/generated").glob("*.md"): + text = path.read_text() + updated = pat.sub(r"\1[\2]", text) + if updated != text: + path.write_text(updated) +PY