Skip to content

Commit 4c90193

Browse files
committed
Update build instructions from feedback
1 parent a0555c4 commit 4c90193

File tree

2 files changed

+46
-11
lines changed

2 files changed

+46
-11
lines changed

.github/images/netlify-preview.png

63.8 KB
Loading

README.md

+46-11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This is the source to [Jupyter.org](https://jupyter.org/).
66

77
The site is built with Jekyll, see [the Jekyll website](https://jekyllrb.com/) for how to customize the build process.
88

9+
There are a few ways to build the site locally, see the sections below.
10+
11+
### Build the site automatically with `nox`
12+
913
The easiest way to build the site locally is by using the [`nox` command line tool](https://nox.thea.codes/). This tool makes it easy to automate commands in a repository, and we have included a `build` command to quickly install the dependencies and build the site.
1014

1115
To build and preview the site locally, follow these steps:
@@ -38,13 +42,53 @@ To stop serving the website, press **`Ctrl`**-`C` in your terminal
3842

3943
### Build the site manually
4044

41-
To build the site manually, check out the installation commands that are in `noxfile.py`. These use `nox` syntax, but they should give you a clear idea of which packages must be installed in order to build the documentation.
45+
To build the site manually, you'll need Ruby, Jekyll, and the packages that Jekyll uses to build the site (these are defined in [`Gemfile`](Gemfile)).
46+
47+
Follow these steps:
48+
49+
1. **Install Jekyll**. You have two options:
50+
- [Follow the Jekyll installation instructions](https://jekyllrb.com/docs/#instructions). These steps will guide you through installing Ruby and Jekyll locally.
51+
- Use [the anaconda distribution](https://conda.io) and [conda-forge](https://conda-forge.org/).
52+
53+
First [install miniconda](https://conda.io/miniconda.html), then run the following command:
54+
55+
```console
56+
$ conda install -c conda-forge ruby c-compiler compilers cxx-compiler
57+
```
58+
59+
Finally install Jekyll and Bundler, which will let you install the site's dependencies:
60+
61+
```console
62+
$ gem install jekyll bundler
63+
```
64+
2. **Install the site's build dependencies**. These are specified in [`Gemfile`](Gemfile).
65+
66+
```console
67+
$ bundle install
68+
```
69+
70+
This step might take a few moments as it must download and install a number of local extensions. It will create a local file called `Gemfile.lock`. These are the "frozen" dependencies and their version numbers needed to build the site.
71+
72+
3. **Build the site locally**.
73+
74+
```console
75+
$ bundle exec jekyll serve liveserve
76+
```
77+
78+
This will build the site's HTML and open a server at `localhost:4000` for you to preview the site.
79+
4280

4381
## Where the site is hosted
4482

4583
The site is automatically built with [Netlify](https://netlify.com), a hosting service for static websites. When any changes are merged into the `master` branch, Netlify will automatically build them and update the website at [jupyter.org](https://jupyter.org).
4684

47-
**You can preview changes in Pull Requests**. Netlify will automatically build a preview of the website in an open Pull Request. To see this, click on the **`Show all checks`** button just above the comment box in the Pull Request window. Then click on **`deploy/netlify`** to see a preview of the built site.
85+
## Preview changes in a Pull Request
86+
87+
Netlify will automatically build a preview of the website in an open Pull Request. To see this, click on the **`Show all checks`** button just above the comment box in the Pull Request window. Then click on the **`details`** link on the **`deploy/netlify`** row to see a preview of the built site.
88+
89+
Here's an image of this box on a GitHub PR page:
90+
91+
![Netlify Preview Button](.github/images/netlify-preview.png)
4892

4993
## Structure of this website
5094

@@ -94,12 +138,3 @@ write some html here (consider you are already inside `<body></body>`)
94138
You cannot do it yet with .md file, but you will be able soon.
95139

96140
Add commit (and don't forget to add to `_data/nav.yml`).
97-
98-
## Preview a Pull Request
99-
100-
Netlify is used to provide a link to a rendered website with the changes proposed
101-
in a PR. This convenience helps reviewers see how the change would look
102-
before it is deployed in production.
103-
104-
The link is found in the GitHub PR status box. In the **deploy/netlify** section,
105-
click on the `Details` link.

0 commit comments

Comments
 (0)