PATH: //opt/alt/alt-nodejs12/root/lib/node_modules/npm/docs/src/components
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 Accordion.js
↓
X
📄 Button.js
↓
X
📄 DocLinks.js
↓
X
📄 FoundTypo.js
↓
X
📄 MobileSidebar.js
↓
X
📄 Sidebar.js
↓
X
📁 home/
X
📄 layout.js
↓
X
📄 links.js
↓
X
📄 navbar.js
↓
X
📄 scripts.js
↓
X
📄 seo.js
↓
X
SAVING...
BERHASIL DIUBAH!
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
SIMPAN PERUBAHAN