...
 
Commits (2)
......@@ -7,3 +7,4 @@ dist
public
.env
.env.*
static/rss.xml
\ No newline at end of file
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Gridsome: Chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true
}
]
}
......@@ -4,13 +4,17 @@
// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`
const clientConfig = require("./client.config");
const isProd = process.env.NODE_ENV === "production";
const { NODE_ENV, GRIDSOME_BASE_PATH, SANITY_TOKEN } = process.env;
const isProd = NODE_ENV === "production";
const SITE_NAME = "Sam Beckham";
const SITE_DESCRIPTION =
"The personal website, blog, portfolio, and playground of Sam Beckham. Senior frontend engineer at GitLab";
module.exports = {
siteName: "Sam Beckham",
titleTemplate: "%s | Sam Beckham",
siteDescription:
"The personal website, blog, portfolio, and playground of Sam Beckham. Senior frontend engineer at GitLab",
siteName: SITE_NAME,
titleTemplate: `%s | ${SITE_NAME}`,
siteDescription: SITE_DESCRIPTION,
outDir: "public",
templates: {
SanityPost: "/wrote/:slug__current"
......@@ -20,10 +24,29 @@ module.exports = {
use: "gridsome-source-sanity",
options: {
...clientConfig.sanity,
token: process.env.SANITY_TOKEN,
token: SANITY_TOKEN,
overlayDrafts: !isProd,
watchMode: !isProd
}
},
{
use: "gridsome-plugin-rss",
options: {
contentTypeName: "SanityPost",
latest: true,
dateField: "publishedAt",
feedOptions: {
title: SITE_NAME,
feed_url: `${GRIDSOME_BASE_PATH}/rss.xml`,
site_url: GRIDSOME_BASE_PATH
},
feedItemOptions: node => ({
title: node.title,
description: node.description,
url: `${GRIDSOME_BASE_PATH}/wrote/${node.slug.current}`,
date: node.publishedAt
})
}
}
]
};
......@@ -4277,6 +4277,12 @@ graphql@^14.4.2, graphql@^14.5.4:
dependencies:
iterall "^1.2.2"
"gridsome-plugin-rss@github:samdbeckham/gridsome-plugin-rss.git#dateField":
version "1.1.3"
resolved "https://codeload.github.com/samdbeckham/gridsome-plugin-rss/tar.gz/2f35ffdca59bde404464eae5eed8ac593bf6d6e9"
dependencies:
rss "^1.2.2"
gridsome-source-sanity@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/gridsome-source-sanity/-/gridsome-source-sanity-1.0.2.tgz#768e54b1280d83e599b5c26a3d4d00f989b0a2ae"
......@@ -5839,6 +5845,18 @@ mime-db@^1.28.0:
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.41.0.tgz#9110408e1f6aa1b34aef51f2c9df3caddf46b6a0"
integrity sha512-B5gxBI+2K431XW8C2rcc/lhppbuji67nf9v39eH8pkWoZDxnAL0PxdpH32KYRScniF8qDHBDlI+ipgg5WrCUYw==
mime-db@~1.25.0:
version "1.25.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392"
integrity sha1-wY29fHOl2/b0SgJNwNFloeexw5I=
mime-types@2.1.13:
version "2.1.13"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88"
integrity sha1-4HqqnGxrmnyjASxpADrSWjnpKog=
dependencies:
mime-db "~1.25.0"
mime-types@^2.1.12, mime-types@^2.1.21, mime-types@~2.1.19, mime-types@~2.1.24:
version "2.1.24"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81"
......@@ -7780,6 +7798,14 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"
rss@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/rss/-/rss-1.2.2.tgz#50a1698876138133a74f9a05d2bdc8db8d27a921"
integrity sha1-UKFpiHYTgTOnT5oF0r3I240nqSE=
dependencies:
mime-types "2.1.13"
xml "1.0.1"
run-async@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
......@@ -9519,6 +9545,11 @@ xdg-basedir@^3.0.0:
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=
xml@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=
xtend@^4.0.0, xtend@~4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
......