Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 13, 2023
1 parent a4a643e commit 4dc45d0
Show file tree
Hide file tree
Showing 110 changed files with 270 additions and 330 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CI - cli
name: CI - @npm/documentation-cli

on:
workflow_dispatch:
Expand Down Expand Up @@ -87,9 +87,9 @@ jobs:
- name: Install Dependencies
run: npm i --no-audit --no-fund
- name: Lint
run: npm run lint --ignore-scripts -w cli
run: npm run lint --ignore-scripts -w @npm/documentation-cli
- name: Post Lint
run: npm run postlint --ignore-scripts -w cli
run: npm run postlint --ignore-scripts -w @npm/documentation-cli

test:
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
Expand Down Expand Up @@ -172,4 +172,4 @@ jobs:
- name: Add Problem Matcher
run: echo "::add-matcher::.github/matchers/tap.json"
- name: Test
run: npm test --ignore-scripts -w cli
run: npm test --ignore-scripts -w @npm/documentation-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CI - theme
name: CI - @npm/documentation-theme

on:
workflow_dispatch:
Expand Down Expand Up @@ -87,9 +87,9 @@ jobs:
- name: Install Dependencies
run: npm i --no-audit --no-fund
- name: Lint
run: npm run lint --ignore-scripts -w theme
run: npm run lint --ignore-scripts -w @npm/documentation-theme
- name: Post Lint
run: npm run postlint --ignore-scripts -w theme
run: npm run postlint --ignore-scripts -w @npm/documentation-theme

test:
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
Expand Down Expand Up @@ -172,4 +172,4 @@ jobs:
- name: Add Problem Matcher
run: echo "::add-matcher::.github/matchers/tap.json"
- name: Test
run: npm test --ignore-scripts -w theme
run: npm test --ignore-scripts -w @npm/documentation-theme
4 changes: 2 additions & 2 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Upstream-Name: documentation
Upstream-Contact: Myles Borins <mylesborins@github.com>
Source: https://github.com/npm/documentation

