Skip to content

Commit

Permalink
docs: update docs site URLs (#4877)
Browse files Browse the repository at this point in the history
* docs: update docs site URLs

* Update docs/netlify-dev.md

Co-authored-by: Daniel Tschinder <231804+danez@users.noreply.github.com>

* chore: update contributors field

Co-authored-by: Daniel Tschinder <231804+danez@users.noreply.github.com>
Co-authored-by: rstavchansky <rstavchansky@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 1, 2022
1 parent 64789d0 commit 8933bfb
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ netlify [command] help

## Documentation

To learn how to log in to Netlify and start deploying sites, visit the [documentation on Netlify](https://www.netlify.com/docs/cli).
To learn how to log in to Netlify and start deploying sites, visit the [documentation on Netlify](https://docs.netlify.com/cli/get-started/).

For a full command reference, see the list below, or visit [cli.netlify.com](https://cli.netlify.com/).

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: All Netlify CLI commands

# Netlify CLI Command List

Welcome to the Netlify CLI! This site provides online access to all help strings in the Netlify CLI. For a more in-depth guide, please see our [Getting Started](https://www.netlify.com/docs/cli/) guide on our main docs site.
Welcome to the Netlify CLI! This site provides online access to all help strings in the Netlify CLI. For a more in-depth guide, please see our [Getting Started](https://docs.netlify.com/cli/get-started/) guide on our main docs site.

If you have questions, ideas, or would like to contribute, check out the [repository on GitHub](https://github.com/netlify/cli/).

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Netlify CLI addons command

The addons command will manage Netlify addons.

For more information on add-ons see our [Netlify partner add-ons docs](https://www.netlify.com/docs/partner-add-ons/)
For more information on add-ons see our [Netlify partner add-ons docs](https://docs.netlify.com/integrations/partner-add-ons/get-started/)

## About

Expand Down
12 changes: 6 additions & 6 deletions docs/netlify-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ With project detectors, it automatically detects common tools like Gatsby, Hugo,
## Prerequisites

- You should have the latest Netlify CLI version. Run `npm install -g netlify-cli` to be sure.
- You should be [logged in on Netlify CLI](https://www.netlify.com/docs/cli/#authentication)
- Your project should be linked to a `siteID` on Netlify (using [netlify init](https://www.netlify.com/docs/cli/#continuous-deployment) or [netlify link](https://www.netlify.com/docs/cli/#linking-and-unlinking-sites)). You can confirm this has been done if you have a `.netlify` folder with a `state.json` file containing your `siteID`.
- You should be [logged in on Netlify CLI](https://docs.netlify.com/cli/get-started/#authentication)
- Your project should be linked to a `siteID` on Netlify (using [netlify init](https://docs.netlify.com/cli/get-started/#continuous-deployment) or [netlify link](https://docs.netlify.com/cli/get-started/#linking-and-unlinking-sites)). You can confirm this has been done if you have a `.netlify` folder with a `state.json` file containing your `siteID`.

This is how we pull down your build environment variables and manage your addons on your local machine.

Expand Down Expand Up @@ -189,7 +189,7 @@ Netlify Dev tries to acquire these ports but if any of them is not available (al

## Redirects

Netlify Dev has the ability emulate the [redirect capability](https://www.netlify.com/docs/redirects/) Netlify provide on the [ADN](https://netlify.com/features/adn) in your local environment. The same redirect rules which you configure to run on the edge, will also work in your local builds.
Netlify Dev has the ability emulate the [redirect capability](https://docs.netlify.com/routing/redirects/) Netlify provide on the [ADN](https://netlify.com/features/adn) in your local environment. The same redirect rules which you configure to run on the edge, will also work in your local builds.

Netlify dev supports redirect rules defined in either `_redirects` or `netlify.toml` files.

Expand All @@ -199,7 +199,7 @@ The order of precedence for applying redirect rules is:
1. `netlify.toml` file (in the project's publish folder)
1. `netlify.toml` file (in the project's root folder)
See the [Redirects Documentation](https://www.netlify.com/docs/redirects/) for more information on Netlify's redirect and proxying capabilities.
See the [Redirects Documentation](https://docs.netlify.com/routing/redirects/) for more information on Netlify's redirect and proxying capabilities.

## Environment Variables

Expand Down Expand Up @@ -298,7 +298,7 @@ netlify functions:invoke myfunction --querystring "foo=1"
netlify functions:invoke myfunction --payload "./pathTo.json"
```
There are special cases for [event triggered functions](https://www.netlify.com/docs/functions/?utm_source=blog&utm_medium=netlifydev&utm_campaign=devex#event-triggered-functions) (eg `identity-signup`) which will also give you mock data for testing. This makes manual local testing of event triggered functions possible, which drastically improves the development experience.
There are special cases for [event triggered functions](https://docs.netlify.com/functions/trigger-on-events/) (eg `identity-signup`) which will also give you mock data for testing. This makes manual local testing of event triggered functions possible, which drastically improves the development experience.
This is a new feature; ideas and feedback and issues and PR's welcome!

Expand Down Expand Up @@ -330,7 +330,7 @@ We may offer detection for more function builders in future, and also let you sp
Add-ons are a way for Netlify users to extend the functionality of their Jamstack site/app.
Check out [Add-on docs](https://www.netlify.com/docs/partner-add-ons/) here.
Check out [Add-on docs](https://docs.netlify.com/integrations/partner-add-ons/get-started/) here.
To try out an add-on with Netlify dev, run the `netlify addons:create` command:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"Charlie Depman <cdepman@gmail.com> (depman.dev)",
"Charlie Depman <cdepman@gmail.com> (depman.dev)",
"Charlie Depman <cdepman@gmail.com> (depman.dev)",
"Chris Templin <ctemplin@gmail.com>",
"Cole Bosmann",
"Dan Croak (https://twitter.com/croaky)",
"Dan Loewenherz <dan@lionheartsw.com> (https://twitter.com/dwlz)",
Expand Down
8 changes: 4 additions & 4 deletions src/commands/functions/functions-invoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const fetch = require('node-fetch')

const { BACKGROUND, CLOCKWORK_USERAGENT, NETLIFYDEVWARN, chalk, error, exit, getFunctions } = require('../../utils')

// https://www.netlify.com/docs/functions/#event-triggered-functions
// https://docs.netlify.com/functions/trigger-on-events/
const events = [
'deploy-building',
'deploy-succeeded',
Expand Down Expand Up @@ -161,10 +161,10 @@ const functionsInvoke = async (nameArgument, options, command) => {
}
} else if (eventTriggeredFunctions.has(functionToTrigger)) {
/** handle event triggered fns */
// https://www.netlify.com/docs/functions/#event-triggered-functions
// https://docs.netlify.com/functions/trigger-on-events/
const [name, event] = functionToTrigger.split('-')
if (name === 'identity') {
// https://www.netlify.com/docs/functions/#identity-event-functions
// https://docs.netlify.com/functions/functions-and-identity/#trigger-functions-on-identity-events
body.event = event
body.user = {
id: '1111a1a1-a11a-1111-aa11-aaa11111a11a',
Expand All @@ -182,7 +182,7 @@ const functionsInvoke = async (nameArgument, options, command) => {
}
} else {
// non identity functions seem to have a different shape
// https://www.netlify.com/docs/functions/#event-function-payloads
// https://docs.netlify.com/functions/trigger-on-events/#payload
body.payload = {
TODO: 'mock up payload data better',
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const mainCommand = async function (options, command) {
// if no command show the header and the help
if (command.args.length === 0) {
const title = `${chalk.bgBlack.cyan('⬥ Netlify CLI')}`
const docsMsg = `${chalk.greenBright('Read the docs:')} https://www.netlify.com/docs/cli`
const docsMsg = `${chalk.greenBright('Read the docs:')} https://docs.netlify.com/cli/get-started/`
const supportMsg = `${chalk.magentaBright('Support and bugs:')} ${pkg.bugs.url}`

console.log()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const handler = async function (event, context) {
const getSchema = async function (endpoint) {
// you can't use relative URLs within Netlify Functions so need a base URL
// process.env.URL is one of many build env variables:
// https://www.netlify.com/docs/continuous-deployment/#build-environment-variables
// https://docs.netlify.com/configure-builds/environment-variables/
// Netlify Dev only supports URL and DEPLOY URL for now
const uri = `${process.env.URL}/.netlify/functions/${endpoint}`
const link = createHttpLink({ uri, fetch })
Expand Down
2 changes: 1 addition & 1 deletion src/functions-templates/javascript/hello-world/{{name}}.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Docs on event and context https://www.netlify.com/docs/functions/#the-handler-method
// Docs on event and context https://docs.netlify.com/functions/build/#code-your-function-2
const handler = async (event) => {
try {
const subject = event.queryStringParameters.name || 'World'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// more:
// https://www.netlify.com/blog/2019/02/21/the-role-of-roles-and-how-to-set-them-in-netlify-identity/
// https://www.netlify.com/docs/functions/#identity-and-functions
// https://docs.netlify.com/functions/functions-and-identity/

const handler = async function (event) {
const data = JSON.parse(event.body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = function expressApp(functionName) {
<body>
<h1>Express via '${functionName}' ⊂◉‿◉つ</h1>
<p>I'm using Express running via a <a href='https://www.netlify.com/docs/functions/' target='_blank'>Netlify Function</a>.</p>
<p>I'm using Express running via a <a href='https://docs.netlify.com/functions/overview/' target='_blank'>Netlify Function</a>.</p>
<p>Choose a route:</p>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/init/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const getNetlifyToml = ({
# port = 3000 # Port that the dev server will be listening on
# publish = "dist" # Folder with the static content for _redirect file
## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/
## more info on configuring this file: https://docs.netlify.com/configure-builds/file-based-configuration/
`

const saveNetlifyToml = async ({ baseDir, buildCmd, buildDir, config, configPath, functionsDir, repositoryRoot }) => {
Expand Down

1 comment on commit 8933bfb

@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

Package size: 230 MB

Please sign in to comment.