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

View File

@ -11,10 +11,7 @@ exports.createPages = ({ graphql, actions }) => {
return graphql( return graphql(
` `
{ {
allMarkdownRemark( allMarkdownRemark(sort: {frontmatter: {date: DESC}}, limit: 1000) {
sort: { fields: [frontmatter___date], order: DESC }
limit: 1000
) {
edges { edges {
node { node {
fields { 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" "url": "https://github.com/wangonya/flexible-gatsby/issues"
}, },
"dependencies": { "dependencies": {
"decap-cms-app": "^3.1.10", "decap-cms-app": "^3.1.11",
"gatsby": "^4.25.7", "gatsby": "^5.13.6",
"gatsby-plugin-decap-cms": "^4.0.4", "gatsby-plugin-decap-cms": "^4.0.4",
"gatsby-plugin-google-analytics": "^5.1.0", "gatsby-plugin-google-analytics": "^5.13.1",
"gatsby-plugin-image": "^2.7.0", "gatsby-plugin-image": "^3.13.1",
"gatsby-plugin-manifest": "^4.23.0", "gatsby-plugin-manifest": "^5.13.1",
"gatsby-plugin-offline": "^5.7.0", "gatsby-plugin-offline": "^6.13.2",
"gatsby-plugin-react-helmet": "^5.7.0", "gatsby-plugin-react-helmet": "^6.13.1",
"gatsby-plugin-sass": "^5.7.0", "gatsby-plugin-sass": "^6.13.1",
"gatsby-plugin-sharp": "^4.25.1", "gatsby-plugin-sharp": "^5.13.1",
"gatsby-remark-copy-linked-files": "^5.7.0", "gatsby-remark-copy-linked-files": "^6.13.1",
"gatsby-remark-images": "^6.25.0", "gatsby-remark-images": "^7.13.1",
"gatsby-remark-katex": "^6.7.0", "gatsby-remark-katex": "^7.13.1",
"gatsby-remark-prismjs": "^6.7.0", "gatsby-remark-prismjs": "^7.13.1",
"gatsby-source-filesystem": "^4.7.0", "gatsby-source-filesystem": "^5.13.1",
"gatsby-transformer-remark": "^5.25.1", "gatsby-transformer-remark": "^6.13.1",
"gatsby-transformer-sharp": "^4.23.0", "gatsby-transformer-sharp": "^5.13.0",
"katex": "^0.13.3", "katex": "^0.13.3",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^7.0.1", "node-sass": "^9.0.0",
"prismjs": "^1.27.0", "prismjs": "^1.29.0",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react": "^17.0.2", "react": "^18.3.1",
"react-dom": "^17.0.2", "react-dom": "^18.3.1",
"react-helmet": "^6.1.0" "react-helmet": "^6.1.0"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.8.0", "eslint": "^8.8.0",
"eslint-plugin-react": "^7.28.0", "eslint-plugin-react": "^7.34.2",
"prettier": "^2.5.1" "prettier": "^3.3.2"
}, },
"homepage": "https://github.com/wangonya/flexible-gatsby", "homepage": "https://github.com/wangonya/flexible-gatsby",
"keywords": [ "keywords": [

View File

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

View File

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

View File

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