Skip to content

Commit

Permalink
docs: improve search 3/ handle GH discussion entries in search results (
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhan committed Jun 8, 2022
1 parent b54ed41 commit 43e5d1a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/next/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,19 @@ export function Search() {

const hash = a.hash === "#content-wrapper" ? "" : a.hash;

let url = `${a.pathname}${hash}`;

// Handle URLs for GitHub Discussions which are external links
if (a.pathname.startsWith("/dagster-io/dagster/discussions/")) {
url = a.pathname.replace(
"/dagster-io/dagster/discussions",
"https://github.com/dagster-io/dagster/discussions"
);
}

return {
...item,
url: `${a.pathname}${hash}`,
url,
};
});
}}
Expand Down

1 comment on commit 43e5d1a

@vercel
Copy link

@vercel vercel bot commented on 43e5d1a Jun 8, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.