diff --git a/.changeset/long-shirts-behave.md b/.changeset/long-shirts-behave.md new file mode 100644 index 00000000..625ff7d8 --- /dev/null +++ b/.changeset/long-shirts-behave.md @@ -0,0 +1,5 @@ +--- +'@myst-theme/site': patch +--- + +Hide long bibliography changed to 15 diff --git a/packages/site/src/components/Bibliography.tsx b/packages/site/src/components/Bibliography.tsx index c875b973..d60668b9 100644 --- a/packages/site/src/components/Bibliography.tsx +++ b/packages/site/src/components/Bibliography.tsx @@ -3,14 +3,14 @@ import classNames from 'classnames'; import { HashLink } from 'myst-to-react'; import { useState } from 'react'; -const HIDE_OVER_N_REFERENCES = 5; - export function Bibliography({ containerClassName, innerClassName, + hideLongBibliography = 15, }: { containerClassName?: string; innerClassName?: string; + hideLongBibliography?: false | number; }) { const references = useReferences(); const grid = useGridSystemProvider(); @@ -18,14 +18,14 @@ export function Bibliography({ const filtered = order?.filter((l) => l); const [hidden, setHidden] = useState(true); if (!filtered || !data || filtered.length === 0) return null; - const refs = hidden ? filtered.slice(0, HIDE_OVER_N_REFERENCES) : filtered; + const refs = hidden && hideLongBibliography ? filtered.slice(0, hideLongBibliography) : filtered; return (
- {filtered.length > HIDE_OVER_N_REFERENCES && ( + {!!hideLongBibliography && filtered.length > hideLongBibliography && (