mirror of
https://github.com/outline/outline.git
synced 2026-11-27 07:58:51 +03:00
chore: Move link actions to their own module and inline link checks
This commit is contained in:
23 files changed
+226
-223
No files matched your search
@@ -1,6 +1,5 @@
|
||||
import { escape } from "es-toolkit/compat";
|
||||
import type { NavigationNode } from "@shared/types";
|
||||
import { isLinkNode } from "@shared/utils/collections";
|
||||
import { NavigationNodeType, type NavigationNode } from "@shared/types";
|
||||
|
||||
/**
|
||||
* Converts a navigation tree to a sitemap XML string, by traversing the nodes.
|
||||
@@ -17,7 +16,7 @@ export function navigationNodeToSitemap(
|
||||
|
||||
function collectUrls(node: NavigationNode, urls: string[]) {
|
||||
// Links point to other pages, which are not part of the share.
|
||||
if (isLinkNode(node)) {
|
||||
if (node.type === NavigationNodeType.Link) {
|
||||
return;
|
||||
}
|
||||
urls.push(`${baseUrl}${node.url}`);
|
||||
|
||||
Reference in new issue
Block a user