X7ROOT File Manager
Current Path:
/opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/docs/src/components
opt
/
alt
/
alt-nodejs12
/
root
/
usr
/
lib
/
node_modules
/
npm
/
docs
/
src
/
components
/
??
..
??
Accordion.js
(1.14 KB)
??
Button.js
(478 B)
??
DocLinks.js
(1.83 KB)
??
FoundTypo.js
(815 B)
??
MobileSidebar.js
(756 B)
??
Sidebar.js
(619 B)
??
home
??
layout.js
(604 B)
??
links.js
(970 B)
??
navbar.js
(3.17 KB)
??
scripts.js
(610 B)
??
seo.js
(1.72 KB)
Editing: scripts.js
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
Upload File
Create Folder