Skip to content

Commit 7d75b4d

Browse files
committed
Update installation.md
1 parent 0fa05be commit 7d75b4d

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

src/installation.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ layout: "md.jlmd"
77

88
$(
99
begin
10+
# these special elements will automatically update to read the latest Julia version. See the JavaScript snippet at the bottom of this page to see how it works!
11+
1012
version = html"<auto-julia-version>1.7.2</auto-julia-version>"
1113
pkg_version = html"<auto-julia-version short>1.7</auto-julia-version>"
1214

@@ -18,7 +20,7 @@ $(
1820

1921
**Video version:**
2022

21-
<iframe style="width: 100%; height: 40vw;" src="https://www.youtube.com/embed/OOjKEgbt8AI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
23+
<iframe style="width: 100%; aspect-ratio: 16/9;" src="https://www.youtube.com/embed/OOjKEgbt8AI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2224

2325
\\
2426
\\
@@ -39,27 +41,28 @@ After installing, **make sure that you can run Julia**. On some systems, this me
3941

4042
## Step 3: Install [`Pluto`](https://github.com/fonsp/Pluto.jl)
4143

42-
Next we will install the [**Pluto notebook**](https://github.com/fonsp/Pluto.jl/blob/master/README.md) that we will be using during the course. Pluto is a Julia _programming environment_ designed for interactivity and quick experiments.
44+
Next we will install the [**Pluto**](https://github.com/fonsp/Pluto.jl), the notebook environment that we will be using during the course. Pluto is a Julia _programming environment_ designed for interactivity and quick experiments.
4345

4446
Open the **Julia REPL**. This is the command-line interface to Julia, similar to the previous screenshot.
4547

4648
Here you type _Julia commands_, and when you press ENTER, it runs, and you see the result.
4749

4850
To install Pluto, we want to run a _package manager command_. To switch from _Julia_ mode to _Pkg_ mode, type `]` (closing square bracket) at the `julia>` prompt:
49-
```julia
51+
52+
<pre><code>
5053
julia> ]
5154

52-
(@v1.x) pkg>
53-
```
55+
(&#64;v$(pkg_version)) pkg>
56+
</code></pre>
5457

5558
The line turns blue and the prompt changes to `pkg>`, telling you that you are now in _package manager mode_. This mode allows you to do operations on **packages** (also called libraries).
5659

5760
To install Pluto, run the following (case sensitive) command to *add* (install) the package to your system by downloading it from the internet.
5861
You should only need to do this *once* for each installation of Julia:
5962

60-
```julia
61-
(@v1.x) pkg> add Pluto
62-
```
63+
<pre><code>
64+
(&#64;v$(pkg_version)) pkg> add Pluto
65+
</code></pre>
6366

6467
This might take a couple of minutes, so you can go get yourself a cup of tea!
6568

@@ -87,9 +90,9 @@ julia> Pluto.run()
8790

8891
The terminal tells us to go to `http://localhost:1234/` (or a similar URL). Let's open Firefox or Chrome and type that into the address bar.
8992

90-
![image](https://user-images.githubusercontent.com/6933510/91441391-6a8f9f80-e870-11ea-94d0-4ef91b4e2242.png)
93+
![image](https://user-images.githubusercontent.com/6933510/199279574-4b1d0494-2783-49a0-acca-7b6284bede44.png)
9194

92-
> If you're curious about what a _Pluto notebook_ looks like, have a look at the **sample notebooks**. Samples 1, 2 and 6 may be useful for learning some basics of Julia programming.
95+
> If you're curious about what a _Pluto notebook_ looks like, have a look at the **Featured Notebooks**. These notebooks are useful for learning some basics of Julia programming.
9396
>
9497
> If you want to hear the story behind Pluto, have a look a the [JuliaCon presentation](https://www.youtube.com/watch?v=IAF8DjrQSSk).
9598
@@ -117,11 +120,11 @@ Next, we need to know the _absolute path_ of that folder. Here's how you do that
117120

118121
For example, you might have:
119122

120-
- `C:\\Users\\fonsi\\Documents\\18S191_assignments\\` on Windows
123+
- `C:\\Users\\fons\\Documents\\18S191_assignments\\` on Windows
121124

122-
- `/Users/fonsi/Documents/18S191_assignments/` on MacOS
125+
- `/Users/fons/Documents/18S191_assignments/` on MacOS
123126

124-
- `/home/fonsi/Documents/18S191_assignments/` on Ubuntu
127+
- `/home/fons/Documents/18S191_assignments/` on Ubuntu
125128

126129
Now that we know the absolute path, go back to your Pluto notebook, and at the top of the page, click on _"Save notebook..."_.
127130

@@ -138,7 +141,7 @@ Click _Choose_.
138141
After working on your notebook (your code is autosaved when you run it), you will find your notebook file in the folder we created in step 3. This the file that you can share with others, or submit as your homework assignment to Canvas.
139142

140143

141-
<script>
144+
<script defer>
142145
const run = f => f();
143146
run(async () => {
144147
const versions = await (await fetch(`https://julialang-s3.julialang.org/bin/versions.json`)).json()
@@ -147,7 +150,8 @@ const stable = version_names.find(v => versions[v].stable)
147150
console.log({stable})
148151
const pkg_stable = /\\d+\\.\\d+/.exec(stable)[0]
149152
document.querySelectorAll("auto-julia-version").forEach(el => {
150-
el.innerText = el.getAttribute("short") == null ? stable : pkg_stable
153+
console.log(el)
154+
el.innerText = el.getAttribute("short") == null ? stable : pkg_stable
151155
})
152156
});
153157
</script>

0 commit comments

Comments
 (0)