Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ bundle-stats.json
src/generated/
plugins/source-terasology-modules/data.json
plugins/source-terasology-engine/data.json

.env
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const urljoin = require("url-join");
const config = require("./data/SiteConfig");
require('dotenv').config();

module.exports = {
pathPrefix: config.pathPrefix,
Expand Down
5 changes: 3 additions & 2 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
node {
fields {
slug
date
}
}
}
Expand All @@ -85,8 +86,8 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
);
const posts = blogQueryResult.data.allMarkdownRemark.edges;
posts.forEach((edge) => {
createPage({
path: `/blog${edge.node.fields.slug}`,
createPage({
path: `/blog${edge.node.fields.slug}${edge.node.fields.date.replace(/[-T:.Z]/g, '-')}`,
component: blogPostTemplate,
context: {
slug: edge.node.fields.slug,
Expand Down
Loading