Skip to content

Commit

Permalink
Fix: update sidebar list name
Browse files Browse the repository at this point in the history
Signed-off-by: laixingyou <[email protected]>
  • Loading branch information
coder-sett committed Feb 25, 2025
1 parent 4c8c7a1 commit 87407c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/community
4 changes: 2 additions & 2 deletions src/theme/BlogSidebar/Desktop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Link from '@docusaurus/Link';
import { translate } from '@docusaurus/Translate';
import styles from './styles.module.css';

export default function BlogSidebarDesktop ({ sidebar }) {
export default function BlogSidebarDesktop({ sidebar }) {
return (
<aside className="col col--3">
<nav
Expand All @@ -26,7 +26,7 @@ export default function BlogSidebarDesktop ({ sidebar }) {
</div>
<ul className={clsx(styles.sidebarItemList, 'clean-list')}>
{sidebar.items.map(item => {
const postYear = item.permalink.split('/')[2] + '-' + item.permalink.split('/')[3] + '-' + item.permalink.split('/')[4];
const postYear = item.permalink.split('/')[2] === 'blog' ? item.permalink.split('/')[3] + '-' + item.permalink.split('/')[4] + '-' + item.permalink.split('/')[5] : item.permalink.split('/')[2] + '-' + item.permalink.split('/')[3] + '-' + item.permalink.split('/')[4];
const yearHeader = (
<div className={styles.sidebarItemTitle}>{postYear}</div>
);
Expand Down

0 comments on commit 87407c4

Please sign in to comment.