docs: add readme for documents directory

This commit is contained in:
Youwen Wu 2024-10-20 02:31:48 -07:00
parent 01c8f30397
commit 9ab363b0f7
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

37
2024/documents/README.md Normal file
View file

@ -0,0 +1,37 @@
# alexandria, the document repository
This is where documents and their derivations are stored. The source code of
the document and its corresponding `package.nix` are placed in the same place.
There are two ways to organize documents. You can directly place the document
in [by-name](./by-name/), suitable for documents not assorted with a
particular course and various miscellany.
For documents related to specific courses, it is preferable to create a
directory for that course in [by-course](./by-course/), and then nesting the
document directory within the course directory. This will create a nested
structure for the packages as well.
For example, the following path:
```
by-name/my-document
```
will result in a package set containing `my-document`.
The path
```
by-course/phil-1/paper-1
```
results in a nested package set containing `phil-1.paper-1`. That means that
you can build that document with the command
```sh
nix build .#phil-1.paper-1
```
It's evident that this organization structure could be useful for organizing by
some topics other than courses, so the naming may change in the future.