Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
13 changes: 12 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,23 @@ for prior user-research context on content organisation.

## Building locally

This repository requires the Node.js version specified in the
[`.nvmrc` file](.nvmrc). Install the dependencies and generate the static site:

```bash
npm install
npm run build
# Output is written to out/
```

The output is written to `out/`. Start a local server from a separate terminal:

```bash
npx serve out
```

Open <http://localhost:3000/learn> to preview the site. Run `npm run build`
again after making changes to update the generated output.

## Code of Conduct

This project follows the
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ The structure is based on
[Card Sort research](https://github.com/nodejs/nodejs.org/issues/8234)
conducted at the 2025 Cambridge Node.js Collaborators' Summit.

## Development

```bash
npm install
npm run build # generates static site + Orama search DB in out/
```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).
8 changes: 6 additions & 2 deletions doc-kit.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ import web from '@node-core/doc-kit/src/generators/web/index.mjs';
import { join } from 'node:path';

const origin =
process.env.VERCEL_ENV === 'preview' ? process.env.VERCEL_URL : 'nodejs.org';
process.env.VERCEL_ENV === 'preview'
? `https://${process.env.VERCEL_URL}`
: process.env.VERCEL_ENV === 'production'
? 'https://nodejs.org'
: 'http://localhost:3000';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Port 3000 can be taken... The thing is that this is defined at build-time... So nothing that can really be done, although it'd be cool if this port could be overridden. Although I doubt that many people will run this locally in a way that this could be a problem.


/** @type {import('@node-core/doc-kit/src/utils/configuration/types.d.ts').Configuration} */
export default {
global: {
output: 'out/learn',
input: ['pages/**/*.md'],
baseURL: `https://${origin}/learn`,
baseURL: `${origin}/learn`,
},
'jsx-ast': {
generateIndexPage: false,
Expand Down