doc: fix some alerts not being rendered by substituteInPlace
This commit is contained in:
parent
de2057a000
commit
d6796ff307
2 changed files with 7 additions and 11 deletions
|
|
@ -2,6 +2,8 @@
|
|||
title = "Stylix"
|
||||
language = "en"
|
||||
|
||||
[preprocessor.alerts]
|
||||
|
||||
[output.html]
|
||||
site-url = "/stylix/"
|
||||
git-repository-url = "https://github.com/danth/stylix"
|
||||
|
|
|
|||
|
|
@ -87,6 +87,10 @@ in
|
|||
pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "stylix-book";
|
||||
src = ./.;
|
||||
buildInputs = with pkgs; [
|
||||
mdbook
|
||||
mdbook-alerts
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
# The generated documentation has headings at level 2, but we want level 3
|
||||
|
|
@ -145,17 +149,7 @@ pkgs.stdenvNoCC.mkDerivation {
|
|||
|
||||
mkdir -p src/options/modules
|
||||
${modulePageScript}
|
||||
|
||||
# mdBook doesn't support this Markdown extension yet
|
||||
substituteInPlace **/*.md \
|
||||
--replace-quiet '> [!NOTE]' '> **Note**' \
|
||||
--replace-quiet '> [!TIP]' '> **Tip**' \
|
||||
--replace-quiet '> [!IMPORTANT]' '> **Important**' \
|
||||
--replace-quiet '> [!WARNING]' '> **Warning**' \
|
||||
--replace-quiet '> [!CAUTION]' '> **Caution**'
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
${pkgs.mdbook}/bin/mdbook build --dest-dir $out
|
||||
'';
|
||||
buildPhase = "mdbook build --dest-dir $out";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue