forked from NotAShelf/nvf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NotAShelf#187 from NotAShelf/markdown-docs
docs: refactor
- Loading branch information
Showing
41 changed files
with
1,133 additions
and
1,031 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.SH "AUTHORS" | ||
.PP | ||
neovim-flake contributors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.TH "neovim-flake" "5" "01/01/1980" "neovim-flake" | ||
.\" disable hyphenation | ||
.nh | ||
.\" disable justification (adjust text to left margin only) | ||
.ad l | ||
.\" enable line breaks after slashes | ||
.cflags 4 / | ||
.SH "NAME" | ||
neovim-flake configuration specification | ||
.SH "OPTIONS" | ||
.PP | ||
You can use the following options in | ||
home\-configuration\&.nix: | ||
.PP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pre { | ||
padding: 0; | ||
} | ||
|
||
pre code.hljs { | ||
border: none; | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
writeShellScriptBin, | ||
makeDesktopItem, | ||
symlinkJoin, | ||
}: { | ||
html, | ||
pathName ? "neovim-flake", | ||
projectName ? pathName, | ||
name ? "${pathName}-help", | ||
}: let | ||
helpScript = writeShellScriptBin name '' | ||
set -euo pipefail | ||
if [[ ! -v BROWSER || -z $BROWSER ]]; then | ||
for candidate in xdg-open open w3m; do | ||
BROWSER="$(type -P $candidate || true)" | ||
if [[ -x $BROWSER ]]; then | ||
break; | ||
fi | ||
done | ||
fi | ||
if [[ ! -v BROWSER || -z $BROWSER ]]; then | ||
echo "$0: unable to start a web browser; please set \$BROWSER" | ||
exit 1 | ||
else | ||
exec "$BROWSER" "${html}/share/doc/${pathName}/index.xhtml" | ||
fi | ||
''; | ||
|
||
desktopItem = makeDesktopItem { | ||
name = "${pathName}-manual"; | ||
desktopName = "${projectName} Manual"; | ||
genericName = "View ${projectName} documentation in a web browser"; | ||
icon = "nix-snowflake"; | ||
exec = "${helpScript}/bin/${name}"; | ||
categories = ["System"]; | ||
}; | ||
in | ||
symlinkJoin { | ||
inherit name; | ||
paths = [helpScript desktopItem]; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
documentation-highlighter, | ||
nmd, | ||
revision, | ||
outputPath ? "share/doc/neovim-flake", | ||
options, | ||
nixos-render-docs, | ||
}: | ||
stdenv.mkDerivation { | ||
name = "neovim-flake-manual"; | ||
|
||
nativeBuildInputs = [nixos-render-docs]; | ||
|
||
src = ./manual; | ||
|
||
buildPhase = '' | ||
mkdir -p out/media | ||
mkdir -p out/highlightjs | ||
cp -t out/highlightjs \ | ||
${documentation-highlighter}/highlight.pack.js \ | ||
${documentation-highlighter}/LICENSE \ | ||
${documentation-highlighter}/mono-blue.css \ | ||
${documentation-highlighter}/loader.js | ||
substituteInPlace ./options.md \ | ||
--replace \ | ||
'@OPTIONS_JSON@' \ | ||
${options.neovim-flake}/share/doc/nixos/options.json | ||
substituteInPlace ./manual.md \ | ||
--replace \ | ||
'@VERSION@' \ | ||
${revision} | ||
cp ${nmd}/static/style.css out/style.css | ||
cp -t out/highlightjs ${nmd}/static/highlightjs/tomorrow-night.min.css | ||
cp ${./highlight-style.css} out/highlightjs/highlight-style.css | ||
nixos-render-docs manual html \ | ||
--manpage-urls ./manpage-urls.json \ | ||
--revision ${lib.trivial.revisionWithDefault revision} \ | ||
--stylesheet style.css \ | ||
--stylesheet highlightjs/tomorrow-night.min.css \ | ||
--stylesheet highlightjs/highlight-style.css \ | ||
--script highlightjs/highlight.pack.js \ | ||
--script highlightjs/loader.js \ | ||
--toc-depth 1 \ | ||
--section-toc-depth 1 \ | ||
manual.md \ | ||
out/index.xhtml | ||
''; | ||
|
||
installPhase = '' | ||
dest="$out/${outputPath}" | ||
mkdir -p "$(dirname "$dest")" | ||
mv out "$dest" | ||
mkdir -p $out/nix-support/ | ||
echo "doc manual $dest index.html" >> $out/nix-support/hydra-build-products | ||
''; | ||
} |
Oops, something went wrong.