Skip to content

Commit a7dc52d

Browse files
Change repo links to absolute file paths (n8n-io#2829)
Co-authored-by: Nick Veitch <[email protected]>
1 parent ec6469a commit a7dc52d

File tree

1,063 files changed

+3369
-3320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,063 files changed

+3369
-3320
lines changed

_doctools/change_link_style.py

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env python3
2+
from pathlib import Path
3+
import argparse
4+
import re
5+
6+
def find_markdown_files(directory):
7+
"""Return a list of path objects for all markdown files in the given directory."""
8+
return list(Path(directory).rglob("*.[mM][dD]"))
9+
10+
def map_urls_to_files(path_list, root_dir):
11+
"""Return a dictionary mapping URL link targets to file targets."""
12+
path_maps = dict()
13+
for path in path_list:
14+
# Here, we convert file paths to absolute paths from the root_dir
15+
md_link_target = "/" / path.relative_to(root_dir)
16+
url_link_target = get_url_path_from_file_path(md_link_target)
17+
path_maps[url_link_target] = str(md_link_target)
18+
19+
return path_maps
20+
21+
def get_url_path_from_file_path(file_path):
22+
"""Return the URL path for a given file path."""
23+
if file_path.name == "index.md":
24+
return str(file_path.parent)
25+
else:
26+
return str(file_path.parent / file_path.stem)
27+
28+
def main(directory):
29+
"""
30+
Finds Markdown files, calculates URL paths associated with them, then finds and
31+
replaces URL paths with file paths in links throughout the repo.
32+
"""
33+
markdown_files = find_markdown_files(directory)
34+
snippet_files = find_markdown_files("../_snippets")
35+
link_maps = map_urls_to_files(markdown_files, directory)
36+
37+
for file in markdown_files + snippet_files:
38+
text = file.read_text()
39+
40+
for url_target, file_target in link_maps.items():
41+
find_pattern = fr"]\({url_target}/?(#[0-9A-Za-z-]+)?\)"
42+
replace_pattern = fr"]({file_target}\1)"
43+
text = re.sub(find_pattern, replace_pattern, text)
44+
45+
file.write_text(text)
46+
47+
48+
if __name__ == "__main__":
49+
parser = argparse.ArgumentParser(description="Replace URL style link targets with markdown file targets")
50+
parser.add_argument("--dir", type=str, default="../docs", help="Directory to scan (default: '../docs')")
51+
52+
args = parser.parse_args()
53+
main(args.dir)
54+

_snippets/code/tournament-notes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
If you have issues with expressions in 1.9.0:
33

44
* Please report the issue on the [forums](https://community.n8n.io/){:target=_blank .external-link}.
5-
* Self-hosted users can switch back to RiotTmpl: set `N8N_EXPRESSION_EVALUATOR` to `tmpl`. Refer to [Environment variables](/hosting/configuration/environment-variables/) for more information on configuring self-hosted n8n.
5+
* Self-hosted users can switch back to RiotTmpl: set `N8N_EXPRESSION_EVALUATOR` to `tmpl`. Refer to [Environment variables](/hosting/configuration/environment-variables/index.md) for more information on configuring self-hosted n8n.
66
///

_snippets/data/data-mapping/item-linking-code-node.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Use n8n's item linking to access data from items that precede the current item. It also has implications when using the Code node. Most nodes link every output item to an input item. This creates a chain of items that you can work back along to access previous items. For a deeper conceptual overview of this topic, refer to [Item linking concepts](/data/data-mapping/data-item-linking/item-linking-concepts). This document focuses on practical usage examples.
1+
Use n8n's item linking to access data from items that precede the current item. It also has implications when using the Code node. Most nodes link every output item to an input item. This creates a chain of items that you can work back along to access previous items. For a deeper conceptual overview of this topic, refer to [Item linking concepts](/data/data-mapping/data-item-linking/item-linking-concepts.md). This document focuses on practical usage examples.
22

33
When using the Code node, there are some scenarios where you need to manually supply item linking information if you want to be able to use `$("<node-name>").item` later in the workflow. All these scenarios only apply if you have more than one incoming item. n8n automatically handles item linking for single items.
44

@@ -8,7 +8,7 @@ These scenarios are when you:
88
* Return new items.
99
* Want to manually control the item linking.
1010

11-
[n8n's automatic item linking](/data/data-mapping/data-item-linking/item-linking-concepts/) handles the other scenarios.
11+
[n8n's automatic item linking](/data/data-mapping/data-item-linking/item-linking-concepts.md) handles the other scenarios.
1212

1313
To control item linking, set `pairedItem` when returning data. For example, to link to the item at index 0:
1414

_snippets/data/data-mapping/item-linking-node-creators.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ This guidance applies to programmatic-style nodes. If you're using declarative s
44

55
Use n8n's item linking to access data from items that precede the current item. n8n needs to know which input item a given output item comes from. If this information is missing, expressions in other nodes may break. As a node developer, you must ensure any items returned by your node support this.
66

7-
This applies to programmatic nodes (including trigger nodes). You don't need to consider item linking when building a declarative-style node. Refer to [Choose your node building approach](/integrations/creating-nodes/plan/choose-node-method/) for more information on node styles.
7+
This applies to programmatic nodes (including trigger nodes). You don't need to consider item linking when building a declarative-style node. Refer to [Choose your node building approach](/integrations/creating-nodes/plan/choose-node-method.md) for more information on node styles.
88

9-
Start by reading [Item linking concepts](/data/data-mapping/data-item-linking/item-linking-concepts/), which provides a conceptual overview of item linking, and details of the scenarios where n8n can handle the linking automatically.
9+
Start by reading [Item linking concepts](/data/data-mapping/data-item-linking/item-linking-concepts.md), which provides a conceptual overview of item linking, and details of the scenarios where n8n can handle the linking automatically.
1010

1111
If you need to handle item linking manually, do this by setting `pairedItem` on each item your node returns:
1212

_snippets/flow-logic/subworkflow-usage.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
1. Create a new workflow.
55

66
/// note | Create sub-workflows from existing workflows
7-
You can optionally create a sub-workflow directly from an existing parent workflow using the [Execute Sub-workflow](/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow/) node. In the node, select the **Database** and **From list** options and select **Create a sub-workflow** in the list.
7+
You can optionally create a sub-workflow directly from an existing parent workflow using the [Execute Sub-workflow](/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow.md) node. In the node, select the **Database** and **From list** options and select **Create a sub-workflow** in the list.
88
///
99

1010
1. **Optional**: configure which workflows can call the sub-workflow:
1111
1. Select the **Options** <span class="inline-image">![Options menu](/_images/common-icons/three-dot-options-menu.png){.off-glb}</span> menu > **Settings**. n8n opens the **Workflow settings** modal.
12-
1. Change the **This workflow can be called by** setting. Refer to [Workflow settings](/workflows/settings/) for more information on configuring your workflows.
12+
1. Change the **This workflow can be called by** setting. Refer to [Workflow settings](/workflows/settings.md) for more information on configuring your workflows.
1313
1. Add the **Execute Sub-workflow** trigger node (if you are searching under trigger nodes, this is also titled **When Executed by Another Workflow**).
1414
1. Set the **Input data mode** to choose how you will define the sub-workflow's input data:
1515
* **Define using fields below**: Choose this mode to define individual input names and data types that the calling workflow needs to provide.
@@ -22,15 +22,15 @@
2222
If there are errors in the sub-workflow, the parent workflow can't trigger it.
2323
///
2424
/// note | Load data into sub-workflow before building
25-
This requires the ability to [load data from previous executions](/workflows/executions/debug/), which is available on n8n Cloud and registered Community plans.
25+
This requires the ability to [load data from previous executions](/workflows/executions/debug.md), which is available on n8n Cloud and registered Community plans.
2626

2727
If you want to load data into your sub-workflow to use while building it:
2828

2929
1. Create the sub-workflow and add the **Execute Sub-workflow Trigger**.
3030
1. Set the node's **Input data mode** to **Accept all data** or define the input items using fields or JSON if they're already known.
31-
1. In the sub-workflow [settings](/workflows/settings/), set **Save successful production executions** to **Save**.
31+
1. In the sub-workflow [settings](/workflows/settings.md), set **Save successful production executions** to **Save**.
3232
1. Skip ahead to setting up the parent workflow, and run it.
33-
1. Follow the steps to [load data from previous executions](/workflows/executions/debug/).
33+
1. Follow the steps to [load data from previous executions](/workflows/executions/debug.md).
3434
1. Adjust the **Input data mode** to match the input sent by the parent workflow if necessary.
3535

3636
You can now pin example data in the trigger node, enabling you to work with real data while configuring the rest of the workflow.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## What to do if your operation isn't supported
22

3-
If this node doesn't support the operation you want to do, you can use the [HTTP Request node](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to call the service's API.
3+
If this node doesn't support the operation you want to do, you can use the [HTTP Request node](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/index.md) to call the service's API.
44

55
You can use the credential you created for this service in the HTTP Request node:
66

77
1. In the HTTP Request node, select **Authentication** > **Predefined Credential Type**.
88
1. Select the service you want to connect to.
99
1. Select your credential.
1010

11-
Refer to [Custom API operations](/integrations/custom-operations/) for more information.
11+
Refer to [Custom API operations](/integrations/custom-operations.md) for more information.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
View n8n's [Advanced AI](/advanced-ai/) documentation.
1+
View n8n's [Advanced AI](/advanced-ai/index.md) documentation.

_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/langchaincode/builtin-methods.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
| Method | Description |
22
| ------ | ----------- |
3-
| `this.addInputData(inputName, data)` | Populate the data of a specified non-main input. Useful for mocking data.<ul><li>`inputName` is the input connection type, and must be one of: `ai_agent`, `ai_chain`, `ai_document`, `ai_embedding`, `ai_languageModel`, `ai_memory`, `ai_outputParser`, `ai_retriever`, `ai_textSplitter`, `ai_tool`, `ai_vectorRetriever`, `ai_vectorStore`</li><li>`data` contains the data you want to add. Refer to [Data structure](/data/data-structure/) for information on the data structure expected by n8n.</li></ul> |
4-
| `this.addOutputData(outputName, data)` | Populate the data of a specified non-main output. Useful for mocking data.<ul><li>`outputName` is the input connection type, and must be one of: `ai_agent`, `ai_chain`, `ai_document`, `ai_embedding`, `ai_languageModel`, `ai_memory`, `ai_outputParser`, `ai_retriever`, `ai_textSplitter`, `ai_tool`, `ai_vectorRetriever`, `ai_vectorStore`</li><li>`data` contains the data you want to add. Refer to [Data structure](/data/data-structure/) for information on the data structure expected by n8n.</li></ul> |
3+
| `this.addInputData(inputName, data)` | Populate the data of a specified non-main input. Useful for mocking data.<ul><li>`inputName` is the input connection type, and must be one of: `ai_agent`, `ai_chain`, `ai_document`, `ai_embedding`, `ai_languageModel`, `ai_memory`, `ai_outputParser`, `ai_retriever`, `ai_textSplitter`, `ai_tool`, `ai_vectorRetriever`, `ai_vectorStore`</li><li>`data` contains the data you want to add. Refer to [Data structure](/data/data-structure.md) for information on the data structure expected by n8n.</li></ul> |
4+
| `this.addOutputData(outputName, data)` | Populate the data of a specified non-main output. Useful for mocking data.<ul><li>`outputName` is the input connection type, and must be one of: `ai_agent`, `ai_chain`, `ai_document`, `ai_embedding`, `ai_languageModel`, `ai_memory`, `ai_outputParser`, `ai_retriever`, `ai_textSplitter`, `ai_tool`, `ai_vectorRetriever`, `ai_vectorStore`</li><li>`data` contains the data you want to add. Refer to [Data structure](/data/data-structure.md) for information on the data structure expected by n8n.</li></ul> |
55
| `this.getInputConnectionData(inputName, itemIndex, inputIndex?)` | Get data from a specified non-main input.<ul><li>`inputName` is the input connection type, and must be one of: `ai_agent`, `ai_chain`, `ai_document`, `ai_embedding`, `ai_languageModel`, `ai_memory`, `ai_outputParser`, `ai_retriever`, `ai_textSplitter`, `ai_tool`, `ai_vectorRetriever`, `ai_vectorStore`</li><li>`itemIndex` should always be `0` (this parameter will be used in upcoming functionality)</li><li>Use `inputIndex` if there is more than one node connected to the specified input.</li></ul> |
66
| `this.getInputData(inputIndex?, inputName?)` | Get data from the main input. |
77
| `this.getNode()` | Get the current node. |
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This parameter controls whether you want the node to require a specific output format. When turned on, n8n prompts you to connect one of these output parsers to the node:
22

3-
* [Auto-fixing Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparserautofixing/)
4-
* [Item List Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparseritemlist/)
5-
* [Structured Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparserstructured/)
3+
* [Auto-fixing Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparserautofixing.md)
4+
* [Item List Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparseritemlist.md)
5+
* [Structured Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparserstructured/index.md)

_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/vector-store-metadata-filter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Available in **Get Many** mode. When searching for data, use this to match with
22

33
This is an `AND` query. If you specify more than one metadata filter field, all of them must match.
44

5-
When inserting data, the metadata is set using the document loader. Refer to [Default Data Loader](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.documentdefaultdataloader/) for more information on loading documents.
5+
When inserting data, the metadata is set using the document loader. Refer to [Default Data Loader](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.documentdefaultdataloader.md) for more information on loading documents.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
You can use this agent with the [Chat Trigger](/integrations/builtin/core-nodes/n8n-nodes-langchain.chattrigger/) node. Attach a memory sub-node so that users can have an ongoing conversation with multiple queries. Memory doesn't persist between sessions.
1+
You can use this agent with the [Chat Trigger](/integrations/builtin/core-nodes/n8n-nodes-langchain.chattrigger/index.md) node. Attach a memory sub-node so that users can have an ongoing conversation with multiple queries. Memory doesn't persist between sessions.

0 commit comments

Comments
 (0)