Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
sitemap.xml を生成する
Browse files Browse the repository at this point in the history
  • Loading branch information
calmery committed Nov 10, 2020
1 parent a14e611 commit 79853d1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
environment: Production
token: ${{ secrets.GITHUB_TOKEN }}
- run: node scripts/generate-sitemap.js
- id: vercel
run: vercel -b GITHUB_RELEASE_TAG_NAME=${{ steps.tag_name.outputs.body }} -b GITHUB_REPOSITORY=$GITHUB_REPOSITORY -b GITHUB_SHA=$GITHUB_SHA --prod -t $VERCEL_TOKEN > environment-url
- if: failure()
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ yarn-error.log*

# vercel
.vercel

# Sitemap
public/sitemap.xml
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"eslint-plugin-unused-imports": "1.0.0",
"husky": "4.3.0",
"lint-staged": "10.5.1",
"nextjs-sitemap-generator": "1.1.3",
"npm-run-all": "4.1.5",
"postcss": "8.1.6",
"postcss-loader": "4.0.4",
Expand Down
2 changes: 2 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Sitemap: https://metaneno.art/sitemap.xml
7 changes: 7 additions & 0 deletions scripts/generate-sitemap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require("nextjs-sitemap-generator")({
baseUrl: "https://metaneno.art",
ignoredExtensions: ["js", "map"],
ignoredPaths: ["404"],
pagesDirectory: __dirname + "/../.next/serverless/pages",
targetDirectory: "public/",
});
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4568,6 +4568,11 @@ [email protected]:
dependencies:
buffer-from "^1.1.1"

date-fns@^2.9.0:
version "2.16.1"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.16.1.tgz#05775792c3f3331da812af253e1a935851d3834b"
integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ==

[email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
Expand Down Expand Up @@ -8045,6 +8050,13 @@ [email protected]:
optionalDependencies:
sharp "0.26.2"

[email protected]:
version "1.1.3"
resolved "https://registry.yarnpkg.com/nextjs-sitemap-generator/-/nextjs-sitemap-generator-1.1.3.tgz#600029bbeefbfa6624dcc50c1ebf4a1a26cfb6e1"
integrity sha512-CNZ9pN4FNsXvkhtU7o2yPkyxEIsjwWJxGNLTDYApRJhdtZ0FfZzPleRHFCJPdbtiMXKLdRjBlfQFkgWsoOMGrw==
dependencies:
date-fns "^2.9.0"

nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
Expand Down

0 comments on commit 79853d1

Please sign in to comment.