Skip to content

Commit

Permalink
std/templates/minimal: make mdbook build -o work
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarewk committed Feb 6, 2024
1 parent dda44ed commit 708dc97
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/std/templates/minimal/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction

see [Cell: repo](cells/repo.md) for introduction
12 changes: 5 additions & 7 deletions src/std/templates/minimal/docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Prelude

- [Introduction]()
- [Motivation]()
- [Target Audience]()
- [Overview](README.md)

# Section 1

- [First Chapter]()
- [Second Chapter]()
- [First Chapter](chapter-1.md)
- [Second Chapter](chapter-2.md)

# Section 2
# Reference

- [Third Chapter]()
- [Cell: repo](cells/repo.md)
3 changes: 3 additions & 0 deletions src/std/templates/minimal/docs/cells/repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="sidetoc"><nav class="pagetoc"></nav></div>

_Autogenerated documentation from `./nix/repo/*`._
3 changes: 3 additions & 0 deletions src/std/templates/minimal/docs/chapter-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# First chapter

Example chapter 1
3 changes: 3 additions & 0 deletions src/std/templates/minimal/docs/chapter-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Second chapter

Example chapter 2
26 changes: 26 additions & 0 deletions src/std/templates/minimal/nix/repo/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Contributing

### Prerequisites

You need [nix](https://nixos.org/download.html) and [direnv](https://direnv.net/).

### Enter Contribution Environment

```console
direnv allow
```

### Change Contribution Environment

```console
$EDITOR ./nix/repo/configs.nix
direnv reload
```

### Preview Documentation

<sub>You need to be inside the Contribution Environment.</sub>

```console
mdbook build -o
```
12 changes: 11 additions & 1 deletion src/std/templates/minimal/nix/repo/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ in
# Tool Homepage: https://rust-lang.github.io/mdBook/
mdbook = (mkNixago configs.mdbook) {
# see defaults at https://github.com/divnix/std/blob/5ce7c9411337af3cb299bc9b6cc0dc88f4c1ee0e/src/data/configs/mdbook.nix
data = { };
data = {
book.title = "CONFIGURE-ME";
preprocessor.paisano-preprocessor = {
multi = [
{
chapter = "Cell: repo";
cell = "repo";
}
];
};
};
};
}

0 comments on commit 708dc97

Please sign in to comment.