|
1 |
| -# marimo WebAssembly + GitHub Pages Template |
| 1 | +# marimo WebAssembly apps and notebooks |
2 | 2 |
|
3 |
| -This template repository demonstrates how to export [marimo](https://marimo.io) notebooks to WebAssembly and deploy them to GitHub Pages. |
| 3 | +marimo apps of the ECLIPSE group |
4 | 4 |
|
5 |
| -## 📚 Included Examples |
6 |
| - |
7 |
| -- `apps/charts.py`: Interactive data visualization with Altair |
8 |
| -- `notebooks/fibonacci.py`: Interactive Fibonacci sequence calculator |
9 |
| -- `notebooks/penguins.py`: Interactive data analysis with Polars and marimo |
10 |
| - |
11 |
| -## 🚀 Usage |
12 |
| - |
13 |
| -1. Fork this repository |
14 |
| -2. Add your marimo files to the `notebooks/` or `apps/` directory |
15 |
| - 1. `notebooks/` notebooks are exported with `--mode edit` |
16 |
| - 2. `apps/` notebooks are exported with `--mode run` |
17 |
| -3. Push to main branch |
18 |
| -4. Go to repository **Settings > Pages** and change the "Source" dropdown to "GitHub Actions" |
19 |
| -5. GitHub Actions will automatically build and deploy to Pages |
20 |
| - |
21 |
| -## Including data or assets |
22 |
| - |
23 |
| -To include data or assets in your notebooks, add them to the `public/` directory. |
24 |
| - |
25 |
| -For example, the `apps/charts.py` notebook loads an image asset from the `public/` directory. |
26 |
| - |
27 |
| -```markdown |
28 |
| -<img src="public/logo.png" width="200" /> |
29 |
| -``` |
30 |
| - |
31 |
| -And the `notebooks/penguins.py` notebook loads a CSV dataset from the `public/` directory. |
32 |
| - |
33 |
| -```python |
34 |
| -import polars as pl |
35 |
| -df = pl.read_csv(mo.notebook_location() / "public" / "penguins.csv") |
36 |
| -``` |
37 |
| - |
38 |
| -## 🧪 Testing |
39 |
| - |
40 |
| -To test the export process, run `scripts/build.py` from the root directory. |
41 |
| - |
42 |
| -```bash |
43 |
| -python scripts/build.py |
44 |
| -``` |
45 |
| - |
46 |
| -This will export all notebooks in a folder called `_site/` in the root directory. Then to serve the site, run: |
47 |
| - |
48 |
| -```bash |
49 |
| -python -m http.server -d _site |
50 |
| -``` |
51 |
| - |
52 |
| -This will serve the site at `http://localhost:8000`. |
0 commit comments