-
-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds JavaScript runtime docs, clarity on 11ty/eleventy#3577 and 11ty/…
- Loading branch information
Showing
5 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
---js | ||
// <script> | ||
const eleventyNavigation = { | ||
parent: "Getting Started", | ||
key: "Installing a JavaScript Runtime (like Node.js)", | ||
title: "Installing JavaScript", | ||
order: 0, | ||
}; | ||
|
||
const excludeFromSidebar = true; | ||
--- | ||
<h1>Installing a JavaScript Runtime</h1> | ||
|
||
<p>To run Eleventy on your machine, you need at least one JavaScript Runtime (a program to run JavaScript code) installed on your computer. The most common of these is <a href="https://nodejs.org/">Node.js</a>.</p> | ||
|
||
<h2>Node.js</h2> | ||
|
||
<p>You can check whether or not you have Node installed by running <code>node --version</code> in a terminal application. (<a href="/docs/terminal-window/"><em>Well, wait—what is a Terminal?</em></a>)</p> | ||
|
||
<p>If the command is not found or it reports a number lower than <node-minimum></node-minimum>, you will need to head over to <a href="https://nodejs.org/en"><code>nodejs.org</code></a> to download and install <strong>Node.js version <node-minimum></node-minimum></strong> or higher (required by Eleventy <eleventy-version></eleventy-version>).</p> | ||
|
||
<p>For more advanced use cases (e.g. having multiple versions of Node.js installed simultaneously) on your computer, it’s common to use a tool called <a href="https://github.com/nvm-sh/nvm"><code>nvm</code></a>. Platform-specific installation instructions for <code>nvm</code> are available at: <a href="https://nodejs.org/en/download"><code>nodejs.org/en/download</code></a>.</p> | ||
|
||
<h3>Odd Versions of Node.js</h3> | ||
|
||
<p>It is not recommended (or supported by the Eleventy project) to use an odd major version of Node.js (e.g. Node 19), per guidance on the <a href="https://nodejs.org/en/about/previous-releases">Node.js Releases documentation</a>. Our experience has found that major versions are more reliable and we encourage folks to stick with even major version numbers of Node.js whenever possible!</p> | ||
|
||
<h2>Deno</h2> | ||
|
||
<p>You can use <a href="https://deno.com/">Deno</a> with Eleventy, too. Only the latest major version of Deno is supported by Eleventy. You can check if Deno is installed on your machine by running <code>deno --version</code>.</p> | ||
|
||
<p>Rather than using <code>npx</code>, you’ll run Eleventy like this:</p> | ||
|
||
<syntax-highlight language="shell"> | ||
deno --allow-all npm:@11ty/eleventy | ||
deno --allow-all npm:@11ty/eleventy --serve | ||
</syntax-highlight> | ||
|
||
<p>Read about our plans to <a href="https://github.com/11ty/eleventy/issues/3278">move away from <code>--allow-all</code> on #3278</a>.</p> |