Skip to content

Commit 55e6f32

Browse files
committed
Tweak schema
1 parent 4f1c068 commit 55e6f32

2 files changed

Lines changed: 52 additions & 7 deletions

File tree

index.html

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@
1010
<link rel="image_src" href="https://s2v.app/static/preview.jpg">
1111
<link rel="preload" href="static/Manrope.woff2" as="font" type="font/woff2" crossorigin>
1212
<link rel="preconnect" href="https://api.github.com">
13-
<link rel="stylesheet" href="static/style.css?v=1759795200">
14-
<script src="static/main.js?v=1759017600" defer></script>
15-
<meta name="description" content="A powerful tool that allows you to browse VPK archives, view, extract, and decompile Source 2 assets, including maps, models, materials, textures, sounds, and more.">
16-
<meta property="og:description" content="A powerful tool that allows you to browse VPK archives, view, extract, and decompile Source 2 assets, including maps, models, materials, textures, sounds, and more.">
13+
<link rel="stylesheet" href="static/style.css?v=1760691590">
14+
<script src="static/main.js?v=1760691590" defer></script>
15+
<meta name="description" content="Browse VPK archives, view, extract, and decompile Source 2 assets. Supports CS2, Dota 2, Deadlock, Half-Life: Alyx, and more.">
16+
<meta property="og:description" content="Browse VPK archives, view, extract, and decompile Source 2 assets. Supports CS2, Dota 2, Deadlock, Half-Life: Alyx, and more.">
17+
<meta property="og:url" content="https://s2v.app/">
1718
<meta property="og:image" content="https://s2v.app/static/preview.jpg">
19+
<meta property="og:logo" content="https://s2v.app/static/logo.png">
1820
<meta property="og:title" content="Source 2 Viewer &amp; Decompiler">
21+
<meta property="og:site_name" content="Source 2 Viewer">
22+
<meta property="og:type" content="website">
23+
<meta property="og:locale" content="en">
1924
<meta property="twitter:card" content="summary_large_image">
2025
<link rel="icon" href="favicon.ico" sizes="16x16 24x24 32x32 48x48 72x72 256x256">
2126
<link rel="icon" href="static/logo.png" sizes="512x512">
@@ -36,10 +41,41 @@
3641
"price": "0",
3742
"priceCurrency": "USD"
3843
},
44+
"review": {
45+
"@type": "Review",
46+
"author": {
47+
"@type": "Organization",
48+
"name": "GitHub Community"
49+
},
50+
"reviewRating": {
51+
"@type": "Rating",
52+
"ratingValue": 1500,
53+
"bestRating": 1500,
54+
"worstRating": 0
55+
}
56+
},
3957
"downloadUrl": "https://github.com/ValveResourceFormat/ValveResourceFormat/releases",
4058
"releaseNotes": "https://github.com/ValveResourceFormat/ValveResourceFormat/releases",
41-
"screenshot": "https://s2v.app/static/screen_map.png",
42-
"image": "https://s2v.app/static/preview.jpg"
59+
"screenshot": [
60+
"https://s2v.app/static/screen_map.png",
61+
"https://s2v.app/static/screen_package.png",
62+
"https://s2v.app/static/screen_texture.png",
63+
"https://s2v.app/static/screen_cli.png"
64+
],
65+
"image": "https://s2v.app/static/preview.jpg",
66+
"license": "https://github.com/ValveResourceFormat/ValveResourceFormat/blob/master/LICENSE",
67+
"softwareHelp": "https://github.com/ValveResourceFormat/ValveResourceFormat/issues",
68+
"softwareRequirements": "Windows 11, OpenGL 4.6",
69+
"author": {
70+
"@type": "Organization",
71+
"name": "ValveResourceFormat Contributors",
72+
"url": "https://github.com/ValveResourceFormat/ValveResourceFormat/graphs/contributors"
73+
},
74+
"publisher": {
75+
"@type": "Organization",
76+
"name": "ValveResourceFormat Contributors",
77+
"url": "https://github.com/ValveResourceFormat/ValveResourceFormat/graphs/contributors"
78+
}
4379
}
4480
</script>
4581
</head>

static/main.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ fetch('https://api.github.com/repositories/42366054')
77
return response.json();
88
})
99
.then((response) => {
10+
const stars = response.stargazers_count;
1011
const starsCount = document.getElementById('js-stars-count');
1112
const formatter = new Intl.NumberFormat('en', { notation: 'compact' });
12-
starsCount.textContent = formatter.format(response.stargazers_count);
13+
starsCount.textContent = formatter.format(stars);
14+
15+
const schemaScript = document.querySelector(
16+
'script[type="application/ld+json"]',
17+
);
18+
const schema = JSON.parse(schemaScript.textContent);
19+
schema.review.reviewRating.ratingValue = stars;
20+
schema.review.reviewRating.bestRating = stars;
21+
schemaScript.textContent = JSON.stringify(schema);
1322
});
1423

1524
fetch('https://api.github.com/repositories/42366054/releases?per_page=5', {

0 commit comments

Comments
 (0)