Skip to content

Commit

Permalink
Merge pull request #52 from Vagr9K/winter-fixes
Browse files Browse the repository at this point in the history
Winter update.
  • Loading branch information
Vagr9K committed Jan 20, 2019
2 parents 97b6623 + 485a4a4 commit c47f773
Show file tree
Hide file tree
Showing 6 changed files with 1,242 additions and 717 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -153,7 +153,7 @@ module.exports = {
iconClassName: "fa fa-envelope"
}
],
copyright: "Copyright © 2017. Advanced User", // Copyright string for the footer of the website and RSS feed.
copyright: "Copyright © 2019. Advanced User", // Copyright string for the footer of the website and RSS feed.
themeColor: "#c62828", // Used for setting manifest and progress theme colors.
backgroundColor: "#e0e0e0" // Used for setting manifest background color.
};
Expand Down
25 changes: 23 additions & 2 deletions data/SiteConfig.js
@@ -1,4 +1,4 @@
module.exports = {
const config = {
siteTitle: "Gatsby Advanced Starter", // Site title.
siteTitleShort: "GA Starter", // Short site title for homescreen (PWA). Preferably should be under 12 characters to prevent truncation.
siteTitleAlt: "GatsbyJS Advanced Starter", // Alternative site title for SEO.
Expand All @@ -14,6 +14,7 @@ module.exports = {
dateFromFormat: "YYYY-MM-DD", // Date format used in the frontmatter.
dateFormat: "DD/MM/YYYY", // Date format for display.
userName: "Advanced User", // Username to display in the author segment.
userEmail: "AdvancedUser@example.com", // Email used for RSS feed's author segment
userTwitter: "", // Optionally renders "Follow Me" in the UserInfo segment.
userLocation: "North Pole, Earth", // User location to display in the author segment.
userAvatar: "https://api.adorable.io/avatars/150/test.png", // User avatar to display in the author segment.
Expand All @@ -37,7 +38,27 @@ module.exports = {
iconClassName: "fa fa-envelope"
}
],
copyright: "Copyright © 2017. Advanced User", // Copyright string for the footer of the website and RSS feed.
copyright: "Copyright © 2019. Advanced User", // Copyright string for the footer of the website and RSS feed.
themeColor: "#c62828", // Used for setting manifest and progress theme colors.
backgroundColor: "#e0e0e0" // Used for setting manifest background color.
};

// Validate

// Make sure pathPrefix is empty if not needed
if (config.pathPrefix === "/") {
config.pathPrefix = "";
} else {
// Make sure pathPrefix only contains the first forward slash
config.pathPrefix = `/${config.pathPrefix.replace(/^\/|\/$/g, "")}`;
}

// Make sure siteUrl doesn't have an ending forward slash
if (config.siteUrl.substr(-1) === "/")
config.siteUrl = config.siteUrl.slice(0, -1);

// Make sure siteRss has a starting forward slash
if (config.siteRss && config.siteRss[0] !== "/")
config.siteRss = `/${config.siteRss}`;

module.exports = config;
14 changes: 7 additions & 7 deletions gatsby-config.js
@@ -1,8 +1,8 @@
const config = require("./data/SiteConfig");
const urljoin = require("url-join");
const config = require("./data/SiteConfig");

module.exports = {
pathPrefix: config.pathPrefix,
pathPrefix: config.pathPrefix === "" ? "/" : config.pathPrefix,
siteMetadata: {
siteUrl: urljoin(config.siteUrl, config.pathPrefix),
rssMetadata: {
Expand All @@ -14,7 +14,6 @@ module.exports = {
config.siteUrl,
config.pathPrefix
)}/logos/logo-512.png`,
author: config.userName,
copyright: config.copyright
}
},
Expand Down Expand Up @@ -101,7 +100,7 @@ module.exports = {
setup(ref) {
const ret = ref.query.site.siteMetadata.rssMetadata;
ret.allMarkdownRemark = ref.query.allMarkdownRemark;
ret.generator = "GatsbyJS Material Starter";
ret.generator = "GatsbyJS Advanced Starter";
return ret;
},
query: `
Expand All @@ -114,7 +113,6 @@ module.exports = {
title
description
image_url
author
copyright
}
}
Expand All @@ -130,10 +128,12 @@ module.exports = {
date: edge.node.fields.date,
title: edge.node.frontmatter.title,
description: edge.node.excerpt,
author: rssMetadata.author,
url: rssMetadata.site_url + edge.node.fields.slug,
guid: rssMetadata.site_url + edge.node.fields.slug,
custom_elements: [{ "content:encoded": edge.node.html }]
custom_elements: [
{ "content:encoded": edge.node.html },
{ author: config.userEmail }
]
}));
},
query: `
Expand Down
64 changes: 32 additions & 32 deletions package.json
Expand Up @@ -4,54 +4,54 @@
"version": "1.1.0",
"author": "Ruben Harutyunyan <vagr9k@gmail.com>",
"dependencies": {
"gatsby": "2.0.40",
"gatsby-image": "2.0.19",
"gatsby-plugin-catch-links": "2.0.6",
"gatsby-plugin-feed": "2.0.9",
"gatsby-plugin-google-analytics": "2.0.7",
"gatsby-plugin-lodash": "3.0.2",
"gatsby-plugin-manifest": "2.0.7",
"gatsby-plugin-nprogress": "2.0.6",
"gatsby-plugin-offline": "2.0.12",
"gatsby-plugin-react-helmet": "3.0.1",
"gatsby-plugin-sharp": "2.0.12",
"gatsby-plugin-sitemap": "2.0.2",
"gatsby-plugin-twitter": "2.0.7",
"gatsby-remark-autolink-headers": "2.0.10",
"gatsby-remark-copy-linked-files": "2.0.6",
"gatsby-remark-images": "2.0.6",
"gatsby-remark-prismjs": "3.0.3",
"gatsby-remark-responsive-iframe": "2.0.6",
"gatsby-source-filesystem": "2.0.7",
"gatsby-transformer-remark": "2.1.11",
"gatsby-transformer-sharp": "2.1.8",
"gatsby": "2.0.91",
"gatsby-image": "2.0.26",
"gatsby-plugin-catch-links": "2.0.9",
"gatsby-plugin-feed": "2.0.11",
"gatsby-plugin-google-analytics": "2.0.9",
"gatsby-plugin-lodash": "3.0.3",
"gatsby-plugin-manifest": "2.0.13",
"gatsby-plugin-nprogress": "2.0.7",
"gatsby-plugin-offline": "2.0.21",
"gatsby-plugin-react-helmet": "3.0.5",
"gatsby-plugin-sharp": "2.0.17",
"gatsby-plugin-sitemap": "2.0.4",
"gatsby-plugin-twitter": "2.0.8",
"gatsby-remark-autolink-headers": "2.0.12",
"gatsby-remark-copy-linked-files": "2.0.8",
"gatsby-remark-images": "3.0.1",
"gatsby-remark-prismjs": "3.2.0",
"gatsby-remark-responsive-iframe": "2.0.8",
"gatsby-source-filesystem": "2.0.16",
"gatsby-transformer-remark": "2.2.0",
"gatsby-transformer-sharp": "2.1.10",
"lodash": "^4.17.4",
"moment": "^2.22.2",
"moment": "^2.23.0",
"prismjs": "^1.15.0",
"react": "^16.6.0",
"react": "^16.7.0",
"react-disqus-comments": "^1.4.0",
"react-dom": "^16.6.0",
"react-dom": "^16.7.0",
"react-helmet": "^5.2.0",
"react-share": "^2.0.0",
"react-share": "^2.4.0",
"react-twitter-widgets": "^1.7.1",
"url-join": "^4.0.0"
},
"devDependencies": {
"cli-glob": "^0.1.0",
"eslint": "^5.8.0",
"eslint": "^5.12.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-config-prettier": "^3.6.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-react": "^7.12.4",
"gh-pages": "^2.0.1",
"prettier": "^1.14.3",
"remark-cli": "^6.0.0",
"prettier": "^1.16.0",
"remark-cli": "^6.0.1",
"remark-preset-lint-recommended": "^3.0.1",
"stylefmt": "^6.0.3",
"stylelint": "^9.7.1",
"stylelint": "^9.10.1",
"stylelint-config-standard": "^18.0.0",
"write-good": "^0.13.1"
"write-good": "^1.0.1"
},
"keywords": [
"gatsby"
Expand Down
1 change: 0 additions & 1 deletion static/gatsby-advanced-starter

This file was deleted.

0 comments on commit c47f773

Please sign in to comment.