Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/sdk/services/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Workflows provide:
- Access to TailorDB via Kysely query builder
- Job triggering to compose multi-step logic

For the official Tailor Platform documentation, see [Workflow Guide](/guides/workflow).
For the official Tailor Platform documentation, see [Workflow Guide](/guides/workflow/).

## Workflow Rules

Expand Down
6 changes: 5 additions & 1 deletion scripts/docs-sync/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface SyncConfig {
}

const ROOT = process.cwd();
const DOCS_ROOT = path.resolve(ROOT, "../../docs");

const configs: Record<string, SyncConfig> = {
sdk: {
Expand Down Expand Up @@ -150,7 +151,10 @@ walk(config.dst)
.filter((f) => f.endsWith(".md"))
.forEach((f) => {
let content = fs.readFileSync(f, "utf8");
content = content.replace(/\(https:\/\/docs\.tailor\.tech(\/[^)]*)\)/g, "($1)");
content = content.replace(/\(https:\/\/docs\.tailor\.tech(\/[^)]*)\)/g, (_: string, urlPath: string) => {
const hasIndex = fs.existsSync(path.join(DOCS_ROOT, urlPath, "index.md"));
return hasIndex ? `(${urlPath}/)` : `(${urlPath})`;
});
content = content.replace(/\(\.\//g, "(");
content = content.replace(/\/index\.md\)/g, "/)");
content = content.replace(/\.md\)/g, ")");
Expand Down
Loading