Skip to content

Commit

Permalink
docs: render first module via site module
Browse files Browse the repository at this point in the history
  • Loading branch information
DavHau authored and mergify[bot] committed Oct 11, 2023
1 parent 212fcf4 commit 585b98c
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 6 deletions.
8 changes: 4 additions & 4 deletions modules/flake-parts/site/book.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[book]
authors = ["Robert Hensing", "Various module authors"]
authors = ["David Hauer", "Various contributors"]
language = "en"
multilingual = false
src = "src"
title = "flake-parts"
title = "dream2nix"

[output.html]
git-repository-url = "https://github.com/hercules-ci/flake-parts"
edit-url-template = "https://github.com/hercules-ci/flake.parts-website/edit/main/site/{path}"
git-repository-url = "https://github.com/nix-community/dream2nix"
edit-url-template = "https://github.com/nix-community/dream2nix/edit/main/modules/dream2nix/{path}"
additional-js = [ "no-edit-options.js" ]
additional-css = [ "flake-parts.css" ]
no-section-label = true
Expand Down
6 changes: 5 additions & 1 deletion modules/flake-parts/site/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@
'';

packages = {
default = pkgs.stdenvNoCC.mkDerivation {
website = pkgs.stdenvNoCC.mkDerivation {
name = "site";
nativeBuildInputs = [pkgs.mdbook pkgs.mdbook-linkcheck];
src = ./.;
buildPhase = ''
runHook preBuild
cp ${self + /docs/theme/highlight.js} ./src/highlight.js
mkdir -p ./theme
cp ${self + /modules/dream2nix/core/docs/theme/favicon.png} ./theme/favicon.png
{
while read ln; do
case "$ln" in
Expand Down
2 changes: 1 addition & 1 deletion modules/flake-parts/site/flake-parts.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
h1.menu-title::before {
content: "";
display: inline-block;
background-image: url(./favicon.svg);
background-image: url(./favicon.png);
background-repeat: no-repeat;
background-size: contain;
width: 1.8ex;
Expand Down
1 change: 1 addition & 0 deletions modules/flake-parts/site/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Summary

- [Reference Documentation]()
- [core (built in)](./options/core.md)
7 changes: 7 additions & 0 deletions modules/flake-parts/site/src/intro-continued.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- 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`.
24 changes: 24 additions & 0 deletions modules/flake-parts/website.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
self,
lib,
...
}: {
perSystem = {
config,
self',
inputs',
pkgs,
...
}: {
render.inputs = {
core = {
title = "core";
flake.module = self.modules.dream2nix.core;
flake.outPath = self;
attributePath = ["module"];
intro = "intro";
baseUrl = "https://github.com/nix-community/dream2nix/blob/master";
};
};
};
}

0 comments on commit 585b98c

Please sign in to comment.