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 docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const config: Config = {
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

trailingSlash: false,
trailingSlash: true,

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export function getNameFromPath(pathname: string, baseUrl: string): string {
: pathname.replace(new RegExp(`^${baseUrl}`), '/');
const pathParts = normalPathName.split('/');

return pathParts.slice(-1)[0];
return pathParts.filter((path) => !!path.length).slice(-1)[0];
}