Skip to content

Commit 2c9ab73

Browse files
committed
fix: updated install command
updated the install command, added an info box, and corrected a typo.
1 parent c3c55ee commit 2c9ab73

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

docs/src/getting-started/quick-starts/hw-code.md

+28-22
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Hello World (Code)
22

3-
This guide walks you through the a quick way to get a static HTML, CSS and JavaScript webpage on to the permaweb using a few lines of code and a [command-line interface (CLI)](./hw-cli.md).
3+
This guide walks you through a quick way to get a static HTML, CSS and JavaScript webpage on to the permaweb using a few lines of code and a [command-line interface (CLI)](./hw-cli.md).
44

55
## Requirements
66

7-
- [NodeJS](https://nodejs.org) LTS or greater
8-
- Basic knowledge of HTML, CSS and JavaScript
9-
- A text editor (VS Code, Sublime, or similar)
7+
- [NodeJS](https://nodejs.org) LTS or greater
8+
- Basic knowledge of HTML, CSS and JavaScript
9+
- A text editor (VS Code, Sublime, or similar)
1010

1111
## Description
1212

@@ -17,7 +17,7 @@ Using a terminal/console window create a new folder called `hello-world`.
1717
```sh
1818
cd hello-world
1919
npm init -y
20-
npm install arweave @irys/sdk
20+
npm i -g @irys/sdk
2121
mkdir src && cd src
2222
touch index.js index.html style.css
2323
```
@@ -30,6 +30,10 @@ Next open your text editor and import the `hello-world` directory.
3030
node -e "require('arweave').init({}).wallets.generate().then(JSON.stringify).then(console.log.bind(console))" > wallet.json
3131
```
3232

33+
:::info
34+
The wallet.json file must be in the root of the `hello-world` folder and not inside of your `src` folder.
35+
:::
36+
3337
## Create a webpage
3438

3539
This webpage is using basic HTML, CSS and JavaScript to create a styled button that when you click it the header text changes color. Once finished, we will be using Irys and our previously generated wallet to deploy a fully functioning, static and permanent webpage to Arweave.
@@ -44,19 +48,19 @@ Paste the code from the following code blocks into their files:
4448
```html
4549
<!DOCTYPE html>
4650
<html lang="en">
47-
<head>
48-
<meta charset="UTF-8" />
49-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
50-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
51-
<link rel="stylesheet" type="text/css" href="style.css" />
52-
<script src="index.js"></script>
53-
<title>Cookbook Hello World!</title>
54-
</head>
55-
56-
<body>
57-
<button onclick="changeColor()" class="button">Click Me!</button>
58-
<h1 id="main">Hello World!</h1>
59-
</body>
51+
<head>
52+
<meta charset="UTF-8" />
53+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
54+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
55+
<link rel="stylesheet" type="text/css" href="style.css" />
56+
<script src="index.js"></script>
57+
<title>Cookbook Hello World!</title>
58+
</head>
59+
60+
<body>
61+
<button onclick="changeColor()" class="button">Click Me!</button>
62+
<h1 id="main">Hello World!</h1>
63+
</body>
6064
</html>
6165
```
6266

@@ -70,8 +74,8 @@ Paste the code from the following code blocks into their files:
7074

7175
```css
7276
.button {
73-
padding: "10px";
74-
background-color: #4caf50;
77+
padding: "10px";
78+
background-color: #4caf50;
7579
}
7680
```
7781

@@ -85,8 +89,10 @@ Paste the code from the following code blocks into their files:
8589

8690
```javascript
8791
function changeColor() {
88-
const header = document.getElementById("main");
89-
header.style.color === "" ? (header.style.color = "red") : (header.style.color = "");
92+
const header = document.getElementById("main");
93+
header.style.color === ""
94+
? (header.style.color = "red")
95+
: (header.style.color = "");
9096
}
9197
```
9298

0 commit comments

Comments
 (0)