Update to gatsby-v5

This commit is contained in:
SMagic-L 2024-07-02 21:33:41 +08:00
parent 1eb2c5d567
commit 5c4ba2e316
Signed by untrusted user who does not match committer: SMagic
GPG Key ID: 260D2A4E84D07827
8 changed files with 6786 additions and 5236 deletions

2
.nvmrc
View File

@ -1 +1 @@
20.10.0
15.3.0

View File

@ -1,17 +1,17 @@
module.exports = {
siteMetadata: {
title: `SMagic's Blog`,
description: `一个兴趣广泛的软件开发者`,
author: `SMagic`,
siteUrl: `https://blog.smagic.top/`,
social: {
twitter: ``,
facebook: ``,
github: `SMagic-L`,
linkedin: ``,
email: `tmp@smagic.top`,
},
title: `SMagic's Blog`,
description: `一个兴趣广泛的软件开发者`,
author: `SMagic`,
siteUrl: `https://blog.smagic.top/`,
social: {
twitter: ``,
facebook: ``,
github: `SMagic-L`,
linkedin: ``,
email: `tmp@smagic.top`,
},
},
plugins: [
{
resolve: `gatsby-source-filesystem`,

View File

@ -11,10 +11,7 @@ exports.createPages = ({ graphql, actions }) => {
return graphql(
`
{
allMarkdownRemark(
sort: { fields: [frontmatter___date], order: DESC }
limit: 1000
) {
allMarkdownRemark(sort: {frontmatter: {date: DESC}}, limit: 1000) {
edges {
node {
fields {

11937
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,36 +8,36 @@
"url": "https://github.com/wangonya/flexible-gatsby/issues"
},
"dependencies": {
"decap-cms-app": "^3.1.10",
"gatsby": "^4.25.7",
"decap-cms-app": "^3.1.11",
"gatsby": "^5.13.6",
"gatsby-plugin-decap-cms": "^4.0.4",
"gatsby-plugin-google-analytics": "^5.1.0",
"gatsby-plugin-image": "^2.7.0",
"gatsby-plugin-manifest": "^4.23.0",
"gatsby-plugin-offline": "^5.7.0",
"gatsby-plugin-react-helmet": "^5.7.0",
"gatsby-plugin-sass": "^5.7.0",
"gatsby-plugin-sharp": "^4.25.1",
"gatsby-remark-copy-linked-files": "^5.7.0",
"gatsby-remark-images": "^6.25.0",
"gatsby-remark-katex": "^6.7.0",
"gatsby-remark-prismjs": "^6.7.0",
"gatsby-source-filesystem": "^4.7.0",
"gatsby-transformer-remark": "^5.25.1",
"gatsby-transformer-sharp": "^4.23.0",
"gatsby-plugin-google-analytics": "^5.13.1",
"gatsby-plugin-image": "^3.13.1",
"gatsby-plugin-manifest": "^5.13.1",
"gatsby-plugin-offline": "^6.13.2",
"gatsby-plugin-react-helmet": "^6.13.1",
"gatsby-plugin-sass": "^6.13.1",
"gatsby-plugin-sharp": "^5.13.1",
"gatsby-remark-copy-linked-files": "^6.13.1",
"gatsby-remark-images": "^7.13.1",
"gatsby-remark-katex": "^7.13.1",
"gatsby-remark-prismjs": "^7.13.1",
"gatsby-source-filesystem": "^5.13.1",
"gatsby-transformer-remark": "^6.13.1",
"gatsby-transformer-sharp": "^5.13.0",
"katex": "^0.13.3",
"lodash": "^4.17.21",
"node-sass": "^7.0.1",
"prismjs": "^1.27.0",
"node-sass": "^9.0.0",
"prismjs": "^1.29.0",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet": "^6.1.0"
},
"devDependencies": {
"eslint": "^8.8.0",
"eslint-plugin-react": "^7.28.0",
"prettier": "^2.5.1"
"eslint-plugin-react": "^7.34.2",
"prettier": "^3.3.2"
},
"homepage": "https://github.com/wangonya/flexible-gatsby",
"keywords": [

View File

@ -37,7 +37,7 @@ export default TagsPage
export const pageQuery = graphql`
query {
allMarkdownRemark(limit: 2000) {
group(field: frontmatter___tags) {
group(field: {frontmatter: {tags: SELECT}}) {
fieldValue
totalCount
}

View File

@ -98,11 +98,7 @@ export const pageQuery = graphql`
title
}
}
allMarkdownRemark(
sort: { fields: [frontmatter___date], order: DESC }
limit: $limit
skip: $skip
) {
allMarkdownRemark(sort: {frontmatter: {date: DESC}}, limit: $limit, skip: $skip) {
edges {
node {
excerpt

View File

@ -40,8 +40,8 @@ export const pageQuery = graphql`
query($tag: String) {
allMarkdownRemark(
limit: 2000
sort: { fields: [frontmatter___date], order: DESC }
filter: { frontmatter: { tags: { in: [$tag] } } }
sort: {frontmatter: {date: DESC}}
filter: {frontmatter: {tags: {in: [$tag]}}}
) {
totalCount
edges {