Skip to content

Commit 214c438

Browse files
committed
Update README.md
1 parent c8e2b8d commit 214c438

File tree

1 file changed

+58
-14
lines changed

1 file changed

+58
-14
lines changed

README.md

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,79 @@
11
mruby.org
22
=========
33

4-
This is the [Jekyll](https://jekyllrb.com/) source of
5-
the [mruby.org](https://mruby.org/) website.
4+
This is the [Jekyll](https://jekyllrb.com/) source of the [mruby.org](https://mruby.org/) website.
65

7-
## Preview
6+
## Prerequisites
87

9-
The following will give you a preview of the site.
8+
- **Ruby** — version is specified in `.ruby-version`
9+
- **Bundler**`gem install bundler`
10+
- **`gh` CLI** — required by `gen:mrbdoc` and `gen:releasedata` to query the GitHub API
1011

11-
Install bundler:
12+
## Local development
1213

1314
```shell
14-
gem install bundler
15+
git clone https://github.com/mruby/mruby.github.io
16+
cd mruby.github.io
17+
bundle install
1518
```
1619

17-
Clone the repository:
20+
Serve the site locally with live reload:
1821

1922
```shell
20-
git clone https://github.com/mruby/mruby.github.io
23+
bundle exec rake serve
24+
# or use the convenience script:
25+
./server
2126
```
2227

23-
Install Jekyll and its dependencies:
28+
## Build
29+
30+
Runs all data generation tasks then builds the Jekyll site:
2431

2532
```shell
26-
cd mruby.github.io
27-
bundle install
33+
bundle exec rake build
2834
```
2935

30-
Preview the site:
36+
## Data generation tasks
37+
38+
Each task can also be run individually:
39+
40+
### `rake gen:mgemdata`
41+
42+
Regenerates `_data/mgems.yml` from the mrbgems registry. Do not edit this file manually.
43+
44+
```shell
45+
bundle exec rake gen:mgemdata
46+
```
47+
48+
### `rake gen:mrbdoc`
49+
50+
Clones the latest stable mruby release into `mruby/`, generates YARD API documentation, and copies it to `docs/api/`. Requires the `gh` CLI.
3151

3252
```shell
33-
bundle exec jekyll serve
34-
open "http://localhost:4000"
53+
bundle exec rake gen:mrbdoc
3554
```
55+
56+
### `rake gen:contributors`
57+
58+
Generates `_data/contributors.yml` from the mruby `AUTHORS` file. Requires `mruby/` to exist (run `gen:mrbdoc` first). The `CONTRIBUTOR_THRESHOLD` environment variable sets the minimum commit count (default: 10).
59+
60+
```shell
61+
bundle exec rake gen:contributors
62+
CONTRIBUTOR_THRESHOLD=20 bundle exec rake gen:contributors
63+
```
64+
65+
### `rake gen:releasedata`
66+
67+
Generates `_data/releases.yml` from the GitHub API. Requires the `gh` CLI.
68+
69+
```shell
70+
bundle exec rake gen:releasedata
71+
```
72+
73+
## Deployment
74+
75+
GitHub Actions (`.github/workflows/pages.yml`) triggers on push to `master`. It runs `bundle exec rake build` (with `GH_TOKEN` set for the `gh` CLI calls) and deploys the result to GitHub Pages via `actions/deploy-pages`.
76+
77+
## CI
78+
79+
The lint workflow (`.github/workflows/lint.yml`) runs on all pull requests and checks for spelling errors (`misspell`) and merge conflict markers.

0 commit comments

Comments
 (0)