Skip to content

Commit 2f490a7

Browse files
committed
Update DocItem/Layout swizzle for Docusaurus v3
1 parent 3101144 commit 2f490a7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/theme/DocItem/Layout/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Unsafe swizzle = might break in future minor upgrades.
33
* Run "yarn swizzle @docusaurus/theme-classic DocItem/Layout --eject --danger" and compare the diff.
4-
*
4+
*
55
* Our customizations are marked with comments below
66
*/
77

@@ -17,6 +17,7 @@ import DocItemTOCMobile from '@theme/DocItem/TOC/Mobile';
1717
import DocItemTOCDesktop from '@theme/DocItem/TOC/Desktop';
1818
import DocItemContent from '@theme/DocItem/Content';
1919
import DocBreadcrumbs from '@theme/DocBreadcrumbs';
20+
import Unlisted from '@theme/Unlisted';
2021
import styles from './styles.module.css';
2122
/* Customization start */
2223
import { GiscusHead, GiscusComponent } from '../../../components/Giscus';
@@ -43,9 +44,13 @@ function useDocTOC() {
4344
}
4445
export default function DocItemLayout({ children }) {
4546
const docTOC = useDocTOC();
47+
const {
48+
metadata: { unlisted },
49+
} = useDoc();
4650
return (
4751
<div className="row">
4852
<div className={clsx('col', !docTOC.hidden && styles.docItemCol)}>
53+
{unlisted && <Unlisted />}
4954
<DocVersionBanner />
5055
<div className={styles.docItemContainer}>
5156
<article>

0 commit comments

Comments
 (0)