1- import React from "react" ;
2- import { graphql } from "gatsby" ;
3- import Layout from "../components/Layout" ;
4- import ScannerExamples from "../components/ScannerExamples.js" ;
5- import Sidebar from "../components/Sidebar.js" ;
1+ import { defineCustomElements as deckDeckGoHighlightElement } from '@deckdeckgo/highlight-code/dist/loader' ;
2+ import { graphql } from 'gatsby' ;
3+ import React from 'react' ;
4+ import Layout from '../components/Layout' ;
5+ import ScannerExamples from '../components/ScannerExamples.js' ;
6+ import Sidebar from '../components/Sidebar.js' ;
67
7- import { defineCustomElements as deckDeckGoHighlightElement } from "@deckdeckgo/highlight-code/dist/loader" ;
88deckDeckGoHighlightElement ( ) ;
99
1010const Integration = ( props ) => {
@@ -17,18 +17,19 @@ const Integration = (props) => {
1717
1818 const examples = props . data . examples . nodes . map ( ( { fields } ) => fields ) ;
1919 const showExamples = examples . length > 0 ;
20+ const exampleReadMes = props . data . exampleReadMes . edges ;
2021
2122 return (
2223 < Layout bodyClass = "integration" >
2324 < div className = "sidebar-wrapper" >
2425 < Sidebar
2526 categories = { [
26- { categoryName : " Scanners" , entries : scanners } ,
27+ { categoryName : ' Scanners' , entries : scanners } ,
2728 {
28- categoryName : " Persistence Providers" ,
29+ categoryName : ' Persistence Providers' ,
2930 entries : persistenceProviders ,
3031 } ,
31- { categoryName : " Hooks" , entries : hooks } ,
32+ { categoryName : ' Hooks' , entries : hooks } ,
3233 ] }
3334 currentPathname = { props . location . pathname }
3435 />
@@ -39,7 +40,7 @@ const Integration = (props) => {
3940 className = "content"
4041 dangerouslySetInnerHTML = { { __html : html } }
4142 />
42- { showExamples && < ScannerExamples examples = { examples } /> }
43+ { showExamples && < ScannerExamples examples = { examples } descriptions = { exampleReadMes } /> }
4344 </ div >
4445 </ div >
4546 </ div >
@@ -141,6 +142,18 @@ export const query = graphql`
141142 }
142143 }
143144 }
145+ exampleReadMes: allMarkdownRemark(
146+ filter: { fileAbsolutePath: { regex: $exampleFilter } }
147+ ) {
148+ edges {
149+ node {
150+ frontmatter {
151+ title
152+ }
153+ html
154+ }
155+ }
156+ }
144157 }
145158` ;
146159
0 commit comments