Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UG -> Getting Started: Make it more user-friendly by adding Node.js/npm instructions #2589

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions docs/userGuide/gettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,30 @@
%%{{ icon_ticked }}%% [Node.js](https://nodejs.org) {{ node_version }} or higher installed
</div>

++**Installing Node.js and npm**++

<box type="info" light>
If you already have Node.js ({{ node_version }} or higher) and npm installed, you can skip this section.
</box>

Visit the [Node.js download page](https://nodejs.org/en/download).

- **Windows/macOS can download a prebuilt installer**
- This automatically sets up npm.
- **Command Line Option (any OS)**
1. Select your **OS** and architecture from the dropdowns on the same page.
2. Make sure to choose **“with npm”**.
3. Run the provided commands in your terminal to install Node.js and npm.

After installation, in your terminal run:
```
node -v
npm -v
```
The versions should match or exceed the requirements mentioned in the Prerequisites.

---

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this section is applicable to only some readers, perhaps put it inside a collapsed panel or a modal?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! @gerteck also suggested the use of an expandable panel so I'll implement it that way

There are a few ways to install MarkBind, select one that is most suitable for your use case. If you are unsure, we recommend using the first method.

## Method 1: Install MarkBind globally with npm
Expand Down Expand Up @@ -55,11 +79,12 @@ Usage: ...
<tabs>
<tab header="Initializing a new project">

Navigate into an empty directory and run the following command to initialize a skeletal MarkBind site in that directory. It will create several new files in the directory e.g., `index.md`, `site.json`.
Navigate into an empty directory and run:

```
markbind init
```
This command creates a skeletal MarkBind site in that directory, with files like `index.md` and `site.json`.

<include src="tip.md" boilerplate >
<span id="tip_body">
Expand Down Expand Up @@ -108,7 +133,7 @@ To stop the web server, go to the console running the `serve` command and press

++**5. Updating your MarkBind version**++

After you have installed MarkBind, you may want to update to the latest version of MarkBind in the future.
After you have installed MarkBind, you can update to the latest version by running:

```
npm install -g markbind-cli@latest
Expand Down