|
| 1 | +# Contributing to the OpenLambda Site |
| 2 | + |
| 3 | +This site is a [Jupyter Book](https://jupyterbook.org) (v1, Sphinx-based) written in |
| 4 | +[MyST Markdown](https://myst-parser.readthedocs.io/). Pushing to `master` triggers the |
| 5 | +GitHub Actions workflow in [`.github/workflows/deploy.yml`](.github/workflows/deploy.yml), |
| 6 | +which builds the book and deploys it to GitHub Pages. |
| 7 | + |
| 8 | +## Local preview |
| 9 | + |
| 10 | +```bash |
| 11 | +python3 -m venv .venv && source .venv/bin/activate |
| 12 | +pip install -r requirements.txt |
| 13 | +jupyter-book build . |
| 14 | +open _build/html/index.html |
| 15 | +``` |
| 16 | + |
| 17 | +```{note} |
| 18 | +Keep dependencies pinned to the Jupyter Book **v1** stack in `requirements.txt`. Do **not** |
| 19 | +bump `jupyter-book` to 2.x — v2 is a MyST-CLI rewrite that is incompatible with this repo's |
| 20 | +`_config.yml` / `_toc.yml` and `sphinx_book_theme` setup. |
| 21 | +``` |
| 22 | + |
| 23 | +## Adding a page |
| 24 | + |
| 25 | +1. Create a Markdown file (e.g. `applications/my-app.md`). |
| 26 | +2. Register it in [`_toc.yml`](_toc.yml) so it appears in the navigation. |
| 27 | +3. Add SEO metadata at the top of the file: |
| 28 | + |
| 29 | + ```yaml |
| 30 | + --- |
| 31 | + myst: |
| 32 | + html_meta: |
| 33 | + description: "One-sentence summary used as the meta description." |
| 34 | + keywords: "OpenLambda, serverless, ..." |
| 35 | + --- |
| 36 | + ``` |
| 37 | + |
| 38 | +## Adding a blog post |
| 39 | + |
| 40 | +1. Create a file under `blog/post/` named `YYYY-MM-DD-short-slug.md`. The date prefix is the |
| 41 | + convention used for ordering — it does not need to match the `date:` field exactly, but |
| 42 | + keep them consistent. |
| 43 | +2. Use this front matter (do **not** add blog posts to `_toc.yml` — ABlog collects them |
| 44 | + automatically from the `blog/post/` directory): |
| 45 | + |
| 46 | + ```yaml |
| 47 | + --- |
| 48 | + blogpost: true |
| 49 | + date: 2026-05-18 |
| 50 | + author: jane-doe, john-smith |
| 51 | + category: Case Studies # e.g. Releases, Case Studies |
| 52 | + tags: openlambda, serverless # comma-separated |
| 53 | + language: en |
| 54 | + myst: |
| 55 | + html_meta: |
| 56 | + description: "One-sentence summary for search engines and link previews." |
| 57 | + keywords: "OpenLambda, ..." |
| 58 | + --- |
| 59 | + |
| 60 | + # Post Title |
| 61 | + ``` |
| 62 | + |
| 63 | +3. The first `# Heading` is the post title; the first paragraph(s) become the excerpt shown |
| 64 | + on the blog index. |
| 65 | + |
| 66 | +## Registering an author |
| 67 | + |
| 68 | +`author:` values are slugs. Map each slug to a display name and profile URL under |
| 69 | +`blog_authors` in [`_config.yml`](_config.yml) so posts render a friendly name and link: |
| 70 | + |
| 71 | +```yaml |
| 72 | +blog_authors: |
| 73 | + jane-doe: |
| 74 | + - "Jane Doe" |
| 75 | + - "https://example.edu/jane" |
| 76 | +``` |
| 77 | +
|
| 78 | +An unregistered slug still works, but renders as the raw slug with no link. |
| 79 | +
|
| 80 | +## Before opening a PR |
| 81 | +
|
| 82 | +- Run `jupyter-book build .` locally and confirm it ends with `build succeeded` and no |
| 83 | + warnings. |
| 84 | +- Check that internal links resolve and external links are correct. |
0 commit comments