Skip to content

Commit 73df585

Browse files
authored
Merge pull request #1 from BeeHive-org/docs-rework-zensical
Rework docs: migrate to Zensical, ingredients/recipes structure, real code & BOMs
2 parents 4d33d92 + cf3d405 commit 73df585

84 files changed

Lines changed: 3617 additions & 1219 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- "zensical.toml"
9+
- "pyproject.toml"
10+
- "uv.lock"
11+
- ".github/workflows/docs.yml"
12+
workflow_dispatch:
13+
14+
# Allow the workflow to publish to GitHub Pages.
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# One Pages deployment at a time; let an in-progress one finish.
21+
concurrency:
22+
group: pages
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v5
33+
with:
34+
enable-cache: true
35+
36+
- name: Install dependencies
37+
run: uv sync
38+
39+
# `poe build` regenerates the Ingredients catalogue from data/ then runs
40+
# `zensical build` into ./site.
41+
- name: Build site
42+
run: uv run poe build
43+
44+
- uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: site
47+
48+
deploy:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
steps:
55+
- id: deployment
56+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# Files generated by build
22
/site
3+
.cache/
4+
5+
# Python / uv
6+
.venv/
7+
__pycache__/
8+
9+
# Editor / OS
310
*.vscode
411
*.DS_Store

README.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
<p align="center">
2-
<img src="material/assets/images/beehive_logo.png">
2+
<img src="docs/assets/logo.png" width="160">
33
</p>
44

