Software: Apache. PHP/5.3.29 uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
Safe-mode: OFF (not secure) /opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/docs/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const {createFilePath} = require('gatsby-source-filesystem')
const path = require('path')
exports.onCreateNode = ({node, getNode, actions}) => {
const {createNodeField} = actions
if (node.internal.type === 'MarkdownRemark') {
const slug = createFilePath({node, getNode, basePath: 'content', trailingSlash: false})
createNodeField({
node,
name: 'slug',
value: slug
})
}
}
exports.createPages = ({graphql, actions}) => {
const {createPage} = actions
return graphql(`
{
allMarkdownRemark {
edges {
node {
id
fields {
slug
}
html
}
}
}
}
`).then(result => {
result.data.allMarkdownRemark.edges.forEach(({node}) => {
createPage({
path: node.fields.slug,
component: path.resolve('./src/templates/Page.js'),
context: {
slug: node.fields.slug
}
})
})
})
}
|
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0119 ]-- |