Skip to content

Commit

Permalink
Update gh-pages
Browse files Browse the repository at this point in the history
Store path: /nix/store/4sgglwmipd7gpk3qqxzh50lpnrgrysjn-cardano-nix-docs
  • Loading branch information
hercules-ci[bot] committed Sep 16, 2024
1 parent d902f47 commit adf9f91
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions render.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
Text to display in TOC for this options group
'';
};

modules = mkOption {
type = listOf deferredModule;
description = ''
List of modules to scan/render options
'';
};

namespaces = mkOption {
type = listOf str;
description = ''
Expand All @@ -40,6 +42,7 @@
Path to be replaced
'';
};

githubUrl = mkOption {
type = str;
description = ''
Expand All @@ -51,26 +54,38 @@
in {
options.renderDocs = {
enable = mkEnableOption "Document rendering";

name = mkOption {
type = str;
description = ''
Title of the documentation
'';
};

directory = mkOption {
type = path;
default = "${self}/docs";
description = ''
Directorying containing the documentation
'';
};

packageName = mkOption {
type = str;
default = "docs";
description = ''
Name of package containing the documentation
'';
};

mkdocsYamlFile = mkOption {
type = path;
default = "${self}/docs/mkdocs.yml";
default = "${cfg.directory}/mkdocs.yml";
description = ''
Path to the mkdocs.yml file
'';
};

devshells = mkOption {
type = listOf str;
default = ["default"];
Expand Down Expand Up @@ -230,12 +245,16 @@ in {
mkMerge ([
{
packages.${cfg.packageName} = stdenv.mkDerivation {
src = ../.; # FIXME: use config.flake-root.package here
# src = builtins.trace config.flake-root.package config.flake-root.package;
src = cfg.directory;
inherit (cfg) name;

nativeBuildInputs = [my-mkdocs];

unpackPhase = ''
cp -r $src docs
chmod -R +w docs
'';

buildPhase = ''
ln -s ${options-doc} ${docsPath}
# mkdocs expect mkdocs one level upper than `docs/`, but we want to keep it in `docs/`
Expand Down

0 comments on commit adf9f91

Please sign in to comment.