5-
# BeeHive
5+
# BeeHive documentation
6+
7+
The documentation site for [BeeHive](https://github.com/BeeHive-org/BeeHive)
8+
a flexible open electronics platform for building research equipment and
9+
teaching electronics.
10+
11+
Built with [Zensical](https://zensical.org/) and managed with
12+
[uv](https://docs.astral.sh/uv/).
13+
14+
## Develop
15+
16+
```bash
17+
uv sync # install dependencies
18+
uv run poe serve # live-reload preview at http://127.0.0.1:8000
19+
uv run poe build # build the static site into ./site
20+
uv run poe gen # regenerate the Ingredients catalogue from docs/data/ingredients/
21+
uv run poe sync # refresh the vendored board BOMs from the BeeHive repo
22+
```
23+
24+
`serve` and `build` run `gen` first, so the auto-generated
25+
[Ingredients catalogue](docs/ingredients/index.md) always mirrors the YAML in
26+
[`docs/data/ingredients/`](docs/data/ingredients/).
27+
28+
Board bills-of-materials are pulled from the BeeHive hardware repo's
29+
`kitspace.yaml` and **vendored** into [`docs/data/kitspace/`](docs/data/kitspace/)
30+
so builds stay offline. Run `uv run poe sync` occasionally (and commit the
31+
result) to refresh them; `gen` reads the vendored copy and never needs the
32+
network.
33+
34+
## Structure
35+
36+
Everything the site needs lives under `docs/`, so it can be dropped into another
37+
repository as a self-contained folder:
38+
39+
- `docs/` — the Markdown pages (`ingredients/*.md` is **generated** — don't edit
40+
by hand).
41+
- `docs/data/ingredients/` — the board catalogue, single source of truth (YAML).
42+
- `docs/data/kitspace/` — vendored board BOMs (from `uv run poe sync`).
43+
- `docs/scripts/build_ingredients.py` — generates the Ingredients pages.
44+
- `docs/scripts/sync_kitspace.py` — refreshes the vendored BOMs.
45+
- `zensical.toml` — site config, theme, and navigation.
46+
- `docs/stylesheets/extra.css` — the "bumblebee" pixi.sh-style layout.
47+
48+
See [Contributing](docs/contributing.md) for how to add boards and recipes.

docs/ai-use-policy.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: AI use policy
3+
description: How to use AI tools when contributing to BeeHive — you are accountable for what you submit.
4+
---
5+
6+
# AI use policy
7+
8+
BeeHive welcomes contributions made with the help of AI tools — but **you are
9+
responsible for everything you submit**. This page sets out how to use them well.
10+
11+
## The core principle
12+
13+
We are humans who enjoy working with other humans. Use whatever tools help you,
14+
but you are ultimately accountable for the boards, code, and documentation you
15+
contribute. If you would not be comfortable explaining a change and standing
16+
behind it, it is not ready to submit.
17+
18+
## Please don't
19+
20+
- Let an AI agent open pull requests on your behalf.
21+
- Submit a board design, recipe, code, or docs change you have not personally
22+
understood and tested.
23+
- Let a chatbot carry on a conversation (an issue thread, a PR review) for you.
24+
25+
Pull requests that appear to ignore these guidelines may be closed without
26+
review — checking un-vetted machine output costs maintainers more time than it
27+
saves.
28+
29+
## Using AI to build and code
30+
31+
- **Get familiar with what you are changing first.** Understanding the board,
32+
the [design rules](introduction/design-rules.md), or the code you are touching
33+
lets you write better prompts *and* judge whether the output is right.
34+
- **Don't trust an assistant's claims about how BeeHive works.** LLMs are often
35+
confidently wrong, even about things the docs answer directly. Check against
36+
the design rules, the board's schematics, or a real device.
37+
- **Test on hardware.** A recipe or snippet that looks plausible is not a
38+
contribution until it actually runs on the boards it claims to.
39+
- **Keep pull requests small and focused,** even if a tool generated everything
40+
in one go. One board, one recipe, or one fix per PR is far easier to review.
41+
- **Edit AI-written comments and prose.** Prefer clarity and brevity over
42+
exhaustive, generic text; delete comments that just restate the code.
43+
44+
## Using AI to communicate
45+
46+
- **Say why, not what.** A PR description that merely restates the diff adds
47+
nothing — explain your reasoning and what you tested.
48+
- **Fill in the templates yourself.** Issue and PR templates exist to save
49+
everyone time; complete them rather than having a tool do it.
50+
- **Verify anything you post.** Don't paste unchecked AI output into an issue or
51+
a pull request.
52+
- **Link, don't quote.** Pointing to the primary source — a datasheet, the docs,
53+
a repo file — beats quoting an LLM. If you must quote one, put it in a
54+
`>` blockquote so it is clearly machine output, not your own words.
55+
- **Clarity over polish.** A clear, slightly imperfect message beats a
56+
perfectly-worded one that hides the point.
57+
58+
## Attribution
59+
60+
This policy is adapted from the
61+
[napari AI use policy](https://napari.org/dev/developers/contributing/ai.html),
62+
which was itself adapted from Zulip's AI usage guidelines.

docs/assembly-guide.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/assets/apple-touch-icon.png

26.1 KB
Loading

docs/assets/favicon.png

43.7 KB
Loading

docs/assets/logo.png

112 KB
Loading

docs/contributing.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Contributing
3+
description: How to contribute boards, recipes, and fixes to BeeHive.
4+
---
5+
6+
# Contributing
7+
8+
BeeHive is open source and community-driven. Contributions aren't confined to
9+
one institution — anyone can add a board, share a recipe, or improve the docs.
10+
11+
!!! note "Using AI tools?"
12+
That's fine — but you're accountable for what you submit. Please read the
13+
[AI use policy](ai-use-policy.md) first.
14+
15+
## Ways to contribute
16+
17+
- 🧩 **A new board (ingredient).** Design a daughter board that follows the
18+
[design rules](introduction/design-rules.md) and share it. See
19+
[Build your own board](techniques/build-your-own-board.md).
20+
- 🍯 **A new recipe.** Built an instrument with BeeHive? Document it as a recipe
21+
so others can reproduce it — especially outside neuroscience.
22+
- 🐛 **Fixes & improvements.** Corrections to boards, code, or these docs are all
23+
welcome.
24+
25+
## Adding a board to the catalogue
26+
27+
The [Ingredients catalogue](ingredients/index.md) is generated from YAML — you
28+
don't edit the page directly:
29+
30+
1. Add an entry to `docs/data/ingredients/boards.yaml` (or drop in a new
31+
`docs/data/ingredients/<board>.yaml`).
32+
2. Run `uv run poe gen` to regenerate the catalogue.
33+
3. Preview with `uv run poe serve`.
34+
35+
See the comments at the top of `boards.yaml` for the field reference. If the
36+
board has a project in the [BeeHive repo's](https://github.com/BeeHive-org/BeeHive)
37+
`kitspace.yaml`, add its `kitspace:` key too — `uv run poe sync` then vendors the
38+
board's bill of materials and fabrication-file links into the catalogue.
39+
40+
## Editing the docs
41+
42+
The docs are a [Zensical](https://zensical.org/) site managed with
43+
[uv](https://docs.astral.sh/uv/):
44+
45+
```bash
46+
uv sync # install dependencies
47+
uv run poe serve # live-reload preview at http://127.0.0.1:8000
48+
uv run poe build # build the static site into ./site
49+
```
50+
51+
`serve` and `build` regenerate the Ingredients catalogue first, so it always
52+
matches the YAML.
53+
54+
## Get in touch
55+
56+
- Issues & discussion:
57+
[github.com/BeeHive-org/BeeHive/issues](https://github.com/BeeHive-org/BeeHive/issues)
58+
- Email: [a.maia-chagas@sussex.ac.uk](mailto:a.maia-chagas@sussex.ac.uk)
59+
60+
If in doubt — reach out. We're glad to help.

0 commit comments

Comments
 (0)