mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-22 06:32:21 +03:00
docs: add reference documentation to website
This commit is contained in:
parent
d2e9a494d1
commit
5798a23484
1
docs/.gitignore
vendored
1
docs/.gitignore
vendored
@ -1 +0,0 @@
|
||||
book
|
@ -1,6 +0,0 @@
|
||||
[book]
|
||||
authors = ["Yusuf Bera Ertan"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "dream2nix documentation"
|
@ -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)
|
||||
|
@ -1 +0,0 @@
|
||||
../../README.md
|
6
docs/theme/highlight.js
vendored
6
docs/theme/highlight.js
vendored
File diff suppressed because one or more lines are too long
15
flake.nix
15
flake.nix
@ -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;} {
|
||||
|
13
modules/flake-parts/docs.nix
Normal file
13
modules/flake-parts/docs.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
perSystem = {
|
||||
self',
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
packages.docs = self'.packages.website;
|
||||
};
|
||||
}
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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`.
|
1
modules/flake-parts/site/src/intro.md
Symbolic link
1
modules/flake-parts/site/src/intro.md
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../README.md
|
Loading…
Reference in New Issue
Block a user