Files: content/* static/*
Files: content/* static/* src/*
Copyright: 2020 GitHub
License: CC-BY-4.0

Files: scripts/* cli/* theme/* src/* .github/* *.md *.js *.json .npmrc .gitignore .nvmrc
Files: scripts/* cli/* theme/* .github/* *.md *.js *.json .npmrc .gitignore .nvmrc
Copyright: 2020 GitHub
License: MIT
1 change: 0 additions & 1 deletion CONTENT-MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ You can use this template when starting a new article. For more information abou
---
title:
---
import shared form '../../../src/shared.js'
// Conceptual content: What feature is the article about?
// Prerequisites (if applicable): Who can use the feature?
Expand Down
16 changes: 6 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ referenced as:
There are various places where we want to share content between
pages, to prevent copy-pasta. For example, we display a screenshot
of the user login dialog repeatedly. Therefore this shared content
is defined in `src/shared.js`, and includes a literal MDX snippet.
is defined in `src/@npm/documentation-theme/shared.js`, and includes a literal MDX snippet.

For example, `user-login` is defined with `text` and `image`
properties:
Expand All @@ -88,19 +88,15 @@ m login dialog" />)
},
```

Since MDX is reactive, you can import the shared data at the top of the
file, just beneath your frontmatter:
Everything exported from `shared.js` is available in all content files under the namespace `shared`. Text content should be wrapped like this: `<>{text}</>`.

```
For example, to render the `text` from `user-login` you would do the following:

```mdx
---
title: Using shared content
---
import shared form '../../../src/shared.js'
```

And then reference the shared content within `<>`:

```
To login, <>{shared['user-login'].text}</>
```

Expand Down Expand Up @@ -147,7 +143,7 @@ The content pages should include
## Navigation

The site's navigation (on the left-hand sidebar of the site) is controlled
by `src/theme/nav.yml`. If you add or remove a page from the site, you'll
by `src/nav.yml`. If you add or remove a page from the site, you'll
also want to add or remove it from the navigation configuration.

## CLI
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "cli",
"name": "@npm/documentation-cli",
"private": true,
"repository": {
"url": "https://github.com/npm/documentation.git",
Expand Down
3 changes: 2 additions & 1 deletion content/about-npm/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: About npm
redirect_from: [ /getting-started/what-is-npm ]
redirect_from:
- /getting-started/what-is-npm
---

npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Downloading and installing Node.js and npm
redirect_from: [ /getting-started/installing-node ]
redirect_from:
- /getting-started/installing-node
---

To publish and install packages to and from the public npm registry or a private npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. **We strongly recommend using a Node version manager like [nvm](https://github.com/nvm-sh/nvm) to install Node.js and npm.** We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Configuring your local environment
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
2 changes: 1 addition & 1 deletion content/getting-started/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Getting started
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Changing your npm username
---
import shared from '../../../src/shared.js'

It is not currently possible to change your npm username. You'll need to
create a new account and migrate the data to the new account manually.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Deleting your npm user account
---
import shared from '../../../src/shared.js'

From the web, you can delete your npm user account.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Managing your npm user account
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Managing your profile settings
redirect_from:
- /getting-started/modifying_your_profile_from_command_line
---
import shared from '../../../src/shared.js'

You can manage settings for your user account profile from the web or command line.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Downgrading to a free user account plan
---
import shared from '../../../src/shared.js'

<Note>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Paying for your npm user account
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Updating user account billing settings
---
import shared from '../../../src/shared.js'

<Note>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Upgrading to a paid user account plan
---
import shared from '../../../src/shared.js'

<Note>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Viewing, downloading, and emailing receipts for your npm user account
---
import shared from '../../../src/shared.js'

<Note>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: About two-factor authentication
redirect_from: [ /getting-started/using-two-factor-authentication ]
redirect_from:
- /getting-started/using-two-factor-authentication
---

[Two-factor authentication (2FA)][2fa] protects against unauthorized access to your account by confirming your identity using:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Accessing npm using two-factor authentication
redirect_from: [ /getting-started/using-two-factor-authentication ]
redirect_from:
- /getting-started/using-two-factor-authentication
---
import shared from '../../../src/shared.js'

## Sign in from the command line using security-key flow

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Configuring two-factor authentication
---
import shared from '../../../src/shared.js'

You can enable two-factor authentication (2FA) on your npm user account to protect against unauthorized access to your account and packages, either by using a [security-key][webauthn] or [time-based one-time password (TOTP)][totp] from a mobile app.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Setting up your npm user account
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Receiving a one-time password over email
---
import shared from '../../../src/shared.js'

For your security, npm may require additional verification to allow you to log in to your account. If you do not have [two-factor authentication](configuring-two-factor-authentication) enabled, you may be asked to verify yourself with a one-time password sent to the email address configured for your account.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Recovering your 2FA-enabled account
---
import shared from '../../../src/shared.js'

When you have two-factor access enabled on your account, and you lose access to your 2FA device, you may be able to recover your account using the following methods.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Generating and locating npm-debug.log files
redirect_from:
- /generating-and-locating-npm-debug-log-files
---
import shared from '../../../src/shared.js'

When a package fails to install or publish, the npm CLI will generate an `npm-debug.log` file. This log file can help you figure out what went wrong.

Expand Down
2 changes: 1 addition & 1 deletion content/getting-started/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Troubleshooting
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
6 changes: 3 additions & 3 deletions content/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: npm Documentation
github_path: src/nav-base.yml
github_path: src/nav.yml
edit_on_github: false
---

import {HeroLayout, Index} from 'theme'
import HeroLayout from '@npm/documentation-theme/src/layout/hero'
export default HeroLayout

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index depth='1' />
2 changes: 1 addition & 1 deletion content/integrations/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Integrations
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Creating and viewing access tokens
redirect_from: [ /creating-and-viewing-authentication-tokens ]
redirect_from:
- /creating-and-viewing-authentication-tokens
---

You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) access tokens from the website and command line interface (CLI).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Integrating npm with external services
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Revoking access tokens
redirect_from: [ /revoking-authentication-tokens ]
redirect_from:
- /revoking-authentication-tokens
---

To keep your account and packages secure, we strongly recommend revoking (deleting) tokens you no longer need or that have been compromised. You can revoke any token you have created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Converting your user account to an organization
redirect_from:
- /converting-your-user-account-to-an-org
---
import shared from '../../../src/shared.js'

If you have an npm user account, you can convert your user account to an organization. When you convert your user account to an organization, we will:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ redirect_from:
- /orgs/creating-an-org
- /creating-an-org
---
import shared from '../../../src/shared.js'

Any npm user can create an organization to manage contributor access to packages governed by the organization.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Deleting an organization
redirect_from:
- /deleting-an-org
---
import shared from '../../../src/shared.js'

An organization administrator can delete the organization; packages in
the organization will also [be deleted](/unpublishing-packages-from-the-registry) if they fulfill the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Creating and managing organizations
redirect_from:
- /orgs/creating-and-managing-orgs
edit_on_github: false
---

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Requiring two-factor authentication in your organization
---
import shared from '../../../src/shared.js'

Organization owners can require organization members to enable two-factor authentication for their personal accounts, making it harder for malicious actors to access an organization's packages and settings

Expand Down
5 changes: 1 addition & 4 deletions content/organizations/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ title: Organizations
redirect_from:
- /getting-started/working-with-orgs
- /orgs
edit_on_github: false
---

import {Link} from '@primer/components'
import shared from '../../src/shared.js'

<>Organizations allow teams of contributors to read and write public and private packages. Organizations are free when they publish public packages. When organizations publish private packages, an npm Teams subscription is required. For more information on npm Teams pricing, see our <Link href="https://www.npmjs.com/pricing">products page</Link>.</>

<!-- edit the output of Index in `src/nav-base.yml` -->
<Index />
Loading

0 comments on commit 4dc45d0

Please sign in to comment.