import React from 'react'
const IS_STATIC = process.env.GATSBY_IS_STATIC
const Scripts = () => {
// Workaround: Make links work on the static html site
if (IS_STATIC) {
return (
<script
dangerouslySetInnerHTML={{
__html: `
var anchors = document.querySelectorAll(".sidebar a, .documentation a")
Array.prototype.slice.call(anchors).map(function(el) {
if (el.href.match(/file:\\/\\//)) {
el.href = el.href + "/index.html"
}
})
`
}}
/>
)
}
return null
}
export default Scripts
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| home | Folder | 0755 |
|
|
| Accordion.js | File | 1.14 KB | 0644 |
|
| Button.js | File | 478 B | 0644 |
|
| DocLinks.js | File | 1.83 KB | 0644 |
|
| FoundTypo.js | File | 815 B | 0644 |
|
| MobileSidebar.js | File | 756 B | 0644 |
|
| Sidebar.js | File | 619 B | 0644 |
|
| layout.js | File | 604 B | 0644 |
|
| links.js | File | 970 B | 0644 |
|
| navbar.js | File | 3.17 KB | 0644 |
|
| scripts.js | File | 610 B | 0644 |
|
| seo.js | File | 1.72 KB | 0644 |
|