docs: add reference documentation to website

This commit is contained in:
DavHau 2023-10-12 00:39:47 +02:00
parent d2e9a494d1
commit 5798a23484
29 changed files with 30 additions and 70 deletions

1
docs/.gitignore vendored
View File

@ -1 +0,0 @@
book

View File

@ -1,6 +0,0 @@
[book]
authors = ["Yusuf Bera Ertan"]
language = "en"
multilingual = false
src = "src"
title = "dream2nix documentation"

View File

@ -1,12 +0,0 @@
- [Introduction](./intro.md)
# Examples
- [dream2nix examples](./examples.md)
# Concepts
- [dream2nix modules](./modules.md)
# Development Roundups
- [April - June 2022](./development-roundups/2022-april-june.md)
- [July - September 2022](./development-roundups/2022-july-september.md)

View File

@ -1 +0,0 @@
../../README.md

File diff suppressed because one or more lines are too long

View File

@ -134,21 +134,6 @@
};
};
};
packages = {
docs =
pkgs.runCommand
"dream2nix-docs"
{nativeBuildInputs = [pkgs.bash pkgs.mdbook];}
''
bash -c "
errors=$(mdbook build -d $out ${./.}/docs |& grep ERROR)
if [ \"$errors\" ]; then
exit 1
fi
"
'';
};
};
in
flake-parts.lib.mkFlake {inherit inputs;} {

View File

@ -0,0 +1,13 @@
{
self,
lib,
...
}: {
perSystem = {
self',
pkgs,
...
}: {
packages.docs = self'.packages.website;
};
}

View File

@ -354,7 +354,6 @@ in {
# - [Reference Documentation]()
# - [core (built in)](./options/core.md)
generated-summary-md = pkgs.writeText "SUMMARY.md" ''
# Summary
- [Reference Documentation]()
${
lib.concatStringsSep "\n"

View File

@ -45,31 +45,18 @@
packages = {
website = pkgs.stdenvNoCC.mkDerivation {
name = "site";
name = "website";
nativeBuildInputs = [pkgs.mdbook pkgs.mdbook-linkcheck];
src = ./.;
buildPhase = ''
runHook preBuild
cp ${self + /docs/theme/highlight.js} ./src/highlight.js
cp ${self'.packages.generated-summary-md} ./src/SUMMARY.md
rm ./src/intro.md
cp ${self + /README.md} ./src/intro.md
cat ${self'.packages.generated-summary-md} >> ./src/SUMMARY.md
mkdir -p ./theme
cp ${self + /modules/dream2nix/core/docs/theme/favicon.png} ./theme/favicon.png
{
while read ln; do
case "$ln" in
*end_of_intro*)
break
;;
*)
echo "$ln"
;;
esac
done
cat src/intro-continued.md
} <${self + "/README.md"} >src/README.md
mkdir -p src/options
for f in ${config.packages.generated-docs}/*.html; do
cp "$f" "src/options/$(basename "$f" .html).md"

View File

@ -1,4 +1,12 @@
# Summary
- [Reference Documentation]()
- [core (built in)](./options/core.md)
- [Introduction](./intro.md)
# Examples
- [dream2nix examples](./examples.md)
# Concepts
- [dream2nix modules](./modules.md)
# Development Roundups
- [April - June 2022](./development-roundups/2022-april-june.md)
- [July - September 2022](./development-roundups/2022-july-september.md)

View File

@ -5,7 +5,7 @@ In the period of 3 months, [62 pull requests were merged](https://github.com/nix
## Most Notable Changes
### Indexers
Dream2nix now offers an interface for defining `indexers`. Indexers are programs that can query a package repository (think of npm, or crates.io) for package information. Read [more about indexers in our docs](../intro/indexers.html).
Dream2nix now offers an interface for defining `indexers`. Indexers are programs that can query a package repository (think of npm, or crates.io) for package information.
Indexers can be used to automatically import packages from all kinds of ecosystems into the nix domain. For example the `libraries-io` indexer can be used to query libraries.io for the 5000 most popular nodejs packages and convert them to nix packages.

View File

@ -1,7 +0,0 @@
<!-- prefaced by the README intro -->
# This documentation
You can find guides and the options reference in the menu (top left).
A site wide search is available by typing `s`.

View File

@ -0,0 +1 @@
../../../../README.md