1
0
Fork 0

Gatsby v5 (#731)

* Gatsby v5

* add engines key, nvmrc
This commit is contained in:
Matthias Kretschmann 2022-11-08 21:03:54 +00:00 committed by GitHub
parent affe7276df
commit 041b05b22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 1528 additions and 1815 deletions

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
18

View File

@ -5,4 +5,4 @@ title: Santuário de Cristo Rei
image: 2021-10-23-santuario-de-cristo-rei.jpg
---
The [Santuário de Cristo Rei](https://en.wikipedia.org/wiki/Christ_the_King_(Almada)) in Almada overlooking Lisbon, Portugal.
The [Santuário de Cristo Rei](<https://en.wikipedia.org/wiki/Christ_the_King_(Almada)>) in Almada overlooking Lisbon, Portugal.

View File

@ -183,32 +183,30 @@ module.exports = {
})
})
},
query: `
{
allMarkdownRemark(
sort: { order: DESC, fields: [fields___date] },
limit: 40
) {
edges {
node {
html
fields { slug, date }
excerpt
frontmatter {
title
image {
childImageSharp {
resize(width: 940, quality: 85) {
src
}
}
}
}
}
}
}
query: `{
allMarkdownRemark(sort: {fields: {date: DESC}}, limit: 40) {
edges {
node {
html
fields {
slug
date
}
excerpt
frontmatter {
title
image {
childImageSharp {
resize(width: 940, quality: 85) {
src
}
`,
}
}
}
}
}
}
}`,
output: '/feed.xml',
title: siteConfig.siteTitle
}

View File

@ -26,7 +26,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
const result = await graphql(`
{
all: allMarkdownRemark(sort: { order: DESC, fields: [fields___date] }) {
all: allMarkdownRemark(sort: { fields: { date: DESC } }) {
edges {
next {
fields {
@ -54,7 +54,6 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
}
}
}
photos: allMarkdownRemark(filter: { fields: { type: { eq: "photo" } } }) {
edges {
node {
@ -62,7 +61,6 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
}
}
}
archive: allMarkdownRemark(
filter: { fields: { type: { nin: "photo" } } }
) {
@ -72,9 +70,8 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
}
}
}
tags: allMarkdownRemark {
group(field: frontmatter___tags) {
group(field: { frontmatter: { tags: SELECT } }) {
tag: fieldValue
totalCount
}
@ -112,7 +109,7 @@ exports.onPostBuild = async ({ graphql }) => {
// JSON Feed query
const result = await graphql(`
{
allMarkdownRemark(sort: { order: DESC, fields: [fields___date] }) {
allMarkdownRemark(sort: { fields: { date: DESC } }) {
edges {
node {
html

3218
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -38,30 +38,30 @@
"fast-exif": "^1.0.1",
"feather-icons": "^4.29.0",
"fraction.js": "^4.2.0",
"gatsby": "^4.23.0",
"gatsby-plugin-catch-links": "^4.23.0",
"gatsby-plugin-feed": "^4.23.0",
"gatsby-plugin-image": "^2.23.0",
"gatsby": "^5.0.0",
"gatsby-plugin-catch-links": "^5.0.0",
"gatsby-plugin-feed": "^5.0.0",
"gatsby-plugin-image": "^3.0.0",
"gatsby-plugin-lunr": "^1.5.2",
"gatsby-plugin-manifest": "^4.23.0",
"gatsby-plugin-matomo": "^0.13.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-matomo": "^0.14.0",
"gatsby-plugin-meta-redirect": "^1.1.1",
"gatsby-plugin-offline": "^5.23.0",
"gatsby-plugin-react-helmet": "^5.23.0",
"gatsby-plugin-sharp": "^4.23.0",
"gatsby-plugin-sitemap": "^5.23.0",
"gatsby-plugin-offline": "^6.0.0",
"gatsby-plugin-react-helmet": "^6.0.0",
"gatsby-plugin-sharp": "^5.0.0",
"gatsby-plugin-sitemap": "^6.0.0",
"gatsby-plugin-svgr": "^3.0.0-beta.0",
"gatsby-redirect-from": "^0.5.0",
"gatsby-remark-autolink-headers": "^5.23.0",
"gatsby-remark-copy-linked-files": "^5.23.0",
"gatsby-remark-images": "^6.23.0",
"gatsby-redirect-from": "^1.0.0",
"gatsby-remark-autolink-headers": "^6.0.0",
"gatsby-remark-copy-linked-files": "^6.0.0",
"gatsby-remark-images": "^7.0.0",
"gatsby-remark-images-medium-zoom": "^1.7.0",
"gatsby-remark-smartypants": "^5.23.0",
"gatsby-remark-smartypants": "^6.0.0",
"gatsby-remark-vscode": "^3.3.1",
"gatsby-source-filesystem": "^4.23.0",
"gatsby-source-graphql": "^4.23.0",
"gatsby-transformer-remark": "^5.23.0",
"gatsby-transformer-sharp": "^4.23.0",
"gatsby-source-filesystem": "^5.0.0",
"gatsby-source-graphql": "^5.0.0",
"gatsby-transformer-remark": "^6.0.0",
"gatsby-transformer-sharp": "^5.0.0",
"nord-visual-studio-code": "github:arcticicestudio/nord-visual-studio-code",
"pigeon-maps": "^0.21.0",
"pigeon-marker": "^0.3.4",
@ -93,7 +93,7 @@
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"@welldone-software/why-did-you-render": "^7.0.1",
"babel-preset-gatsby": "^2.23.0",
"babel-preset-gatsby": "^3.0.0",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-graphql": "^4.0.0",
@ -120,6 +120,12 @@
"typescript": "^4.8.3",
"typescript-plugin-css-modules": "^3.4.0"
},
"overrides": {
"graphql": "^16.6.0"
},
"engines": {
"node": "18"
},
"repository": {
"type": "git",
"url": "https://github.com/kremalicious/blog.git"

View File

@ -6,8 +6,8 @@ import { Post, Frontmatter } from '../../@types/Post'
import { PhotoThumb } from '../templates/Photos'
const query = graphql`
query {
allMarkdownRemark(sort: { order: DESC, fields: [fields___date] }) {
{
allMarkdownRemark(sort: { fields: { date: DESC } }) {
edges {
node {
...PostTeaser

View File

@ -53,7 +53,7 @@ export const archiveQuery = graphql`
fields: { type: { nin: "photo" } }
frontmatter: { tags: { eq: $tag } }
}
sort: { order: DESC, fields: [fields___date] }
sort: { fields: { date: DESC } }
skip: $skip
limit: $limit
) {

View File

@ -70,7 +70,7 @@ export const photosQuery = graphql`
query ($skip: Int, $limit: Int) {
allMarkdownRemark(
filter: { fields: { type: { eq: "photo" } } }
sort: { order: DESC, fields: [fields___date] }
sort: { fields: { date: DESC } }
skip: $skip
limit: $limit
) {

View File

@ -44,10 +44,10 @@ export default function Home({ data }: PageProps): ReactElement {
}
export const homeQuery = graphql`
query {
{
latestArticles: allMarkdownRemark(
filter: { fields: { type: { ne: "photo" } } }
sort: { order: DESC, fields: [fields___date] }
sort: { fields: { date: DESC } }
limit: 8
) {
edges {
@ -56,10 +56,9 @@ export const homeQuery = graphql`
}
}
}
latestPhotos: allMarkdownRemark(
filter: { fields: { type: { eq: "photo" } } }
sort: { order: DESC, fields: [fields___date] }
sort: { fields: { date: DESC } }
limit: 12
) {
edges {

View File

@ -48,9 +48,9 @@ const TagsPage = (props: TagsPageProps): ReactElement => (
export default TagsPage
export const tagsPageQuery = graphql`
query {
{
allMarkdownRemark {
group(field: frontmatter___tags) {
group(field: { frontmatter: { tags: SELECT } }) {
fieldValue
totalCount
}