Skip to content

Commit a62dd53

Browse files
authored
Add metadata to index.html for search engines (#73)
- Use information from `codemeta.json` and README in codemeta/codemeta repo - Fix license in `package.json` to use "AGPL-3.0-only", based on license specified in `codemeta.json` - The JSON-LD added is for Google Rich Results. The JavaScript snippet with JSON-LD data inside passed the test on https://search.google.com/test/rich-results
1 parent 84ebc1e commit a62dd53

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed

index.html

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
<!doctype html>
22
<!--
3-
Copyright (C) 2019-2020 The Software Heritage developers
3+
Copyright (C) 2019-2025 The Software Heritage developers
44
See the AUTHORS file at the top-level directory of this distribution
55
License: GNU Affero General Public License version 3, or any later version
66
See top-level LICENSE file for more information
77
-->
88
<html lang="en">
99
<head>
1010
<meta charset="utf-8">
11+
<meta name="viewport" content="width=device-width, initial-scale=1">
12+
<meta name="description" content="CodeMeta Generator — interactive tool to create CodeMeta linked data metadata for software. You can easily declare the authorship, license, and link to other research outputs (publications, data, etc.).">
13+
<meta name="keywords" content="CodeMeta, software metadata, software citation, linked data, license, JSON, JSON-LD, codemeta, metadata generator">
14+
<meta name="author" content="Software Heritage">
15+
16+
<!-- Open Graph -->
17+
<meta property="og:title" content="CodeMeta Generator">
18+
<meta property="og:description" content="Interactive tool to create CodeMeta linked data metadata for software.">
19+
<meta property="og:url" content="https://codemeta.github.io/codemeta-generator/">
20+
<meta property="og:type" content="website">
21+
<!-- Twitter / X -->
22+
<meta name="twitter:card" content="summary">
23+
<meta name="twitter:title" content="CodeMeta Generator">
24+
<meta name="twitter:description" content="Interactive tool to create CodeMeta linked data metadata for software.">
25+
1126
<title>CodeMeta Generator</title>
1227
<script src="./js/utils.js"></script>
1328
<script src="./js/fields_data.js"></script>
@@ -16,8 +31,34 @@
1631
<script src="./js/validation/primitives.js"></script>
1732
<script src="./js/validation/things.js"></script>
1833
<script src="./js/validation/index.js"></script>
34+
<link rel="canonical" href="https://codemeta.github.io/codemeta-generator/">
1935
<link rel="stylesheet" type="text/css" href="./main.css">
2036
<link rel="stylesheet" type="text/css" href="./codemeta.css">
37+
38+
<!-- Structured data for rich results on search engines -->
39+
<!-- https://search.google.com/test/rich-results -->
40+
<script type="application/ld+json">
41+
{
42+
"@context": "https://schema.org",
43+
"@type": "SoftwareApplication",
44+
"name": "CodeMeta Generator",
45+
"url": "https://codemeta.github.io/codemeta-generator/",
46+
"codeRepository": "https://github.com/codemeta/codemeta-generator",
47+
"description": "Interactive tool to create CodeMeta linked data metadata for software.",
48+
"applicationCategory": "DeveloperTool",
49+
"operatingSystem": "Any",
50+
"runtimePlatform": "Web browser",
51+
"programmingLanguage": "JavaScript",
52+
"author": {
53+
"@type": "Organization",
54+
"name": "Software Heritage",
55+
"url": "https://www.softwareheritage.org/"
56+
},
57+
"license": "https://spdx.org/licenses/AGPL-3.0-only",
58+
"dateCreated": "2019-10-02",
59+
"softwareVersion": "3.0"
60+
}
61+
</script>
2162
</head>
2263
<body>
2364
<header>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
"devDependencies": {
1515
"cypress": "^15.3.0"
1616
},
17-
"license": "AGPL-3.0-or-later"
17+
"license": "AGPL-3.0-only"
1818
}

0 commit comments

Comments
 (0)