Skip to content

Commit c29870f

Browse files
rm logs and add comparison test
1 parent 8e5a75f commit c29870f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,7 @@ export default function DocNavbarItem({
3838
{...props}
3939
isActive={(_match, location) => {
4040
if (activeBaseRegex) {
41-
console.log('using activeBaseRegex', activeBaseRegex);
42-
console.log('location', location.pathname);
43-
const matched = isRegexpStringMatch(
44-
activeBaseRegex,
45-
location.pathname,
46-
);
47-
console.log('matched', matched);
48-
return matched;
41+
return isRegexpStringMatch(activeBaseRegex, location.pathname);
4942
}
5043
if (activeBasePath) {
5144
return location.pathname.startsWith(activeBaseUrl);

website/docusaurus.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ const config = {
437437
label: 'Playground',
438438
activeBaseRegex: `/docs/playground`,
439439
},
440+
{
441+
type: 'doc',
442+
position: 'left',
443+
docId: 'playground',
444+
label: 'Playground',
445+
},
440446
{
441447
type: 'docSidebar',
442448
position: 'left',

0 commit comments

Comments
 (0)