Skip to content

Commit

Permalink
feat(site/blog): prohibit gatsby seo crawl
Browse files Browse the repository at this point in the history
  • Loading branch information
qhanw committed Jan 30, 2024
1 parent 1f70d5c commit 61fb8f1
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ jobs:
external_repository: gh-static-websites/blog
publish_branch: main
publish_dir: ./site/blog-gatsby/public
cname: me.qhan.wang
cname: gatsby.qhan.wang

8 changes: 8 additions & 0 deletions site/blog-gatsby/gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ const config: GatsbyConfig = {
],
},
},
{
resolve: "gatsby-plugin-robots-txt",
options: {
host: "https://gatsby.qhan.wang",
sitemap: "https://gatsby.qhan.wang/sitemap.xml",
policy: [{ userAgent: "*", disallow: "/" }],
},
},
],
};

Expand Down
1 change: 1 addition & 0 deletions site/blog-gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"gatsby-plugin-manifest": "^5.8.0",
"gatsby-plugin-mdx": "^5.8.0",
"gatsby-plugin-offline": "^6.8.0",
"gatsby-plugin-robots-txt": "^1.8.0",
"gatsby-plugin-sharp": "^5.8.1",
"gatsby-plugin-sitemap": "^6.8.0",
"gatsby-remark-prismjs": "^7.8.0",
Expand Down
Loading

0 comments on commit 61fb8f1

Please sign in to comment.