Skip to content

Commit 8959ca7

Browse files
committed
feat: enhance SEO and structured data in index.html
1 parent 793f2ef commit 8959ca7

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

index.html

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,64 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" href="./src/assets/favicon.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>JSON Formatter</title>
7+
8+
<!-- SEO Meta Tags -->
9+
<title>JSON Formatter - Free Online JSON Validator, Beautifier & Minifier Tool</title>
10+
<meta name="description" content="Free online JSON formatter, validator and beautifier. Format, validate, minify JSON data with syntax highlighting. Dark/light theme support. Copy and download results instantly." />
11+
<meta name="keywords" content="JSON formatter, JSON validator, JSON beautifier, JSON minifier, online JSON tool, JSON syntax highlighter, JSON parser" />
12+
<meta name="author" content="const" />
13+
<meta name="robots" content="index, follow" />
14+
<meta name="language" content="English" />
15+
16+
<!-- Open Graph / Facebook -->
17+
<meta property="og:type" content="website" />
18+
<meta property="og:url" content="https://json.const.site/" />
19+
<meta property="og:title" content="JSON Formatter - Free Online JSON Tool" />
20+
<meta property="og:description" content="Free online JSON formatter, validator and beautifier. Format, validate, minify JSON data with syntax highlighting." />
21+
<meta property="og:image" content="https://json.const.site/assets/preview.png" />
22+
<meta property="og:site_name" content="JSON Formatter" />
23+
24+
<!-- Twitter -->
25+
<meta property="twitter:card" content="summary_large_image" />
26+
<meta property="twitter:url" content="https://json.const.site/" />
27+
<meta property="twitter:title" content="JSON Formatter - Free Online JSON Tool" />
28+
<meta property="twitter:description" content="Free online JSON formatter, validator and beautifier. Format, validate, minify JSON data with syntax highlighting." />
29+
<meta property="twitter:image" content="https://json.const.site/assets/preview.png" />
30+
31+
<!-- Canonical URL -->
32+
<link rel="canonical" href="https://json.const.site/" />
33+
34+
<!-- Structured Data -->
35+
<script type="application/ld+json">
36+
{
37+
"@context": "https://schema.org",
38+
"@type": "WebApplication",
39+
"name": "JSON Formatter",
40+
"description": "Free online JSON formatter, validator and beautifier tool",
41+
"url": "https://json.const.site/",
42+
"author": {
43+
"@type": "Person",
44+
"name": "const",
45+
"url": "https://blog.luckfunc.com"
46+
},
47+
"applicationCategory": "DeveloperApplication",
48+
"operatingSystem": "Web Browser",
49+
"offers": {
50+
"@type": "Offer",
51+
"price": "0",
52+
"priceCurrency": "USD"
53+
},
54+
"featureList": [
55+
"JSON formatting",
56+
"JSON validation",
57+
"JSON minification",
58+
"Syntax highlighting",
59+
"Copy to clipboard",
60+
"Download JSON files",
61+
"Dark/Light theme"
62+
]
63+
}
64+
</script>
865
</head>
966
<body>
1067
<div id="root"></div>

src/constants/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
declare const __BUILD_TIME__: string;
2+
13
export const DEFAULT_JSON = `{
24
"name": "JSON Formatter",
35
"version": "1.0.0",
46
"description": "A beautiful JSON formatting tool",
57
"author": "const",
68
"site": "https://json.const.site",
79
"blog": "https://blog.luckfunc.com",
10+
"updateTime": "${__BUILD_TIME__}",
811
"features": [
912
"format",
1013
"minify",

vite.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ import react from '@vitejs/plugin-react';
44
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
define: {
8+
__BUILD_TIME__: JSON.stringify(new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })),
9+
},
710
});

0 commit comments

Comments
 (0)