diff --git a/src/components/search.js b/src/components/search.js index 6dbaa47bd6d..9a15dd8f14a 100644 --- a/src/components/search.js +++ b/src/components/search.js @@ -45,7 +45,10 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => { to={item.path} active={highlightedIndex === index} > - + s.shortName || s.title).join(' / ')}` : ` in ${siteMetadata.shortName}`}, ${index + 1} of ${results.length}`} + > {hierarchy.length ? hierarchy.map(s => s.shortName || s.title).join(' / ') : siteMetadata.shortName} diff --git a/src/components/table-of-contents.js b/src/components/table-of-contents.js index ec358a17ef3..ed2acb5a77e 100644 --- a/src/components/table-of-contents.js +++ b/src/components/table-of-contents.js @@ -6,12 +6,20 @@ import usePage from '../hooks/use-page' const TableOfContentsItems = ({items, depth}) => ( <> - {items.map(item => ( + {items.map((item, index) => ( - 1 ? 4 : 2}}> + {item.title} + {item.items ? ( + + + + ) : null} - {item.items ? : null} ))}