Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,7 @@ runCommand "documentation-highlighter"
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
};
src = lib.sources.cleanSourceWith {
src = ./.;
filter =
path: type:
lib.elem (baseNameOf path) [
"highlight.pack.js"
"LICENSE"
"loader.js"
"mono-blue.css"
"README.md"
];
};
src = ./src;
}
''
cp -r "$src" "$out"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This file was generated with pkgs/misc/documentation-highlighter/update.sh
This file was generated with pkgs/by-name/do/documentation-highlighter/update.sh

# Highlight.js CDN Assets

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
pre code.hljs {
display: block;
overflow-x: auto;
padding: 1em;
display: block;
overflow-x: auto;
padding: 1em
}
code.hljs {
padding: 3px 5px;
padding: 3px 5px
}
/*
Five-color theme from a single blue hue.
*/
.hljs {
background: #eaeef3;
color: #00193a;
background: #eaeef3;
color: #00193a
}
.hljs-keyword,
.hljs-selector-tag,
Expand All @@ -20,10 +20,10 @@ code.hljs {
.hljs-doctag,
.hljs-name,
.hljs-strong {
font-weight: bold;
font-weight: bold
}
.hljs-comment {
color: var(--color-1);
color: #738191
}
.hljs-string,
.hljs-title,
Expand All @@ -37,7 +37,7 @@ code.hljs {
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: var(--color-2);
color: #0048ab
}
.hljs-meta,
.hljs-subst,
Expand All @@ -49,22 +49,8 @@ code.hljs {
.hljs-template-variable,
.hljs-link,
.hljs-bullet {
color: var(--color-3);
color: #4c81c9
}
.hljs-emphasis {
font-style: italic;
}

:root {
--color-1: #738191;
--color-2: #0048ab;
--color-3: #4c81c9;
}

@media (prefers-color-scheme: dark) {
:root {
--color-1: #8b9caf;
--color-2: #3b85e7;
--color-3: #5795e7;
}
}
font-style: italic
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ set -o pipefail
root=$(pwd)

if [ ! -f "./update.sh" ]; then
echo "Please run this script from within pkgs/misc/documentation-highlighter/!"
echo "Please run this script from within pkgs/by-name/do/documentation-highlighter/!"
exit 1
fi

scratch=$(mktemp -d -t tmp.XXXXXXXXXX)
function finish {
rm -rf "$scratch"
rm -rf "$scratch"
}
trap finish EXIT


mkdir $scratch/src
cd $scratch/src
mkdir "$scratch/src"
cd "$scratch/src"

curl \
-X POST \
Expand All @@ -28,17 +27,16 @@ curl \
"api": 2,
"languages": ["bash", "nix", "shell"]
}' \
https://highlightjs.org/api/download > $scratch/out.zip

https://highlightjs.org/api/download >"$scratch/out.zip"

unzip "$scratch/out.zip"
out="$root/"
out="$root/src"
mkdir -p "$out"
cp ./highlight.min.js "$out/highlight.pack.js"
cp ./{LICENSE,styles/mono-blue.css} "$out"

(
echo "This file was generated with pkgs/misc/documentation-highlighter/update.sh"
echo "This file was generated with pkgs/by-name/do/documentation-highlighter/update.sh"
echo ""
cat README.md
) > "$out/README.md"
) >"$out/README.md"
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9168,8 +9168,6 @@ with pkgs;
docbook_xsl = docbook-xsl-nons;
docbook_xsl_ns = docbook-xsl-ns;

documentation-highlighter = callPackage ../misc/documentation-highlighter { };

moeli = eduli;

font-awesome_4 = (callPackage ../data/fonts/font-awesome { }).v4;
Expand Down
Loading