From dcd532674113a2210596d59b72e9fbff5e4994dc Mon Sep 17 00:00:00 2001 From: tubone24 Date: Thu, 5 May 2022 19:13:29 +0900 Subject: [PATCH 1/5] hat remove --- gatsby-config.js | 23 +- package-lock.json | 223 ++++++------------ package.json | 76 +++--- src/__generated__/gatsby-types.ts | 65 +++-- src/components/Layout/index.scss | 1 + src/content/2019-05-17-README.md | 18 +- ...63\343\202\222\346\233\270\343\201\217.md" | 2 +- ...7\343\202\213-nuxtjs-toast\347\267\250.md" | 2 +- src/content/2020-04-22-new-my-gear.md | 2 +- ...54\346\210\220\343\201\231\343\202\213.md" | 12 +- ...43\343\201\246\343\201\277\343\201\237.md" | 2 +- ...66\343\202\222\344\275\234\343\202\213.md" | 2 +- ...43\343\201\246\343\201\277\343\202\213.md" | 2 +- ...56\345\217\257\346\204\233\343\201\225.md" | 2 +- ...33\343\201\225\343\201\233\343\202\213.md" | 2 +- 15 files changed, 185 insertions(+), 249 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index eb6f381372..9fe4f0eb93 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -162,8 +162,6 @@ module.exports = { resolve: "gatsby-transformer-remark", options: { plugins: [ - "gatsby-remark-embed-youtube", - "gatsby-plugin-twitter", { resolve: "gatsby-remark-table-of-contents", options: { @@ -173,16 +171,25 @@ module.exports = { toHeading: 4, }, }, - "gatsby-remark-numbered-footnotes", { - resolve: "gatsby-remark-embed-soundcloud", + resolve: "@raae/gatsby-remark-oembed", options: { - width: "80%", // default is "100%" - height: 200, // default is 300 - color: "#6cff8c", // default is #ff5500 - autoplay: false, // default is false + usePrefix: false, + providers: { + settings: { + hatenablog: { + endpoints: [ + { + schemes: ["https://*.hatenablog.com/*"], + url: "https://hatenablog.com/oembed", + }, + ], + }, + }, + }, }, }, + "gatsby-remark-numbered-footnotes", "gatsby-remark-prismjs-title", { resolve: "gatsby-remark-prismjs", diff --git a/package-lock.json b/package-lock.json index 476a1dc51a..8b5c355119 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@loadable/component": "5.15.2", "@popperjs/core": "2.11.5", + "@raae/gatsby-remark-oembed": "^0.3.1", "@sentry/browser": "6.17.2", "@sentry/node": "6.19.6", "@sentry/react": "6.19.3", @@ -55,10 +56,8 @@ "gatsby-plugin-typegen": "2.2.4", "gatsby-react-router-scroll": "5.10.0", "gatsby-remark-autolink-headers": "5.13.0", + "gatsby-remark-code-buttons": "^2.0.7", "gatsby-remark-copy-linked-files": "5.12.1", - "gatsby-remark-embed-soundcloud": "1.0.0", - "gatsby-remark-embed-spotify": "2.1.1", - "gatsby-remark-embed-youtube": "0.0.7", "gatsby-remark-external-links": "0.0.4", "gatsby-remark-numbered-footnotes": "1.0.1", "gatsby-remark-prismjs": "6.10.0", @@ -6214,6 +6213,16 @@ "webpack": "^4.0.0 || ^5.0.0" } }, + "node_modules/@raae/gatsby-remark-oembed": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@raae/gatsby-remark-oembed/-/gatsby-remark-oembed-0.3.1.tgz", + "integrity": "sha512-vB46/9sCt6dKg9WFR8ia/sjL8jnz9VeS00PRveaMk/+pWsSVeNiAHAL+Myals8DRxw4qlxYzGcmH0gYkomZOMA==", + "dependencies": { + "axios": "0.27.2", + "lodash": "4.17.21", + "unist-util-visit-parents": "3.1.1" + } + }, "node_modules/@rushstack/eslint-patch": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.3.tgz", @@ -25773,6 +25782,32 @@ "react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/gatsby-remark-code-buttons": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/gatsby-remark-code-buttons/-/gatsby-remark-code-buttons-2.0.7.tgz", + "integrity": "sha512-weh6fX7NS31mQp3SR2U4isMVop1Mnk2/Qf7BneJt0S4dys3WCIZVOuhJN97aoOlu1y63UdZUpdZlBwwMvmqUEQ==", + "dependencies": { + "query-string": "6.14.0", + "unist-util-visit": "2.0.3" + } + }, + "node_modules/gatsby-remark-code-buttons/node_modules/query-string": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.0.tgz", + "integrity": "sha512-In3o+lUxlgejoVJgwEdYtdxrmlL0cQWJXj0+kkI7RWVo7hg5AhFtybeKlC9Dpgbr8eOC4ydpEh8017WwyfzqVQ==", + "dependencies": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gatsby-remark-copy-linked-files": { "version": "5.12.1", "license": "MIT", @@ -25793,84 +25828,6 @@ "gatsby": "^4.0.0-next" } }, - "node_modules/gatsby-remark-embed-soundcloud": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "unist-util-visit": "^1.1.3" - } - }, - "node_modules/gatsby-remark-embed-soundcloud/node_modules/unist-util-is": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/gatsby-remark-embed-soundcloud/node_modules/unist-util-visit": { - "version": "1.4.1", - "license": "MIT", - "dependencies": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "node_modules/gatsby-remark-embed-soundcloud/node_modules/unist-util-visit-parents": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "unist-util-is": "^3.0.0" - } - }, - "node_modules/gatsby-remark-embed-spotify": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "unist-util-visit": "^1.1.3" - } - }, - "node_modules/gatsby-remark-embed-spotify/node_modules/unist-util-is": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/gatsby-remark-embed-spotify/node_modules/unist-util-visit": { - "version": "1.4.1", - "license": "MIT", - "dependencies": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "node_modules/gatsby-remark-embed-spotify/node_modules/unist-util-visit-parents": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "unist-util-is": "^3.0.0" - } - }, - "node_modules/gatsby-remark-embed-youtube": { - "version": "0.0.7", - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "unist-util-visit": "^1.1.3" - } - }, - "node_modules/gatsby-remark-embed-youtube/node_modules/unist-util-is": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/gatsby-remark-embed-youtube/node_modules/unist-util-visit": { - "version": "1.4.1", - "license": "MIT", - "dependencies": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "node_modules/gatsby-remark-embed-youtube/node_modules/unist-util-visit-parents": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "unist-util-is": "^3.0.0" - } - }, "node_modules/gatsby-remark-external-links": { "version": "0.0.4", "license": "MIT", @@ -64834,6 +64791,16 @@ "@prefresh/utils": "^1.1.0" } }, + "@raae/gatsby-remark-oembed": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@raae/gatsby-remark-oembed/-/gatsby-remark-oembed-0.3.1.tgz", + "integrity": "sha512-vB46/9sCt6dKg9WFR8ia/sjL8jnz9VeS00PRveaMk/+pWsSVeNiAHAL+Myals8DRxw4qlxYzGcmH0gYkomZOMA==", + "requires": { + "axios": "0.27.2", + "lodash": "4.17.21", + "unist-util-visit-parents": "3.1.1" + } + }, "@rushstack/eslint-patch": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.3.tgz", @@ -78694,6 +78661,28 @@ "unist-util-visit": "^2.0.3" } }, + "gatsby-remark-code-buttons": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/gatsby-remark-code-buttons/-/gatsby-remark-code-buttons-2.0.7.tgz", + "integrity": "sha512-weh6fX7NS31mQp3SR2U4isMVop1Mnk2/Qf7BneJt0S4dys3WCIZVOuhJN97aoOlu1y63UdZUpdZlBwwMvmqUEQ==", + "requires": { + "query-string": "6.14.0", + "unist-util-visit": "2.0.3" + }, + "dependencies": { + "query-string": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.0.tgz", + "integrity": "sha512-In3o+lUxlgejoVJgwEdYtdxrmlL0cQWJXj0+kkI7RWVo7hg5AhFtybeKlC9Dpgbr8eOC4ydpEh8017WwyfzqVQ==", + "requires": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + } + } + }, "gatsby-remark-copy-linked-files": { "version": "5.12.1", "requires": { @@ -78707,78 +78696,6 @@ "unist-util-visit": "^2.0.3" } }, - "gatsby-remark-embed-soundcloud": { - "version": "1.0.0", - "requires": { - "babel-runtime": "^6.26.0", - "unist-util-visit": "^1.1.3" - }, - "dependencies": { - "unist-util-is": { - "version": "3.0.0" - }, - "unist-util-visit": { - "version": "1.4.1", - "requires": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "unist-util-visit-parents": { - "version": "2.1.2", - "requires": { - "unist-util-is": "^3.0.0" - } - } - } - }, - "gatsby-remark-embed-spotify": { - "version": "2.1.1", - "requires": { - "babel-runtime": "^6.26.0", - "unist-util-visit": "^1.1.3" - }, - "dependencies": { - "unist-util-is": { - "version": "3.0.0" - }, - "unist-util-visit": { - "version": "1.4.1", - "requires": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "unist-util-visit-parents": { - "version": "2.1.2", - "requires": { - "unist-util-is": "^3.0.0" - } - } - } - }, - "gatsby-remark-embed-youtube": { - "version": "0.0.7", - "requires": { - "babel-runtime": "^6.26.0", - "unist-util-visit": "^1.1.3" - }, - "dependencies": { - "unist-util-is": { - "version": "3.0.0" - }, - "unist-util-visit": { - "version": "1.4.1", - "requires": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "unist-util-visit-parents": { - "version": "2.1.2", - "requires": { - "unist-util-is": "^3.0.0" - } - } - } - }, "gatsby-remark-external-links": { "version": "0.0.4", "requires": { diff --git a/package.json b/package.json index b1c3b67b71..6e870a660d 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dependencies": { "@loadable/component": "5.15.2", "@popperjs/core": "2.11.5", + "@raae/gatsby-remark-oembed": "0.3.1", "@sentry/browser": "6.17.2", "@sentry/node": "6.19.6", "@sentry/react": "6.19.3", @@ -28,7 +29,7 @@ "gatsby-link": "4.3.0", "gatsby-paginate": "1.1.1", "gatsby-plugin-algolia": "0.26.0", - "gatsby-plugin-exclude": "^1.0.2", + "gatsby-plugin-exclude": "1.0.2", "gatsby-plugin-feed": "4.13.0", "gatsby-plugin-flexsearch": "1.0.3", "gatsby-plugin-layout": "3.12.1", @@ -51,9 +52,6 @@ "gatsby-react-router-scroll": "5.10.0", "gatsby-remark-autolink-headers": "5.13.0", "gatsby-remark-copy-linked-files": "5.12.1", - "gatsby-remark-embed-soundcloud": "1.0.0", - "gatsby-remark-embed-spotify": "2.1.1", - "gatsby-remark-embed-youtube": "0.0.7", "gatsby-remark-external-links": "0.0.4", "gatsby-remark-numbered-footnotes": "1.0.1", "gatsby-remark-prismjs": "6.10.0", @@ -123,7 +121,7 @@ }, "devDependencies": { "@babel/core": "7.17.9", - "@cypress/code-coverage": "^3.9.12", + "@cypress/code-coverage": "3.9.12", "@storybook/addon-a11y": "6.4.22", "@storybook/addon-actions": "6.4.22", "@storybook/addon-controls": "6.4.22", @@ -140,59 +138,59 @@ "@storybook/manager-webpack5": "6.4.22", "@storybook/react": "6.4.22", "@storybook/testing-library": "0.0.11", - "@testing-library/cypress": "^8.0.2", - "@testing-library/jest-dom": "^5.16.4", - "@testing-library/react": "^12.1.5", - "@testing-library/user-event": "^14.1.1", + "@testing-library/cypress": "8.0.2", + "@testing-library/jest-dom": "5.16.4", + "@testing-library/react": "12.1.5", + "@testing-library/user-event": "14.1.1", "@textlint-rule/textlint-rule-no-duplicate-abbr": "1.0.2", - "@types/jest": "^27.5.0", - "@types/jest-axe": "^3.5.3", + "@types/jest": "27.5.0", + "@types/jest-axe": "3.5.3", "@types/loadable__component": "5.13.4", "@types/lozad": "1.16.1", - "@types/node": "^17.0.31", - "@types/react-test-renderer": "^18.0.0", + "@types/node": "17.0.31", + "@types/react-test-renderer": "18.0.0", "@types/react-transition-group": "4.4.4", - "axe-core": "^4.4.1", + "axe-core": "4.4.1", "babel-eslint": "10.1.0", - "babel-jest": "^28.0.3", - "babel-plugin-istanbul": "^6.1.1", - "babel-plugin-module-resolver": "^4.1.0", + "babel-jest": "28.0.3", + "babel-plugin-istanbul": "6.1.1", + "babel-plugin-module-resolver": "4.1.0", "babel-plugin-transform-runtime": "6.23.0", - "babel-preset-gatsby": "^2.13.0", - "core-js": "^3.0.1", - "cross-env": "^7.0.3", + "babel-preset-gatsby": "2.13.0", + "core-js": "3.22.3", + "cross-env": "7.0.3", "css-loader": "6.7.1", "cypress": "9.3.1", - "cypress-axe": "^0.14.0", + "cypress-axe": "0.14.0", "cypress-visual-regression": "1.7.0", - "eslint": "^8.14.0", + "eslint": "8.14.0", "eslint-config-airbnb": "19.0.4", "eslint-config-prettier": "8.3.0", - "eslint-config-react-app": "^7.0.1", + "eslint-config-react-app": "7.0.1", "eslint-import-resolver-webpack": "0.13.2", - "eslint-plugin-cypress": "^2.12.1", + "eslint-plugin-cypress": "2.12.1", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jest": "^26.1.5", - "eslint-plugin-jest-dom": "^4.0.1", - "eslint-plugin-json": "^3.1.0", + "eslint-plugin-jest": "26.1.5", + "eslint-plugin-jest-dom": "4.0.1", + "eslint-plugin-json": "3.1.0", "eslint-plugin-jsx-a11y": "6.5.1", "eslint-plugin-prettier": "4.0.0", "eslint-plugin-react": "7.29.4", - "eslint-plugin-react-hooks": "^4.5.0", - "eslint-plugin-testing-library": "^5.3.1", + "eslint-plugin-react-hooks": "4.5.0", + "eslint-plugin-testing-library": "5.3.1", "gatsby-plugin-webpack-bundle-analyser-v2": "1.1.27", "gh-pages": "3.2.3", "husky": "7.0.0", - "identity-obj-proxy": "^3.0.0", - "jest": "^28.0.3", - "jest-axe": "^6.0.0", - "jest-environment-jsdom": "^28.0.2", - "lint-staged": "^12.3.8", + "identity-obj-proxy": "3.0.0", + "jest": "28.0.3", + "jest-axe": "6.0.0", + "jest-environment-jsdom": "28.0.2", + "lint-staged": "12.3.8", "netlify-cli": "10.0.0", "netlify-lambda": "2.0.15", - "nyc": "^15.1.0", + "nyc": "15.1.0", "prettier": "2.6.2", - "react-test-renderer": "^17.0.2", + "react-test-renderer": "17.0.2", "sass-loader": "12.4.0", "start-server-and-test": "1.14.0", "stylelint": "14.1.0", @@ -211,9 +209,9 @@ "textlint-rule-preset-smarthr": "1.13.0", "textlint-rule-prh": "5.3.0", "textlint-rule-terminology": "2.1.5", - "ts-jest": "^28.0.0", - "ts-node": "^10.7.0", - "yaml-lint": "^1.6.0" + "ts-jest": "28.0.0", + "ts-node": "10.7.0", + "yaml-lint": "1.6.0" }, "browserslist": [ ">0.25% in JP", diff --git a/src/__generated__/gatsby-types.ts b/src/__generated__/gatsby-types.ts index 6e84b17e3f..2d2607fa05 100644 --- a/src/__generated__/gatsby-types.ts +++ b/src/__generated__/gatsby-types.ts @@ -255,6 +255,8 @@ type Directory_ctimeArgs = { type Site = Node & { readonly buildTime: Maybe; readonly siteMetadata: Maybe; + readonly port: Maybe; + readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -556,6 +558,8 @@ type Query_allDirectoryArgs = { type Query_siteArgs = { buildTime: Maybe; siteMetadata: Maybe; + port: Maybe; + host: Maybe; pathPrefix: Maybe; polyfill: Maybe; jsxRuntime: Maybe; @@ -1525,6 +1529,8 @@ type SiteFieldsEnum = | 'siteMetadata.description' | 'siteMetadata.siteUrl' | 'siteMetadata.author' + | 'port' + | 'host' | 'pathPrefix' | 'polyfill' | 'jsxRuntime' @@ -1660,6 +1666,8 @@ type SiteGroupConnection_groupArgs = { type SiteFilterInput = { readonly buildTime: Maybe; readonly siteMetadata: Maybe; + readonly port: Maybe; + readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -2716,19 +2724,6 @@ type MarkdownRemarkSortInput = { readonly order: Maybe>>; }; -type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( - Pick - & { url: MarkdownRemarkFrontmatter['slug'] } - )> }; - -type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -type SidebarQueryQuery = { readonly all: ( - Pick - & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } - ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; - type postFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe> }; type BlogPostQueryQueryVariables = Exact<{ @@ -2758,19 +2753,6 @@ type PeriodQueryQuery = { readonly allMarkdownRemark: ( ) }> } ) }; -type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; - - -type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( - Pick - & { readonly frontmatter: Maybe>, readonly fields: Maybe> } - ) }> } }; - -type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; - - -type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; - type tagQueryQueryVariables = Exact<{ tag: Maybe | Scalars['String']>; }>; @@ -2784,9 +2766,40 @@ type tagQueryQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArr )> } ) }> } }; +type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; + + +type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; + type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; +type PagesQueryQueryVariables = Exact<{ [key: string]: never; }>; + + +type PagesQueryQuery = { readonly allSiteFunction: { readonly nodes: ReadonlyArray> }, readonly allSitePage: { readonly nodes: ReadonlyArray> } }; + +type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( + Pick + & { url: MarkdownRemarkFrontmatter['slug'] } + )> }; + +type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; + + +type SidebarQueryQuery = { readonly all: ( + Pick + & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } + ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; + +type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; + + +type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( + Pick + & { readonly frontmatter: Maybe>, readonly fields: Maybe> } + ) }> } }; + } \ No newline at end of file diff --git a/src/components/Layout/index.scss b/src/components/Layout/index.scss index 71f2dcfba2..7f94f4fcc6 100644 --- a/src/components/Layout/index.scss +++ b/src/components/Layout/index.scss @@ -67,4 +67,5 @@ #toc_container ul li { list-style: outside none none !important; } + /* stylelint-enable selector-class-pattern, selector-id-pattern, keyframes-name-pattern */ diff --git a/src/content/2019-05-17-README.md b/src/content/2019-05-17-README.md index 49fb1c3b68..cef4207440 100644 --- a/src/content/2019-05-17-README.md +++ b/src/content/2019-05-17-README.md @@ -30,6 +30,8 @@ templateKey: blog-post ### 引用 +#### 吾輩は猫である + >  吾輩わがはいは猫である。名前はまだ無い。 > > どこで生れたかとんと見当けんとうがつかぬ。 @@ -44,15 +46,19 @@ templateKey: blog-post > > そうしてその穴の中から時々ぷうぷうと煙けむりを吹く。どうも咽むせぽくて実に弱った。これが人間の飲む煙草たばこというものであることはようやくこの頃知った。 -### Iframe +### oEmbed #### YouTube -`youtube:https://www.youtube.com/embed/t54TNjoZ210` +https://youtu.be/Clxd5ZxRGM0 + +#### Twitter -### Twitter +https://twitter.com/imascg_stage/status/1167814328797450241 - +#### SoundCloud + +https://soundcloud.com/user-453736300/uma ### Code @@ -71,10 +77,6 @@ plugins: [ ] ``` -### SoundCloud - -https://soundcloud.com/user-453736300/uma - ### footnote This is normal body copy.[^also] It includes a couple footnotes.[^thing] diff --git "a/src/content/2019-11-25-github\343\201\253\350\215\211\343\202\222\347\224\237\343\202\204\343\201\227\347\266\232\343\201\22190\346\227\245\343\201\214\347\265\214\343\201\243\343\201\237\343\201\256\343\201\247\346\204\237\346\203\263\343\202\222\346\233\270\343\201\217.md" "b/src/content/2019-11-25-github\343\201\253\350\215\211\343\202\222\347\224\237\343\202\204\343\201\227\347\266\232\343\201\22190\346\227\245\343\201\214\347\265\214\343\201\243\343\201\237\343\201\256\343\201\247\346\204\237\346\203\263\343\202\222\346\233\270\343\201\217.md" index 74088386bf..e8c8b65ebc 100644 --- "a/src/content/2019-11-25-github\343\201\253\350\215\211\343\202\222\347\224\237\343\202\204\343\201\227\347\266\232\343\201\22190\346\227\245\343\201\214\347\265\214\343\201\243\343\201\237\343\201\256\343\201\247\346\204\237\346\203\263\343\202\222\346\233\270\343\201\217.md" +++ "b/src/content/2019-11-25-github\343\201\253\350\215\211\343\202\222\347\224\237\343\202\204\343\201\227\347\266\232\343\201\22190\346\227\245\343\201\214\347\265\214\343\201\243\343\201\237\343\201\256\343\201\247\346\204\237\346\203\263\343\202\222\346\233\270\343\201\217.md" @@ -103,6 +103,6 @@ GitHubへのコントリビュートをすることをいわゆる草といい プロは練習、**質も量もすごい**と。 -`youtube:https://www.youtube.com/embed/guDWmY7wJOg` +https://youtu.be/guDWmY7wJOg とりあえず、4ヶ月目も頑張ります… diff --git "a/src/content/2019-12-03-nuxt-js\343\201\247\343\203\242\343\202\270\343\203\245\343\203\274\343\203\253\343\202\222compositionapi\343\201\247\344\275\277\343\201\243\343\201\246\343\201\277\343\202\213-nuxtjs-toast\347\267\250.md" "b/src/content/2019-12-03-nuxt-js\343\201\247\343\203\242\343\202\270\343\203\245\343\203\274\343\203\253\343\202\222compositionapi\343\201\247\344\275\277\343\201\243\343\201\246\343\201\277\343\202\213-nuxtjs-toast\347\267\250.md" index 00520ca264..217e016b83 100644 --- "a/src/content/2019-12-03-nuxt-js\343\201\247\343\203\242\343\202\270\343\203\245\343\203\274\343\203\253\343\202\222compositionapi\343\201\247\344\275\277\343\201\243\343\201\246\343\201\277\343\202\213-nuxtjs-toast\347\267\250.md" +++ "b/src/content/2019-12-03-nuxt-js\343\201\247\343\203\242\343\202\270\343\203\245\343\203\274\343\203\253\343\202\222compositionapi\343\201\247\344\275\277\343\201\243\343\201\246\343\201\277\343\202\213-nuxtjs-toast\347\267\250.md" @@ -58,7 +58,7 @@ CompositionAPIを使おうと思ったのは、Vue3.xで採用されるという 上記のツラミ・スゴミについて詳しくは下記のプレゼンがすごくわかりやすかったです。 -[Composition API TypeScriptはVue.jsの夢を見るか?](https://speakerdeck.com/daikids2/composition-api-typescripthavue-dot-jsfalsemeng-wojian-ruka) +https://speakerdeck.com/jiko21/composition-api-typescripthavue-dot-jsfalsemeng-wojian-ruka ざっくりと書き方の違いとしては diff --git a/src/content/2020-04-22-new-my-gear.md b/src/content/2020-04-22-new-my-gear.md index 8e4994c423..572f72c545 100644 --- a/src/content/2020-04-22-new-my-gear.md +++ b/src/content/2020-04-22-new-my-gear.md @@ -60,7 +60,7 @@ YouTube、ニコ動で「まくまく」さんって方が昔演奏していて ギターサウンドも大好きでした。 -`youtube:https://www.youtube.com/embed/6WtUMZwVq8o` +https://youtu.be/6WtUMZwVq8o この人です。かわいいでしょ。 diff --git "a/src/content/2020-05-03-stylegan\343\201\250stylegan2\343\202\222\344\275\277\343\201\243\343\201\246\343\202\242\343\203\213\343\203\241\344\272\272\344\275\223\351\214\254\346\210\220\343\201\231\343\202\213.md" "b/src/content/2020-05-03-stylegan\343\201\250stylegan2\343\202\222\344\275\277\343\201\243\343\201\246\343\202\242\343\203\213\343\203\241\344\272\272\344\275\223\351\214\254\346\210\220\343\201\231\343\202\213.md" index 98bacccab0..8220b422ae 100644 --- "a/src/content/2020-05-03-stylegan\343\201\250stylegan2\343\202\222\344\275\277\343\201\243\343\201\246\343\202\242\343\203\213\343\203\241\344\272\272\344\275\223\351\214\254\346\210\220\343\201\231\343\202\213.md" +++ "b/src/content/2020-05-03-stylegan\343\201\250stylegan2\343\202\222\344\275\277\343\201\243\343\201\246\343\202\242\343\203\213\343\203\241\344\272\272\344\275\223\351\214\254\346\210\220\343\201\231\343\202\213.md" @@ -41,7 +41,7 @@ DCGANについても詳細は専門家に任せます。[これ](https://arxiv.o その時作ったモデルの結果がこちらです。 -`youtube:https://www.youtube.com/embed/FhBeuX4cYoE` +https://youtu.be/FhBeuX4cYoE 解像度が64×64なので、うーん大したことありませんね。 @@ -141,8 +141,6 @@ Styleの形で特徴を細かく分割し、Mixing Regularizationでそれぞれ 「子どもに学習学習っていいたくないですよね...。NVIDIAだからできたこと。(激寒)」 -`youtube:https://www.youtube.com/embed/vtKutkRhCZY` - 私はNVIDIAではないのでモンスターGPUを大量に購入するお金ないですので今回は学習済みのモデルを借りて実験してみます。 ## Making Anime Faces With StyleGAN @@ -312,7 +310,7 @@ if __name__ == "__main__": 生成した画像をMP4にするとこんな感じになりました! -`youtube:https://www.youtube.com/embed/VAAm-Ne3T6Y` +https://youtu.be/VAAm-Ne3T6Y おおー!すごい!なかなかしっかりしてますね。512x512の高解像度美少女キャラが無限増殖してます! @@ -571,7 +569,7 @@ Unicode warinigはでるものの、 まったく関係ないですが、ハローといえば**Radio Happy**ですよね。好き。 -`youtube:https://www.youtube.com/embed/9pY9MrjeLD4` +https://youtu.be/9pY9MrjeLD4 よし!時はきた! @@ -762,13 +760,13 @@ ble. 紗枝はんといえばやっぱり**美に入り彩を穿つ**ですよね。 -`youtube:https://www.youtube.com/embed/96rmz41v6QE` +https://youtu.be/96rmz41v6QE ごほん! ちゃんとTransitionもうまく出力されているようです! -`youtube:https://www.youtube.com/embed/KpjWeNB5TUI` +https://youtu.be/KpjWeNB5TUI ## 結論 diff --git "a/src/content/2020-07-24-gas\343\201\250line-bot\343\202\222\344\275\277\343\201\243\343\201\246\343\203\251\343\203\274\343\203\241\343\203\263\351\243\237\343\201\271\343\201\237\343\201\204bot\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\201\237.md" "b/src/content/2020-07-24-gas\343\201\250line-bot\343\202\222\344\275\277\343\201\243\343\201\246\343\203\251\343\203\274\343\203\241\343\203\263\351\243\237\343\201\271\343\201\237\343\201\204bot\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\201\237.md" index 7a446ac147..6fa37127ca 100644 --- "a/src/content/2020-07-24-gas\343\201\250line-bot\343\202\222\344\275\277\343\201\243\343\201\246\343\203\251\343\203\274\343\203\241\343\203\263\351\243\237\343\201\271\343\201\237\343\201\204bot\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\201\237.md" +++ "b/src/content/2020-07-24-gas\343\201\250line-bot\343\202\222\344\275\277\343\201\243\343\201\246\343\203\251\343\203\274\343\203\241\343\203\263\351\243\237\343\201\271\343\201\237\343\201\204bot\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\201\237.md" @@ -27,7 +27,7 @@ StayHomeとは、**COVID-19**の感染拡大を防止するために、**「人 個人的には、 -youtube:https://www.youtube.com/embed/t54TNjoZ210 +https://youtu.be/Lk3MZrxXswY がもはや星野源さん関係ないけど笑ってしまいました。天和上がったよって顔がまたなんとも...。 diff --git "a/src/content/2020-12-31-mqtt\343\201\250\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\345\271\264\350\263\200\347\212\266\343\202\222\344\275\234\343\202\213.md" "b/src/content/2020-12-31-mqtt\343\201\250\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\345\271\264\350\263\200\347\212\266\343\202\222\344\275\234\343\202\213.md" index 42bb9e2999..d8c5e511a3 100644 --- "a/src/content/2020-12-31-mqtt\343\201\250\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\345\271\264\350\263\200\347\212\266\343\202\222\344\275\234\343\202\213.md" +++ "b/src/content/2020-12-31-mqtt\343\201\250\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\345\271\264\350\263\200\347\212\266\343\202\222\344\275\234\343\202\213.md" @@ -85,7 +85,7 @@ MQTTの開発元であるIBMに良記事[MQTT の基本知識](https://developer TrySailのアルバムにTailwindというものがありましたが、[Tailwind CSS](https://tailwindcss.com/)もよく聞くので使ってみることにします。 -`youtube:https://www.youtube.com/embed/5HL-OoZjIcQ` +https://youtu.be/5HL-OoZjIcQ 軽い、という話を最初に聞き、使ってみたいと思ってましたが、[必ずしもそういったこともなく](https://tailwindcss.com/docs/optimizing-for-production#app)**Utility-First**に共感できるWeb開発者に受けているんだろうな〜と重い腰が上がりませんでした。 diff --git "a/src/content/2021-07-26-\343\203\251\343\202\272\343\203\221\343\202\244\346\264\273\347\224\250\357\274\201\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\343\202\253\343\203\254\343\203\263\343\203\200\343\203\274\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\202\213.md" "b/src/content/2021-07-26-\343\203\251\343\202\272\343\203\221\343\202\244\346\264\273\347\224\250\357\274\201\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\343\202\253\343\203\254\343\203\263\343\203\200\343\203\274\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\202\213.md" index 2da9420412..e9656b571c 100644 --- "a/src/content/2021-07-26-\343\203\251\343\202\272\343\203\221\343\202\244\346\264\273\347\224\250\357\274\201\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\343\202\253\343\203\254\343\203\263\343\203\200\343\203\274\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\202\213.md" +++ "b/src/content/2021-07-26-\343\203\251\343\202\272\343\203\221\343\202\244\346\264\273\347\224\250\357\274\201\351\233\273\345\255\220\343\203\232\343\203\274\343\203\221\343\203\274\343\202\222\344\275\277\343\201\243\343\201\246\343\202\253\343\203\254\343\203\263\343\203\200\343\203\274\343\202\222\344\275\234\343\201\243\343\201\246\343\201\277\343\202\213.md" @@ -290,6 +290,6 @@ if __name__ == '__main__': 電子ペーパーの再描画はかなり重たいので切り替えには時間がかかるのが欠点ですが他はまぁまぁ上出来ではないでしょうか? -`youtube:https://www.youtube.com/embed/RuiDxP65nnU` +https://youtu.be/RuiDxP65nnU おっそ。 diff --git "a/src/content/2021-09-21-\343\203\244\343\202\257\343\201\256\346\257\233\345\210\210\343\202\212\343\201\213\343\202\211\350\200\203\343\201\210\343\202\213\343\203\244\343\202\257\343\201\256\345\217\257\346\204\233\343\201\225.md" "b/src/content/2021-09-21-\343\203\244\343\202\257\343\201\256\346\257\233\345\210\210\343\202\212\343\201\213\343\202\211\350\200\203\343\201\210\343\202\213\343\203\244\343\202\257\343\201\256\345\217\257\346\204\233\343\201\225.md" index f6eebf8c16..395f7142f3 100644 --- "a/src/content/2021-09-21-\343\203\244\343\202\257\343\201\256\346\257\233\345\210\210\343\202\212\343\201\213\343\202\211\350\200\203\343\201\210\343\202\213\343\203\244\343\202\257\343\201\256\345\217\257\346\204\233\343\201\225.md" +++ "b/src/content/2021-09-21-\343\203\244\343\202\257\343\201\256\346\257\233\345\210\210\343\202\212\343\201\213\343\202\211\350\200\203\343\201\210\343\202\213\343\203\244\343\202\257\343\201\256\345\217\257\346\204\233\343\201\225.md" @@ -45,7 +45,7 @@ Wikiによると、「ヤク」の語はチベット語「གཡག་」(g-yag) ### かわいい映像 -`youtube:https://www.youtube.com/embed/i6bdPbfH2TE` +https://youtu.be/i6bdPbfH2TE かわいいですね!!!!!! diff --git "a/src/content/2021-11-23-depcheck\343\202\222github-action\343\201\247\344\275\277\343\201\204\343\200\201pr\343\202\263\343\203\241\343\203\263\343\203\210\343\201\253\347\265\220\346\236\234\343\202\222\345\207\272\345\212\233\343\201\225\343\201\233\343\202\213.md" "b/src/content/2021-11-23-depcheck\343\202\222github-action\343\201\247\344\275\277\343\201\204\343\200\201pr\343\202\263\343\203\241\343\203\263\343\203\210\343\201\253\347\265\220\346\236\234\343\202\222\345\207\272\345\212\233\343\201\225\343\201\233\343\202\213.md" index 20854403ad..94eda6b892 100644 --- "a/src/content/2021-11-23-depcheck\343\202\222github-action\343\201\247\344\275\277\343\201\204\343\200\201pr\343\202\263\343\203\241\343\203\263\343\203\210\343\201\253\347\265\220\346\236\234\343\202\222\345\207\272\345\212\233\343\201\225\343\201\233\343\202\213.md" +++ "b/src/content/2021-11-23-depcheck\343\202\222github-action\343\201\247\344\275\277\343\201\204\343\200\201pr\343\202\263\343\203\241\343\203\263\343\203\210\343\201\253\347\265\220\346\236\234\343\202\222\345\207\272\345\212\233\343\201\225\343\201\233\343\202\213.md" @@ -26,7 +26,7 @@ JavaScriptやTypeScriptでのシステム開発に必要不可欠なNode.js Pack もちろんこちらの問題はさまざまな議論が尽くされているわけですし、今更どうこう言うつもりはないです。 -`youtube:https://www.youtube.com/embed/SHIci8-6_gs` +https://youtu.be/SHIci8-6_gs 上記問題を解決する方法はいろいろあると思いますが、私のような末端開発者にはとりあえず使ってないライブラリを削除する、くらいしかできないのでそれらを加速させる方法を考えていきましょう。 From b5d87c90d41f9b4d7d7840a6f8780ae2b0fdde8d Mon Sep 17 00:00:00 2001 From: tubone24 Date: Thu, 5 May 2022 19:56:18 +0900 Subject: [PATCH 2/5] hat remove --- gatsby-config.js | 24 +++-- package-lock.json | 156 ++++++++++++++++-------------- package.json | 2 + src/__generated__/gatsby-types.ts | 75 ++++++-------- 4 files changed, 132 insertions(+), 125 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index 9fe4f0eb93..e496fb8da5 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -12,13 +12,18 @@ const { } = process.env; const isNetlifyProduction = NETLIFY_ENV === "production"; const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL; +const siteTitle = "tubone BOYAKI"; +const siteShortTitle = "tuboneBOYAKI"; +const siteDescription = "tubone BOYAKI is a tubone blog"; +const siteAuthor = "tubone"; + module.exports = { pathPrefix: "/", siteMetadata: { - title: "tubone BOYAKI", - description: "tubone BOYAKI is a tubone blog", + title: siteTitle, + description: siteDescription, siteUrl, - author: "tubone", + author: siteAuthor, }, plugins: [ "gatsby-plugin-preact", @@ -145,9 +150,9 @@ module.exports = { } `, output: "/rss.xml", - title: "tubone BOYAKI", - feed_url: "https://blog.tubone-project24.xyz/rss.xml", - site_url: "https://blog.tubone-project24.xyz", + title: siteTitle, + feed_url: `${siteUrl}/rss.xml`, + site_url: siteUrl, docs: "http://github.com/dylang/node-rss", }, ], @@ -208,6 +213,7 @@ module.exports = { rel: "noopener noreferrer", }, }, + "gatsby-remark-check-links", ], }, }, @@ -233,9 +239,9 @@ module.exports = { { resolve: "gatsby-plugin-manifest", options: { - name: "tubone BOYAKI", - short_name: "tuboneBOYAKI", - description: "tubone Blog", + name: siteTitle, + short_name: siteShortTitle, + description: siteDescription, lang: "ja", start_url: "/", background_color: "#ededed", diff --git a/package-lock.json b/package-lock.json index 8b5c355119..cad0c98b6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@loadable/component": "5.15.2", "@popperjs/core": "2.11.5", - "@raae/gatsby-remark-oembed": "^0.3.1", + "@raae/gatsby-remark-oembed": "0.3.1", "@sentry/browser": "6.17.2", "@sentry/node": "6.19.6", "@sentry/react": "6.19.3", @@ -34,7 +34,7 @@ "gatsby-link": "4.3.0", "gatsby-paginate": "1.1.1", "gatsby-plugin-algolia": "0.26.0", - "gatsby-plugin-exclude": "^1.0.2", + "gatsby-plugin-exclude": "1.0.2", "gatsby-plugin-feed": "4.13.0", "gatsby-plugin-flexsearch": "1.0.3", "gatsby-plugin-layout": "3.12.1", @@ -56,7 +56,7 @@ "gatsby-plugin-typegen": "2.2.4", "gatsby-react-router-scroll": "5.10.0", "gatsby-remark-autolink-headers": "5.13.0", - "gatsby-remark-code-buttons": "^2.0.7", + "gatsby-remark-check-links": "^2.1.0", "gatsby-remark-copy-linked-files": "5.12.1", "gatsby-remark-external-links": "0.0.4", "gatsby-remark-numbered-footnotes": "1.0.1", @@ -87,7 +87,7 @@ }, "devDependencies": { "@babel/core": "7.17.9", - "@cypress/code-coverage": "^3.9.12", + "@cypress/code-coverage": "3.9.12", "@storybook/addon-a11y": "6.4.22", "@storybook/addon-actions": "6.4.22", "@storybook/addon-controls": "6.4.22", @@ -104,59 +104,59 @@ "@storybook/manager-webpack5": "6.4.22", "@storybook/react": "6.4.22", "@storybook/testing-library": "0.0.11", - "@testing-library/cypress": "^8.0.2", - "@testing-library/jest-dom": "^5.16.4", - "@testing-library/react": "^12.1.5", - "@testing-library/user-event": "^14.1.1", + "@testing-library/cypress": "8.0.2", + "@testing-library/jest-dom": "5.16.4", + "@testing-library/react": "12.1.5", + "@testing-library/user-event": "14.1.1", "@textlint-rule/textlint-rule-no-duplicate-abbr": "1.0.2", - "@types/jest": "^27.5.0", - "@types/jest-axe": "^3.5.3", + "@types/jest": "27.5.0", + "@types/jest-axe": "3.5.3", "@types/loadable__component": "5.13.4", "@types/lozad": "1.16.1", - "@types/node": "^17.0.31", - "@types/react-test-renderer": "^18.0.0", + "@types/node": "17.0.31", + "@types/react-test-renderer": "18.0.0", "@types/react-transition-group": "4.4.4", - "axe-core": "^4.4.1", + "axe-core": "4.4.1", "babel-eslint": "10.1.0", - "babel-jest": "^28.0.3", - "babel-plugin-istanbul": "^6.1.1", - "babel-plugin-module-resolver": "^4.1.0", + "babel-jest": "28.0.3", + "babel-plugin-istanbul": "6.1.1", + "babel-plugin-module-resolver": "4.1.0", "babel-plugin-transform-runtime": "6.23.0", - "babel-preset-gatsby": "^2.13.0", - "core-js": "^3.0.1", - "cross-env": "^7.0.3", + "babel-preset-gatsby": "2.13.0", + "core-js": "3.22.3", + "cross-env": "7.0.3", "css-loader": "6.7.1", "cypress": "9.3.1", - "cypress-axe": "^0.14.0", + "cypress-axe": "0.14.0", "cypress-visual-regression": "1.7.0", - "eslint": "^8.14.0", + "eslint": "8.14.0", "eslint-config-airbnb": "19.0.4", "eslint-config-prettier": "8.3.0", - "eslint-config-react-app": "^7.0.1", + "eslint-config-react-app": "7.0.1", "eslint-import-resolver-webpack": "0.13.2", - "eslint-plugin-cypress": "^2.12.1", + "eslint-plugin-cypress": "2.12.1", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jest": "^26.1.5", - "eslint-plugin-jest-dom": "^4.0.1", - "eslint-plugin-json": "^3.1.0", + "eslint-plugin-jest": "26.1.5", + "eslint-plugin-jest-dom": "4.0.1", + "eslint-plugin-json": "3.1.0", "eslint-plugin-jsx-a11y": "6.5.1", "eslint-plugin-prettier": "4.0.0", "eslint-plugin-react": "7.29.4", - "eslint-plugin-react-hooks": "^4.5.0", - "eslint-plugin-testing-library": "^5.3.1", + "eslint-plugin-react-hooks": "4.5.0", + "eslint-plugin-testing-library": "5.3.1", "gatsby-plugin-webpack-bundle-analyser-v2": "1.1.27", "gh-pages": "3.2.3", "husky": "7.0.0", - "identity-obj-proxy": "^3.0.0", - "jest": "^28.0.3", - "jest-axe": "^6.0.0", - "jest-environment-jsdom": "^28.0.2", - "lint-staged": "^12.3.8", + "identity-obj-proxy": "3.0.0", + "jest": "28.0.3", + "jest-axe": "6.0.0", + "jest-environment-jsdom": "28.0.2", + "lint-staged": "12.3.8", "netlify-cli": "10.0.0", "netlify-lambda": "2.0.15", - "nyc": "^15.1.0", + "nyc": "15.1.0", "prettier": "2.6.2", - "react-test-renderer": "^17.0.2", + "react-test-renderer": "17.0.2", "sass-loader": "12.4.0", "start-server-and-test": "1.14.0", "stylelint": "14.1.0", @@ -175,9 +175,9 @@ "textlint-rule-preset-smarthr": "1.13.0", "textlint-rule-prh": "5.3.0", "textlint-rule-terminology": "2.1.5", - "ts-jest": "^28.0.0", - "ts-node": "^10.7.0", - "yaml-lint": "^1.6.0" + "ts-jest": "28.0.0", + "ts-node": "10.7.0", + "yaml-lint": "1.6.0" } }, "node_modules/@algolia/cache-browser-local-storage": { @@ -25782,30 +25782,33 @@ "react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/gatsby-remark-code-buttons": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/gatsby-remark-code-buttons/-/gatsby-remark-code-buttons-2.0.7.tgz", - "integrity": "sha512-weh6fX7NS31mQp3SR2U4isMVop1Mnk2/Qf7BneJt0S4dys3WCIZVOuhJN97aoOlu1y63UdZUpdZlBwwMvmqUEQ==", + "node_modules/gatsby-remark-check-links": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/gatsby-remark-check-links/-/gatsby-remark-check-links-2.1.0.tgz", + "integrity": "sha512-TbhT8oVlAgJfxe0WUQWDOb0kLkMUYo1N4AfFstejClPWO4OjRlznt3IMW3weQkwuweiovF5cxVpQcFrkCGVFBw==", "dependencies": { - "query-string": "6.14.0", - "unist-util-visit": "2.0.3" + "unist-util-visit": "^1.4.1" } }, - "node_modules/gatsby-remark-code-buttons/node_modules/query-string": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.0.tgz", - "integrity": "sha512-In3o+lUxlgejoVJgwEdYtdxrmlL0cQWJXj0+kkI7RWVo7hg5AhFtybeKlC9Dpgbr8eOC4ydpEh8017WwyfzqVQ==", + "node_modules/gatsby-remark-check-links/node_modules/unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" + }, + "node_modules/gatsby-remark-check-links/node_modules/unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", "dependencies": { - "decode-uri-component": "^0.2.0", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "unist-util-visit-parents": "^2.0.0" + } + }, + "node_modules/gatsby-remark-check-links/node_modules/unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "dependencies": { + "unist-util-is": "^3.0.0" } }, "node_modules/gatsby-remark-copy-linked-files": { @@ -78661,24 +78664,33 @@ "unist-util-visit": "^2.0.3" } }, - "gatsby-remark-code-buttons": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/gatsby-remark-code-buttons/-/gatsby-remark-code-buttons-2.0.7.tgz", - "integrity": "sha512-weh6fX7NS31mQp3SR2U4isMVop1Mnk2/Qf7BneJt0S4dys3WCIZVOuhJN97aoOlu1y63UdZUpdZlBwwMvmqUEQ==", + "gatsby-remark-check-links": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/gatsby-remark-check-links/-/gatsby-remark-check-links-2.1.0.tgz", + "integrity": "sha512-TbhT8oVlAgJfxe0WUQWDOb0kLkMUYo1N4AfFstejClPWO4OjRlznt3IMW3weQkwuweiovF5cxVpQcFrkCGVFBw==", "requires": { - "query-string": "6.14.0", - "unist-util-visit": "2.0.3" + "unist-util-visit": "^1.4.1" }, "dependencies": { - "query-string": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.0.tgz", - "integrity": "sha512-In3o+lUxlgejoVJgwEdYtdxrmlL0cQWJXj0+kkI7RWVo7hg5AhFtybeKlC9Dpgbr8eOC4ydpEh8017WwyfzqVQ==", + "unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" + }, + "unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", "requires": { - "decode-uri-component": "^0.2.0", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" + "unist-util-visit-parents": "^2.0.0" + } + }, + "unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "requires": { + "unist-util-is": "^3.0.0" } } } diff --git a/package.json b/package.json index 6e870a660d..2ae8e16de7 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "gatsby-plugin-typegen": "2.2.4", "gatsby-react-router-scroll": "5.10.0", "gatsby-remark-autolink-headers": "5.13.0", + "gatsby-remark-check-links": "^2.1.0", "gatsby-remark-copy-linked-files": "5.12.1", "gatsby-remark-external-links": "0.0.4", "gatsby-remark-numbered-footnotes": "1.0.1", @@ -91,6 +92,7 @@ "develop": "gatsby develop", "develop:e2e": "cross-env NODE_ENV=development gatsby develop", "develop:remote": "gatsby develop -p 8080 -H 0.0.0.0", + "serve": "gatsby serve", "format": "eslint .", "format:fix": "eslint --fix .", "format-style": "npx stylelint **/*.scss", diff --git a/src/__generated__/gatsby-types.ts b/src/__generated__/gatsby-types.ts index 2d2607fa05..d2820f543d 100644 --- a/src/__generated__/gatsby-types.ts +++ b/src/__generated__/gatsby-types.ts @@ -255,8 +255,6 @@ type Directory_ctimeArgs = { type Site = Node & { readonly buildTime: Maybe; readonly siteMetadata: Maybe; - readonly port: Maybe; - readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -558,8 +556,6 @@ type Query_allDirectoryArgs = { type Query_siteArgs = { buildTime: Maybe; siteMetadata: Maybe; - port: Maybe; - host: Maybe; pathPrefix: Maybe; polyfill: Maybe; jsxRuntime: Maybe; @@ -1529,8 +1525,6 @@ type SiteFieldsEnum = | 'siteMetadata.description' | 'siteMetadata.siteUrl' | 'siteMetadata.author' - | 'port' - | 'host' | 'pathPrefix' | 'polyfill' | 'jsxRuntime' @@ -1666,8 +1660,6 @@ type SiteGroupConnection_groupArgs = { type SiteFilterInput = { readonly buildTime: Maybe; readonly siteMetadata: Maybe; - readonly port: Maybe; - readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -2724,6 +2716,37 @@ type MarkdownRemarkSortInput = { readonly order: Maybe>>; }; +type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; + + +type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( + Pick + & { readonly frontmatter: Maybe>, readonly fields: Maybe> } + ) }> } }; + +type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( + Pick + & { url: MarkdownRemarkFrontmatter['slug'] } + )> }; + +type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; + + +type SidebarQueryQuery = { readonly all: ( + Pick + & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } + ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; + +type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; + + +type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; + +type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; + + +type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; + type postFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe> }; type BlogPostQueryQueryVariables = Exact<{ @@ -2766,40 +2789,4 @@ type tagQueryQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArr )> } ) }> } }; -type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; - - -type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; - -type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; - - -type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; - -type PagesQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -type PagesQueryQuery = { readonly allSiteFunction: { readonly nodes: ReadonlyArray> }, readonly allSitePage: { readonly nodes: ReadonlyArray> } }; - -type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( - Pick - & { url: MarkdownRemarkFrontmatter['slug'] } - )> }; - -type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -type SidebarQueryQuery = { readonly all: ( - Pick - & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } - ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; - -type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; - - -type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( - Pick - & { readonly frontmatter: Maybe>, readonly fields: Maybe> } - ) }> } }; - } \ No newline at end of file From db367c61cf740eeb0bf0038c52d2ffd9338cb146 Mon Sep 17 00:00:00 2001 From: tubone24 Date: Thu, 5 May 2022 20:11:09 +0900 Subject: [PATCH 3/5] config file --- gatsby-config.js | 3 +- src/__generated__/gatsby-types.ts | 75 ++++++++++++++++++------------- src/components/Footer/index.tsx | 3 +- src/components/Layout/Head.tsx | 5 ++- src/components/SEO/index.tsx | 5 ++- src/config/index.json | 3 ++ tsconfig.json | 1 + 7 files changed, 58 insertions(+), 37 deletions(-) create mode 100644 src/config/index.json diff --git a/gatsby-config.js b/gatsby-config.js index e496fb8da5..d325bcc85a 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -14,7 +14,8 @@ const isNetlifyProduction = NETLIFY_ENV === "production"; const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL; const siteTitle = "tubone BOYAKI"; const siteShortTitle = "tuboneBOYAKI"; -const siteDescription = "tubone BOYAKI is a tubone blog"; +const siteDescription = + "tubones BOYAKI is the developer blog by tubone who is Japanese IT Developer"; const siteAuthor = "tubone"; module.exports = { diff --git a/src/__generated__/gatsby-types.ts b/src/__generated__/gatsby-types.ts index d2820f543d..9f6902680b 100644 --- a/src/__generated__/gatsby-types.ts +++ b/src/__generated__/gatsby-types.ts @@ -255,6 +255,8 @@ type Directory_ctimeArgs = { type Site = Node & { readonly buildTime: Maybe; readonly siteMetadata: Maybe; + readonly port: Maybe; + readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -556,6 +558,8 @@ type Query_allDirectoryArgs = { type Query_siteArgs = { buildTime: Maybe; siteMetadata: Maybe; + port: Maybe; + host: Maybe; pathPrefix: Maybe; polyfill: Maybe; jsxRuntime: Maybe; @@ -1525,6 +1529,8 @@ type SiteFieldsEnum = | 'siteMetadata.description' | 'siteMetadata.siteUrl' | 'siteMetadata.author' + | 'port' + | 'host' | 'pathPrefix' | 'polyfill' | 'jsxRuntime' @@ -1660,6 +1666,8 @@ type SiteGroupConnection_groupArgs = { type SiteFilterInput = { readonly buildTime: Maybe; readonly siteMetadata: Maybe; + readonly port: Maybe; + readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -2716,37 +2724,6 @@ type MarkdownRemarkSortInput = { readonly order: Maybe>>; }; -type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; - - -type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( - Pick - & { readonly frontmatter: Maybe>, readonly fields: Maybe> } - ) }> } }; - -type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( - Pick - & { url: MarkdownRemarkFrontmatter['slug'] } - )> }; - -type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -type SidebarQueryQuery = { readonly all: ( - Pick - & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } - ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; - -type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; - - -type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; - -type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; - - -type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; - type postFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe> }; type BlogPostQueryQueryVariables = Exact<{ @@ -2789,4 +2766,40 @@ type tagQueryQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArr )> } ) }> } }; +type PagesQueryQueryVariables = Exact<{ [key: string]: never; }>; + + +type PagesQueryQuery = { readonly allSiteFunction: { readonly nodes: ReadonlyArray> }, readonly allSitePage: { readonly nodes: ReadonlyArray> } }; + +type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; + + +type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; + +type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; + + +type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; + +type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; + + +type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( + Pick + & { readonly frontmatter: Maybe>, readonly fields: Maybe> } + ) }> } }; + +type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( + Pick + & { url: MarkdownRemarkFrontmatter['slug'] } + )> }; + +type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; + + +type SidebarQueryQuery = { readonly all: ( + Pick + & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } + ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; + } \ No newline at end of file diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index f1b3d30542..d9115fc5a6 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -1,6 +1,7 @@ import React from "react"; import { Link, withPrefix } from "gatsby"; import ExternalLink from "@/components/ExternalLink"; +import { siteTitle } from "@/config/index.json"; import * as style from "./index.module.scss"; @@ -27,7 +28,7 @@ const Footer = () => ( />   - tubone BOYAKI + {siteTitle}   2017-{new Date().getFullYear()} diff --git a/src/components/Layout/Head.tsx b/src/components/Layout/Head.tsx index 9698830c60..adaf8993ab 100644 --- a/src/components/Layout/Head.tsx +++ b/src/components/Layout/Head.tsx @@ -1,11 +1,12 @@ import React from "react"; import { Helmet } from "react-helmet"; +import { siteTitle } from "@/config/index.json"; const Head = () => ( - + Date: Thu, 5 May 2022 20:34:29 +0900 Subject: [PATCH 4/5] React GA4 --- gatsby-browser.js | 7 +- package-lock.json | 11 +++ package.json | 1 + src/__generated__/gatsby-types.ts | 93 ++++++++----------- src/components/Header/index.tsx | 2 +- src/components/Navbar/NavItem/index.tsx | 2 +- src/components/Navbar/index.tsx | 2 +- src/components/SearchBox/index.tsx | 2 +- src/components/ShareBox/index.tsx | 2 +- src/components/Sidebar/Archive/index.tsx | 2 +- src/components/Sidebar/LatestPost/index.tsx | 2 +- src/components/Sidebar/Subscription/index.tsx | 2 +- src/components/Sidebar/index.tsx | 2 +- src/components/Tag/index.tsx | 2 +- 14 files changed, 66 insertions(+), 66 deletions(-) diff --git a/gatsby-browser.js b/gatsby-browser.js index 71ea0e71fd..80d9b3d39c 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -1,4 +1,4 @@ -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import * as Sentry from "@sentry/browser"; import { Integrations } from "@sentry/tracing"; @@ -24,9 +24,10 @@ if (isLocalDevelopment() === false) { }); } -export const onRouteUpdate = (state) => { +export const onRouteUpdate = (_state) => { if (isLocalDevelopment() !== true) { - ReactGA.pageview(state.location.pathname); + //ReactGA.pageview(state.location.pathname); + ReactGA.send("pageview"); } }; diff --git a/package-lock.json b/package-lock.json index cad0c98b6d..769d401b78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,6 +77,7 @@ "react-body-classname": "1.3.1", "react-dom": "17.0.2", "react-ga": "3.3.0", + "react-ga4": "^1.4.1", "react-helmet": "6.1.0", "react-transition-group": "4.4.2", "rimraf": "3.0.2", @@ -52435,6 +52436,11 @@ "react": "^15.6.2 || ^16.0 || ^17" } }, + "node_modules/react-ga4": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-1.4.1.tgz", + "integrity": "sha512-ioBMEIxd4ePw4YtaloTUgqhQGqz5ebDdC4slEpLgy2sLx1LuZBC9iYCwDymTXzcntw6K1dHX183ulP32nNdG7w==" + }, "node_modules/react-helmet": { "version": "6.1.0", "license": "MIT", @@ -95704,6 +95710,11 @@ "version": "3.3.0", "requires": {} }, + "react-ga4": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-1.4.1.tgz", + "integrity": "sha512-ioBMEIxd4ePw4YtaloTUgqhQGqz5ebDdC4slEpLgy2sLx1LuZBC9iYCwDymTXzcntw6K1dHX183ulP32nNdG7w==" + }, "react-helmet": { "version": "6.1.0", "requires": { diff --git a/package.json b/package.json index 2ae8e16de7..802ee18fb1 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "react-body-classname": "1.3.1", "react-dom": "17.0.2", "react-ga": "3.3.0", + "react-ga4": "1.4.1", "react-helmet": "6.1.0", "react-transition-group": "4.4.2", "rimraf": "3.0.2", diff --git a/src/__generated__/gatsby-types.ts b/src/__generated__/gatsby-types.ts index 9f6902680b..04be504a69 100644 --- a/src/__generated__/gatsby-types.ts +++ b/src/__generated__/gatsby-types.ts @@ -255,8 +255,6 @@ type Directory_ctimeArgs = { type Site = Node & { readonly buildTime: Maybe; readonly siteMetadata: Maybe; - readonly port: Maybe; - readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -558,8 +556,6 @@ type Query_allDirectoryArgs = { type Query_siteArgs = { buildTime: Maybe; siteMetadata: Maybe; - port: Maybe; - host: Maybe; pathPrefix: Maybe; polyfill: Maybe; jsxRuntime: Maybe; @@ -1529,8 +1525,6 @@ type SiteFieldsEnum = | 'siteMetadata.description' | 'siteMetadata.siteUrl' | 'siteMetadata.author' - | 'port' - | 'host' | 'pathPrefix' | 'polyfill' | 'jsxRuntime' @@ -1666,8 +1660,6 @@ type SiteGroupConnection_groupArgs = { type SiteFilterInput = { readonly buildTime: Maybe; readonly siteMetadata: Maybe; - readonly port: Maybe; - readonly host: Maybe; readonly pathPrefix: Maybe; readonly polyfill: Maybe; readonly jsxRuntime: Maybe; @@ -2724,6 +2716,24 @@ type MarkdownRemarkSortInput = { readonly order: Maybe>>; }; +type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; + + +type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( + Pick + & { readonly frontmatter: Maybe>, readonly fields: Maybe> } + ) }> } }; + +type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; + + +type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; + +type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; + + +type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; + type postFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe> }; type BlogPostQueryQueryVariables = Exact<{ @@ -2736,22 +2746,18 @@ type BlogPostQueryQuery = { readonly content: { readonly edges: ReadonlyArray<{ & postFragment ) }> } }; -type PeriodQueryQueryVariables = Exact<{ - periodStartDate: Maybe; - periodEndDate: Maybe; -}>; +type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( + Pick + & { url: MarkdownRemarkFrontmatter['slug'] } + )> }; +type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; -type PeriodQueryQuery = { readonly allMarkdownRemark: ( + +type SidebarQueryQuery = { readonly all: ( Pick - & { readonly edges: ReadonlyArray<{ readonly node: ( - Pick - & { readonly frontmatter: Maybe<( - Pick - & { url: MarkdownRemarkFrontmatter['slug'], yyyymmdd: MarkdownRemarkFrontmatter['date'] } - )> } - ) }> } - ) }; + & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } + ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; type tagQueryQueryVariables = Exact<{ tag: Maybe | Scalars['String']>; @@ -2766,40 +2772,21 @@ type tagQueryQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArr )> } ) }> } }; -type PagesQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -type PagesQueryQuery = { readonly allSiteFunction: { readonly nodes: ReadonlyArray> }, readonly allSitePage: { readonly nodes: ReadonlyArray> } }; - -type getAllPagesQueryVariables = Exact<{ [key: string]: never; }>; - - -type getAllPagesQuery = { readonly allSitePage: { readonly edges: ReadonlyArray<{ readonly node: Pick }> } }; - -type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; - - -type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; - -type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; - - -type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( - Pick - & { readonly frontmatter: Maybe>, readonly fields: Maybe> } - ) }> } }; - -type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( - Pick - & { url: MarkdownRemarkFrontmatter['slug'] } - )> }; - -type SidebarQueryQueryVariables = Exact<{ [key: string]: never; }>; +type PeriodQueryQueryVariables = Exact<{ + periodStartDate: Maybe; + periodEndDate: Maybe; +}>; -type SidebarQueryQuery = { readonly all: ( +type PeriodQueryQuery = { readonly allMarkdownRemark: ( Pick - & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } - ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; + & { readonly edges: ReadonlyArray<{ readonly node: ( + Pick + & { readonly frontmatter: Maybe<( + Pick + & { url: MarkdownRemarkFrontmatter['slug'], yyyymmdd: MarkdownRemarkFrontmatter['date'] } + )> } + ) }> } + ) }; } \ No newline at end of file diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 0cc6661d95..2a36fa5cb1 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import * as style from "./index.module.scss"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; const Header = ({ img = "", diff --git a/src/components/Navbar/NavItem/index.tsx b/src/components/Navbar/NavItem/index.tsx index ee3c617ed3..d7b967d4e5 100644 --- a/src/components/Navbar/NavItem/index.tsx +++ b/src/components/Navbar/NavItem/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { Link, navigate, withPrefix } from "gatsby"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import "./index.scss"; diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index fcb3b31629..12e0f0cd46 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import { navigate, withPrefix } from "gatsby"; import NavItem from "./NavItem"; diff --git a/src/components/SearchBox/index.tsx b/src/components/SearchBox/index.tsx index 4709c422f1..b06f0ddf1b 100644 --- a/src/components/SearchBox/index.tsx +++ b/src/components/SearchBox/index.tsx @@ -1,7 +1,7 @@ import React, { Component } from "react"; import { navigate, withPrefix } from "gatsby"; import "./index.scss"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import { SearchClient, SearchIndex, diff --git a/src/components/ShareBox/index.tsx b/src/components/ShareBox/index.tsx index 66879d6070..f6d04649b2 100644 --- a/src/components/ShareBox/index.tsx +++ b/src/components/ShareBox/index.tsx @@ -1,6 +1,6 @@ import React from "react"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import * as style from "./index.module.scss"; diff --git a/src/components/Sidebar/Archive/index.tsx b/src/components/Sidebar/Archive/index.tsx index 3d06ced44e..dca0df8905 100644 --- a/src/components/Sidebar/Archive/index.tsx +++ b/src/components/Sidebar/Archive/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Link, withPrefix } from "gatsby"; import * as style from "./index.module.scss"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import dayjs from "dayjs"; import { AllPost } from "../entity"; diff --git a/src/components/Sidebar/LatestPost/index.tsx b/src/components/Sidebar/LatestPost/index.tsx index 78baeaa1ad..0a0c393062 100644 --- a/src/components/Sidebar/LatestPost/index.tsx +++ b/src/components/Sidebar/LatestPost/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { Link, withPrefix } from "gatsby"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import * as style from "./index.module.scss"; export type Post = { diff --git a/src/components/Sidebar/Subscription/index.tsx b/src/components/Sidebar/Subscription/index.tsx index 7011e38ff3..c9ea9edd84 100644 --- a/src/components/Sidebar/Subscription/index.tsx +++ b/src/components/Sidebar/Subscription/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import * as style from "./index.module.scss"; diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index ac315e1e80..86e24bbf03 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { StaticQuery, graphql } from "gatsby"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import lozad from "lozad"; import Information from "./Information"; diff --git a/src/components/Tag/index.tsx b/src/components/Tag/index.tsx index 471048bae1..712c8f6392 100644 --- a/src/components/Tag/index.tsx +++ b/src/components/Tag/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import ReactGA from "react-ga"; +import ReactGA from "react-ga4"; import { Link, withPrefix } from "gatsby"; import * as style from "./index.module.scss"; From 0a33dd72fa7d95a75c06050384c0e73be4449c18 Mon Sep 17 00:00:00 2001 From: tubone24 Date: Thu, 5 May 2022 20:36:38 +0900 Subject: [PATCH 5/5] delete Raactga --- gatsby-browser.js | 1 - package-lock.json | 15 +-------------- package.json | 1 - 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/gatsby-browser.js b/gatsby-browser.js index 80d9b3d39c..b9938ada83 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -26,7 +26,6 @@ if (isLocalDevelopment() === false) { export const onRouteUpdate = (_state) => { if (isLocalDevelopment() !== true) { - //ReactGA.pageview(state.location.pathname); ReactGA.send("pageview"); } }; diff --git a/package-lock.json b/package-lock.json index 769d401b78..b59e53e612 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,8 +76,7 @@ "react": "17.0.2", "react-body-classname": "1.3.1", "react-dom": "17.0.2", - "react-ga": "3.3.0", - "react-ga4": "^1.4.1", + "react-ga4": "1.4.1", "react-helmet": "6.1.0", "react-transition-group": "4.4.2", "rimraf": "3.0.2", @@ -52428,14 +52427,6 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/react-ga": { - "version": "3.3.0", - "license": "Apache-2.0", - "peerDependencies": { - "prop-types": "^15.6.0", - "react": "^15.6.2 || ^16.0 || ^17" - } - }, "node_modules/react-ga4": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-1.4.1.tgz", @@ -95706,10 +95697,6 @@ "use-sidecar": "^1.0.5" } }, - "react-ga": { - "version": "3.3.0", - "requires": {} - }, "react-ga4": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-1.4.1.tgz", diff --git a/package.json b/package.json index 802ee18fb1..f487d80239 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ "react": "17.0.2", "react-body-classname": "1.3.1", "react-dom": "17.0.2", - "react-ga": "3.3.0", "react-ga4": "1.4.1", "react-helmet": "6.1.0", "react-transition-group": "4.4.2",