Skip to content

Commit

Permalink
docs: remove outdated and redundant docs (#6121)
Browse files Browse the repository at this point in the history
* chore: remove redundant doc page

* chore: update build and run commands

If you're using a more recent version of node you'll run into a
"ERR_OSSL_EVP_UNSUPPORTED" error without this

* refactor: note that addsons command is deprecated

* refactor: rename command page index

* refactor: move index in commands folder to docs root

*Remove README from docs site (result from docs audit)
* Update the sync command to not reference the README
* The index in the 'commands' folder is now the index of the docs

* docs: remove contributing page

This information is available elsewhere

* refactor: move commands using the openssl-legacy-provider

Move them into their own specific dev command

* Update docs/index.md

Co-authored-by: Uma Chandran <[email protected]>

---------

Co-authored-by: Uma Chandran <[email protected]>
  • Loading branch information
ericapisani and codebyuma authored Nov 6, 2023
1 parent 09f7ded commit 73d2328
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 260 deletions.
192 changes: 0 additions & 192 deletions docs/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/contributing.md

This file was deleted.

43 changes: 0 additions & 43 deletions docs/getting-started.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/commands/index.md → docs/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Netlify CLI Commands List
description: All netlify CLI command
title: Netlify CLI command reference
description: All Netlify CLI commands
---

# Available CLI Commands
# Netlify CLI command reference

To get a list of commands, run

Expand Down
2 changes: 2 additions & 0 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
],
"scripts": {
"start": "npm run sync && run-p start:*",
"dev:start": "npm run sync && NODE_OPTIONS=--openssl-legacy-provider x0 src",
"dev:build": "npm run clean && npm run sync && NODE_OPTIONS=--openssl-legacy-provider x0 build src",
"build": "npm run clean && run-s build:*",
"postbuild": "cp src/_redirects dist/_redirects",
"build:docs": "node scripts/docs.mjs",
Expand Down
8 changes: 4 additions & 4 deletions site/src/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ const navOrder = [
'env',
'functions',
'init',
'integration',
'link',
'lm',
'login',
'logout',
'open',
'serve',
'sites',
'status',
'switch',
Expand All @@ -59,14 +61,12 @@ const navOrder = [
'netlify-dev',
'functions-dev',
'vscode',
'contributing',
]

const pageNames = {
index: 'Introduction',
index: 'CLI Reference',
'getting-started': 'Getting Started',
commands: 'CLI Commands',
contributing: 'Contributing',
addons: 'addons (deprecated)',
'netlify-dev': 'Netlify Dev',
'functions-dev': 'Functions Development',
vscode: 'Run and debug with VSCode',
Expand Down
9 changes: 0 additions & 9 deletions site/sync.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ const syncLocalContent = async function () {
const removeMarkDownLinks = async function (filePath) {
const content = await fs.readFile(filePath, 'utf-8')
const newContent = content.replace(/(\w+)\.md/gm, '$1').replace(/\/docs\/commands\//gm, '/commands/')
// Rename README.md to index.md
if (basename(filePath) === 'README.md') {
const newPath = join(dirname(filePath), 'index.md')
// Delete README.md from docs site
await fs.unlink(filePath)
// Write index.md
await fs.writeFile(newPath, newContent)
return newPath
}
await fs.writeFile(filePath, newContent)
return filePath
}
Expand Down

2 comments on commit 73d2328

@github-actions
Copy link

Choose a reason for hiding this comment

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

📊 Benchmark results

  • Dependency count: 1,373
  • Package size: 406 MB

@github-actions
Copy link

Choose a reason for hiding this comment

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

📊 Benchmark results

  • Dependency count: 1,373
  • Package size: 406 MB

Please sign in to comment.