Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landing page for the repo #67

Merged
merged 14 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy to GitHub Pages

on:
push:
branches: ['main']
workflow_dispatch:

concurrency:
group: 'pages'
cancel-in-progress: false

env:
UV_SYSTEM_PYTHON: 1

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: 🚀 Install uv
uses: astral-sh/setup-uv@v4

- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: 📦 Install dependencies
run: |
uv pip install marimo

- name: 🛠️ Export notebooks
run: |
python scripts/build.py

- name: 📤 Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,7 @@ cython_debug/
#.idea/

# PyPI configuration file
.pypirc
.pypirc

# Generated site content
_site/
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ Here's a contribution checklist:
If you aren't comfortable adding a new notebook or course, you can also request
what you'd like to see by [filing an issue](https://github.com/marimo-team/learn/issues/new?template=example_request.yaml).

## Building and Previewing

The site is built using a Python script that exports marimo notebooks to HTML and generates an index page.

```bash
# Build the site
python scripts/build.py --output-dir _site

# Preview the site (builds first)
python scripts/preview.py

# Preview without rebuilding
python scripts/preview.py --no-build
```

## Community

We're building a community. Come hang out with us!
Expand Down
4 changes: 2 additions & 2 deletions python/006_dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ def _():

@app.cell
def _(mo, nested_data):
mo.md(f"Alice's age: {nested_data["users"]["alice"]["age"]}")
mo.md(f"Alice's age: {nested_data['users']['alice']['age']}")
return


@app.cell
def _(mo, nested_data):
mo.md(f"Bob's interests: {nested_data["users"]["bob"]["interests"]}")
mo.md(f"Bob's interests: {nested_data['users']['bob']['interests']}")
return


Expand Down
Loading