From 85d9c072d644ab7ccd005582ff2f6a4aac5989a7 Mon Sep 17 00:00:00 2001
From: Jason Chen <118808544+n1cogrv@users.noreply.github.com>
Date: Fri, 17 May 2024 16:38:48 +0000
Subject: [PATCH] [SEO] Optimization for Google Search Console
Add valid `robots.txt` and configure disallowing rules for static
docx and pdf files.
Optimize `logo.svg` file size.
Add Google Search Console HTML verification method file.
---
docusaurus.config.js | 23 +++++++++++++++++++++++
static/google5105d0fb31cae7b3.html | 1 +
static/img/logo.svg | 2 +-
static/robots.txt | 5 +++++
4 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 static/google5105d0fb31cae7b3.html
create mode 100644 static/robots.txt
diff --git a/docusaurus.config.js b/docusaurus.config.js
index ef16f14..c226850 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -177,8 +177,31 @@ const config = {
// textColor: '#091E42',
isCloseable: true,
},
+ metadata: [
+ {
+ name: 'keywords',
+ content: 'IPKB, ipkb, 知产智库, 知识产权, 专利法, patent law china, intellectual property knowledge base',
+ },
+ ],
}),
+ headTags: [
+ {
+ tagName: 'script',
+ attributes: {
+ type: 'application/ld+json',
+ },
+ innerHTML: JSON.stringify({
+ '@context': 'https://schema.org/',
+ '@type': 'Organization',
+ name: 'Intellectual Property Knowledge Base',
+ url: 'https://ipkb.jasonchen.icu/',
+ logo: 'https://ipkb.jasonchen.icu/img/logo.svg',
+ maintainer: 'Jason Chen',
+ }),
+ }
+ ],
+
plugins: [
[
'@docusaurus/plugin-pwa',
diff --git a/static/google5105d0fb31cae7b3.html b/static/google5105d0fb31cae7b3.html
new file mode 100644
index 0000000..fc611b8
--- /dev/null
+++ b/static/google5105d0fb31cae7b3.html
@@ -0,0 +1 @@
+google-site-verification: google5105d0fb31cae7b3.html
\ No newline at end of file
diff --git a/static/img/logo.svg b/static/img/logo.svg
index bca94e1..0ddf323 100644
--- a/static/img/logo.svg
+++ b/static/img/logo.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/static/robots.txt b/static/robots.txt
new file mode 100644
index 0000000..a52ba3c
--- /dev/null
+++ b/static/robots.txt
@@ -0,0 +1,5 @@
+User-agent: *
+Disallow: /search/
+Disallow: /*.docx$
+Disallow: /*.pdf$
+Disallow: /*.doc$
\ No newline at end of file