Skip to content

Commit

Permalink
Fix doc links (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
jverre authored Oct 9, 2024
1 parent fd9c847 commit c4e15fd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ type Props = WrapperProps<typeof ContentType>;
function NotebookBanner() {
const location = useLocation();
const {siteConfig} = useDocusaurusContext();
console.log(siteConfig);

const isCookbook = location.pathname.includes('cookbook/');
const notebookPath = location.pathname.replace(siteConfig.baseUrl, '/docs/');
const notebookPath = location.pathname
.replace(siteConfig.baseUrl, '/docs/')
.split('?')[0] // Remove URL parameters
.replace(/\/$/, ''); // Remove trailing slash
const githubNotebookPath = `https://github.com/comet-ml/opik/blob/main/apps/opik-documentation/documentation${notebookPath}.ipynb`
const colabNotebookPath = `https://colab.research.google.com/github/comet-ml/opik/blob/main/apps/opik-documentation/documentation${notebookPath}.ipynb`

Expand Down

0 comments on commit c4e15fd

Please sign in to comment.