File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import getTableOfContents from "../utils/get-table-of-contents"
2727import hasBreadcrumbs from "../utils/has-breadcrumbs"
2828
2929const DocsPage = ( { pageContext : page , children, location } ) => {
30- const title = getPageTitle ( page )
30+ const title = getPageTitle ( page , true )
3131 const pageType = getPageType ( page )
3232 const tableOfContents = getTableOfContents ( page )
3333
Original file line number Diff line number Diff line change 1- export default ( { frontmatter, headings } ) => {
1+ export default ( { frontmatter, headings } , useHeading = false ) => {
22 if ( ! frontmatter ) return "Not found"
33
4+ if ( useHeading ) {
5+ return ( headings . length && headings [ 0 ] . value ) || frontmatter . title
6+ }
7+
48 return frontmatter . title || ( headings . length && headings [ 0 ] . value )
59}
You can’t perform that action at this time.
0 commit comments