Skip to content

Commit d7a3c4b

Browse files
committed
SEO Optimization for selection.index - Added meta tags, JSON-LD, sitemap, robots.txt, and verification
1 parent 2ae08f9 commit d7a3c4b

17 files changed

Lines changed: 1211 additions & 2 deletions

_pkgdown.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,72 @@
11
url: https://zankrut20.github.io/selection.index/
2+
3+
lang: en
4+
5+
home:
6+
title: "selection.index — R Package for Multi-Trait Selection Indices in Plant Breeding"
7+
description: >
8+
selection.index is a production-ready R package for plant breeders and
9+
quantitative geneticists. Compute classical phenotypic, genomic,
10+
marker-assisted, restricted, constrained, and eigen selection indices.
11+
Maximize genetic advance with multi-trait LPSI, LGSI, LMSI, and stochastic
12+
simulation tools based on economic weights and heritability estimates.
13+
14+
repo:
15+
url:
16+
home: https://github.com/zankrut20/selection.index
17+
source: https://github.com/zankrut20/selection.index/blob/master/
18+
issue: https://github.com/zankrut20/selection.index/issues/
19+
user: https://github.com/
20+
221
template:
322
bootstrap: 5
423
bslib:
524
preset: darkly
625
light-switch: true
26+
includes:
27+
in_header: pkgdown/includes/in_header.html
28+
params:
29+
ganalytics: ~
30+
31+
navbar:
32+
title: "selection.index"
33+
left:
34+
- text: Reference
35+
href: reference/index.html
36+
- text: Articles
37+
menu:
38+
- text: Getting Started
39+
href: articles/getting-started.html
40+
- text: Linear Phenotypic Selection Index
41+
href: articles/linear-phenotypic-selection-index.html
42+
- text: Constrained Linear Phenotypic Indices
43+
href: articles/constrained-linear-phenotypic-selection-indices.html
44+
- text: Linear Marker Selection Indices
45+
href: articles/linear-marker-selection-indices.html
46+
- text: Linear Genomic Selection Indices
47+
href: articles/linear-genomic-selection-indices.html
48+
- text: Constrained Linear Genomic Indices
49+
href: articles/constrained-linear-genomic-selection-indices.html
50+
- text: Phenotypic Eigen Selection Index Methods
51+
href: articles/linear-phenotypic-eigen-selection-index-methods.html
52+
- text: Genomic Eigen Selection Index Methods
53+
href: articles/linear-genomic-eigen-selection-index-methods.html
54+
- text: Multistage Linear Selection Indices
55+
href: articles/multistage-linear-selection-indices.html
56+
- text: Stochastic Simulation of Phenotypic Indices
57+
href: articles/stochastic-simulation-linear-phenotypic-indices.html
58+
- text: Changelog
59+
href: news/index.html
60+
61+
footer:
62+
structure:
63+
left: developed_by
64+
right: built_with
65+
components:
66+
developed_by: >
67+
Developed by [Zankrut Goyani](https://github.com/zankrut20).
68+
© 2026 Zankrut Goyani. Licensed under
69+
[GPL-3](https://www.gnu.org/licenses/gpl-3.0).
770
871
articles:
972
- title: Articles

docs/extra.js

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/* Force default dark mode if no user preference is stored. */
2+
window.addEventListener('DOMContentLoaded', function () {
3+
if (localStorage.getItem('theme') === null) {
4+
document.documentElement.setAttribute('data-bs-theme', 'dark');
5+
var darkButton = document.querySelector('[data-bs-theme-value="dark"]');
6+
if (darkButton) {
7+
// Simulate click to update button state and lightswitch.js internal state
8+
darkButton.click();
9+
// Remove it from localStorage so it doesn't force this preference later
10+
localStorage.removeItem('theme');
11+
}
12+
}
13+
14+
/* ── SEO: canonical link ─────────────────────────────────────────── */
15+
if (!document.querySelector('link[rel="canonical"]')) {
16+
var canonical = document.createElement('link');
17+
canonical.rel = 'canonical';
18+
canonical.href = window.location.href.split('?')[0].split('#')[0];
19+
document.head.appendChild(canonical);
20+
}
21+
22+
/* ── SEO: meta keywords ──────────────────────────────────────────── */
23+
if (!document.querySelector('meta[name="keywords"]')) {
24+
var kw = document.createElement('meta');
25+
kw.name = 'keywords';
26+
kw.content = [
27+
'selection index', 'plant breeding', 'quantitative genetics',
28+
'R package', 'CRAN', 'genomic selection', 'marker-assisted selection',
29+
'genetic advance', 'phenotypic selection', 'LPSI', 'LGSI', 'LMSI',
30+
'eigen selection index', 'multistage selection', 'stochastic simulation',
31+
'heritability', 'variance-covariance matrix', 'economic weights',
32+
'breeding pipeline', 'selection.index'
33+
].join(', ');
34+
document.head.appendChild(kw);
35+
}
36+
37+
/* ── SEO: Open Graph type (pkgdown sets title/desc, we fix type) ─── */
38+
var ogType = document.querySelector('meta[property="og:type"]');
39+
if (!ogType) {
40+
var meta = document.createElement('meta');
41+
meta.setAttribute('property', 'og:type');
42+
meta.content = 'website';
43+
document.head.appendChild(meta);
44+
}
45+
46+
/* ── SEO: Twitter Card tags ──────────────────────────────────────── */
47+
var twitterCard = document.querySelector('meta[name="twitter:card"]');
48+
if (!twitterCard) {
49+
[
50+
{ name: 'twitter:card', content: 'summary' },
51+
{ name: 'twitter:title', content: document.title },
52+
{ name: 'twitter:description', content: (document.querySelector('meta[name="description"]') || {}).content || '' },
53+
{ name: 'twitter:site', content: '@zankrut20' }
54+
].forEach(function (attrs) {
55+
var m = document.createElement('meta');
56+
m.name = attrs.name;
57+
m.content = attrs.content;
58+
document.head.appendChild(m);
59+
});
60+
}
61+
62+
/* ── SEO: JSON-LD SoftwareApplication structured data ────────────── */
63+
if (!document.querySelector('script[type="application/ld+json"]')) {
64+
var schema = {
65+
'@context': 'https://schema.org',
66+
'@type': 'SoftwareApplication',
67+
'name': 'selection.index',
68+
'alternateName': 'selection.index R Package',
69+
'description': 'A production-ready R package for plant breeders and quantitative geneticists to compute classical phenotypic, genomic, marker-assisted, restricted, constrained, and eigen selection indices. Maximizes genetic advance with multi-trait LPSI, LGSI, LMSI, and stochastic simulation tools.',
70+
'applicationCategory': 'ScientificApplication',
71+
'applicationSubCategory': 'Plant Breeding & Quantitative Genetics',
72+
'operatingSystem': 'Windows, macOS, Linux',
73+
'programmingLanguage': 'R',
74+
'softwareVersion': '2.0.1',
75+
'dateModified': '2026-03-06',
76+
'license': 'https://www.gnu.org/licenses/gpl-3.0',
77+
'url': 'https://zankrut20.github.io/selection.index/',
78+
'downloadUrl': 'https://cran.r-project.org/package=selection.index',
79+
'installUrl': 'https://cran.r-project.org/package=selection.index',
80+
'author': {
81+
'@type': 'Person',
82+
'name': 'Zankrut Goyani',
83+
'email': 'zankrut20@gmail.com',
84+
'url': 'https://github.com/zankrut20'
85+
},
86+
'maintainer': {
87+
'@type': 'Person',
88+
'name': 'Zankrut Goyani',
89+
'email': 'zankrut20@gmail.com'
90+
},
91+
'publisher': {
92+
'@type': 'Person',
93+
'name': 'Zankrut Goyani'
94+
},
95+
'sameAs': [
96+
'https://github.com/zankrut20/selection.index',
97+
'https://cran.r-project.org/package=selection.index',
98+
'https://cloud.r-project.org/package=selection.index'
99+
],
100+
'offers': {
101+
'@type': 'Offer',
102+
'price': '0',
103+
'priceCurrency': 'USD'
104+
},
105+
'keywords': [
106+
'selection index', 'plant breeding', 'quantitative genetics',
107+
'genomic selection', 'marker-assisted selection', 'LPSI', 'LGSI',
108+
'eigen selection index', 'multistage selection', 'stochastic simulation',
109+
'genetic advance', 'heritability', 'R package'
110+
]
111+
};
112+
var ld = document.createElement('script');
113+
ld.type = 'application/ld+json';
114+
ld.textContent = JSON.stringify(schema, null, 2);
115+
document.head.appendChild(ld);
116+
}
117+
});
118+

0 commit comments

Comments
 (0)