jekyll-theme-primerpages 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +65 -0
  4. data/_config.yml +149 -0
  5. data/_includes/awesome-nav-breadcrumb-trail.html +33 -0
  6. data/_includes/awesome-nav-breadcrumbs.html +51 -0
  7. data/_includes/awesome-nav-menu-tree.html +21 -0
  8. data/_includes/awesome-nav-menu.html +68 -0
  9. data/_includes/awesome-nav-sidebar.html +7 -0
  10. data/_includes/awesome-nav-tree.html +52 -0
  11. data/_includes/breadcrumbs.html +62 -0
  12. data/_includes/category_index.html +18 -0
  13. data/_includes/collection-menu.html +79 -0
  14. data/_includes/collection-sidebar.html +23 -0
  15. data/_includes/custom-colors.html +99 -0
  16. data/_includes/footer.html +13 -0
  17. data/_includes/head.html +43 -0
  18. data/_includes/header-appbar.html +53 -0
  19. data/_includes/header-sidebar.html +60 -0
  20. data/_includes/header-stacked.html +33 -0
  21. data/_includes/header-topbar.html +59 -0
  22. data/_includes/link-card.html +52 -0
  23. data/_includes/links.html +12 -0
  24. data/_includes/masthead.html +18 -0
  25. data/_includes/mini-repo-info-card.html +30 -0
  26. data/_includes/nav-overlay.html +53 -0
  27. data/_includes/nav.html +51 -0
  28. data/_includes/navbar-underline.html +51 -0
  29. data/_includes/paginator_nav.html +28 -0
  30. data/_includes/post-card.html +27 -0
  31. data/_includes/post-feature-card.html +24 -0
  32. data/_includes/post-gallery.html +52 -0
  33. data/_includes/post-index.html +35 -0
  34. data/_includes/post-tease-image-card.html +22 -0
  35. data/_includes/post-tease-text-card.html +12 -0
  36. data/_includes/post-timeline-card.html +84 -0
  37. data/_includes/post-timeline.html +31 -0
  38. data/_includes/posts.html +12 -0
  39. data/_includes/related.html +116 -0
  40. data/_includes/repo-card.html +43 -0
  41. data/_includes/repositories.html +27 -0
  42. data/_includes/resolve-versioning.html +16 -0
  43. data/_includes/social.html +390 -0
  44. data/_includes/toggle.html +4 -0
  45. data/_includes/user-metadata.html +36 -0
  46. data/_includes/version-selector.html +22 -0
  47. data/_includes/version-warning.html +15 -0
  48. data/_layouts/category_index.html +16 -0
  49. data/_layouts/category_layout.html +33 -0
  50. data/_layouts/default.html +33 -0
  51. data/_layouts/docs.html +189 -0
  52. data/_layouts/docs_index.html +32 -0
  53. data/_layouts/home.html +3 -0
  54. data/_layouts/landing.html +38 -0
  55. data/_layouts/linktree.html +36 -0
  56. data/_layouts/page.html +22 -0
  57. data/_layouts/paginate.html +16 -0
  58. data/_layouts/paginate_timeline.html +17 -0
  59. data/_layouts/post.html +136 -0
  60. data/_layouts/profile.html +48 -0
  61. data/_layouts/repositories.html +11 -0
  62. data/_layouts/tag_index.html +16 -0
  63. data/_layouts/tags.html +12 -0
  64. data/_sass/_admonitions.scss +69 -0
  65. data/_sass/_highlight-syntax.scss +96 -0
  66. data/_sass/_language-colors.scss +1443 -0
  67. data/_sass/_main.scss +274 -0
  68. data/_sass/jekyll-theme-primerpages-compat.scss +5 -0
  69. data/_sass/jekyll-theme-primerpages.scss +7 -0
  70. data/assets/css/style.scss +2 -0
  71. data/assets/css/theme.scss +16 -0
  72. data/assets/img/default.png +0 -0
  73. data/assets/img/favicon.ico +0 -0
  74. data/assets/img/social-preview.png +0 -0
  75. data/assets/img/user-image.jpg +0 -0
  76. data/assets/js/anchor-links.js +47 -0
  77. data/assets/js/mermaid.js +61 -0
  78. data/assets/js/theme-toggle.js +84 -0
  79. data/assets/js/topbar.js +19 -0
  80. data/assets/js/versioning.js +300 -0
  81. metadata +184 -0
@@ -0,0 +1,300 @@
1
+ document.addEventListener('DOMContentLoaded', function () {
2
+ var html = document.documentElement;
3
+ var selector = document.querySelector('[data-version-selector]');
4
+ var warning = document.querySelector('[data-version-warning]');
5
+
6
+ if (!selector && !warning) {
7
+ return;
8
+ }
9
+
10
+ var versioningEnabled = html.dataset.versioningEnabled === 'true';
11
+ var versionsUrl = html.dataset.versionsJson || '/versions.json';
12
+ var versioningPrefix = html.dataset.versioningPrefix || '';
13
+ var defaultAlias = normalizeKey(html.dataset.defaultDocAlias || 'latest');
14
+
15
+ if (!versioningEnabled) {
16
+ renderFallback();
17
+ return;
18
+ }
19
+
20
+ function ensureLeadingSlash(path) {
21
+ if (!path) {
22
+ return '/';
23
+ }
24
+
25
+ return path.charAt(0) === '/' ? path : '/' + path;
26
+ }
27
+
28
+ function stripTrailingSlash(path) {
29
+ if (!path || path === '/') {
30
+ return '/';
31
+ }
32
+
33
+ return path.replace(/\/+$/, '') || '/';
34
+ }
35
+
36
+ function normalizeKey(value) {
37
+ return String(value || '').trim().replace(/^\/+|\/+$/g, '');
38
+ }
39
+
40
+ function stripVersioningPrefix(path) {
41
+ var normalized = ensureLeadingSlash(path);
42
+ var normalizedPrefix = stripTrailingSlash(ensureLeadingSlash(versioningPrefix || ''));
43
+
44
+ if (!normalizedPrefix || normalizedPrefix === '/') {
45
+ return normalized;
46
+ }
47
+
48
+ if (normalized === normalizedPrefix) {
49
+ return '/';
50
+ }
51
+
52
+ if (normalized.indexOf(normalizedPrefix + '/') === 0) {
53
+ return normalized.slice(normalizedPrefix.length) || '/';
54
+ }
55
+
56
+ return normalized;
57
+ }
58
+
59
+ function normalizePath(value) {
60
+ var path = value || '/';
61
+
62
+ try {
63
+ path = new URL(path, window.location.origin).pathname;
64
+ } catch (error) {
65
+ path = String(path);
66
+ }
67
+
68
+ return stripVersioningPrefix(ensureLeadingSlash(path));
69
+ }
70
+
71
+ function versionRoot(key) {
72
+ var normalized = normalizeKey(key);
73
+ return normalized ? '/' + normalized + '/' : '/';
74
+ }
75
+
76
+ function buildHref(path) {
77
+ var normalized = normalizePath(path);
78
+ var normalizedPrefix = stripTrailingSlash(ensureLeadingSlash(versioningPrefix || ''));
79
+
80
+ if (!normalizedPrefix || normalizedPrefix === '/') {
81
+ return normalized;
82
+ }
83
+
84
+ if (normalized === '/') {
85
+ return normalizedPrefix;
86
+ }
87
+
88
+ return normalizedPrefix + normalized;
89
+ }
90
+
91
+ function joinPaths(left, right) {
92
+ var leftPath = stripTrailingSlash(normalizePath(left));
93
+ var rightPath = normalizePath(right);
94
+ var keepTrailingSlash = right === '/' || /\/$/.test(String(right || ''));
95
+
96
+ if (leftPath === '/') {
97
+ return keepTrailingSlash ? stripTrailingSlash(rightPath) + '/' : rightPath;
98
+ }
99
+
100
+ if (rightPath === '/') {
101
+ return leftPath + '/';
102
+ }
103
+
104
+ var joined = stripTrailingSlash(leftPath + '/' + rightPath.replace(/^\//, ''));
105
+ return keepTrailingSlash ? joined + '/' : joined;
106
+ }
107
+
108
+ function matchesRoot(pathname, root) {
109
+ if (root === '/') {
110
+ return pathname === '/';
111
+ }
112
+
113
+ return pathname === root.slice(0, -1) || pathname.indexOf(root) === 0;
114
+ }
115
+
116
+ function normalizeVersions(payload) {
117
+ if (!Array.isArray(payload)) {
118
+ return [];
119
+ }
120
+
121
+ var targets = [];
122
+ var seen = {};
123
+
124
+ payload.forEach(function (entry) {
125
+ if (!entry || !entry.version) {
126
+ return;
127
+ }
128
+
129
+ var version = normalizeKey(entry.version);
130
+ var title = entry.title || version;
131
+ var aliases = Array.isArray(entry.aliases) ? entry.aliases : [];
132
+ var normalizedAliases = aliases.map(normalizeKey).filter(Boolean);
133
+ var hasDefaultAlias = normalizedAliases.indexOf(defaultAlias) !== -1;
134
+
135
+ if (!version || seen[version]) {
136
+ return;
137
+ }
138
+
139
+ seen[version] = true;
140
+ targets.push({
141
+ key: version,
142
+ label: hasDefaultAlias ? title + ' (' + defaultAlias + ')' : title,
143
+ root: versionRoot(version),
144
+ version: version,
145
+ aliases: normalizedAliases
146
+ });
147
+ });
148
+
149
+ return targets;
150
+ }
151
+
152
+ function findActiveTarget(pathname, targets) {
153
+ var active = null;
154
+
155
+ targets.forEach(function (target) {
156
+ var targetRoots = [target.root].concat(target.aliases.map(versionRoot));
157
+
158
+ targetRoots.forEach(function (root) {
159
+ if (matchesRoot(pathname, root) && (!active || root.length > active.root.length)) {
160
+ active = {
161
+ key: target.key,
162
+ label: target.label,
163
+ root: root,
164
+ version: target.version,
165
+ aliases: target.aliases
166
+ };
167
+ }
168
+ });
169
+
170
+ if (matchesRoot(pathname, target.root) && (!active || target.root.length > active.root.length)) {
171
+ active = target;
172
+ }
173
+ });
174
+
175
+ if (active) {
176
+ return active;
177
+ }
178
+
179
+ return null;
180
+ }
181
+
182
+ function stripActiveRoot(pathname, activeTarget) {
183
+ if (!activeTarget || activeTarget.root === '/') {
184
+ return pathname;
185
+ }
186
+
187
+ if (!matchesRoot(pathname, activeTarget.root)) {
188
+ return pathname;
189
+ }
190
+
191
+ if (pathname === activeTarget.root.slice(0, -1)) {
192
+ return '/';
193
+ }
194
+
195
+ return pathname.slice(activeTarget.root.length - 1) || '/';
196
+ }
197
+
198
+ function findDefaultTarget(targets) {
199
+ return targets.find(function (target) {
200
+ return target.key === defaultAlias || target.aliases.indexOf(defaultAlias) !== -1;
201
+ }) || targets[0] || null;
202
+ }
203
+
204
+ function renderFallback() {
205
+ if (selector) {
206
+ selector.classList.add('d-none');
207
+ }
208
+
209
+ if (warning) {
210
+ warning.classList.add('d-none');
211
+ }
212
+ }
213
+
214
+ function updateWarning(activeTarget, defaultTarget) {
215
+ if (!warning) {
216
+ return;
217
+ }
218
+
219
+ var message = warning.dataset.versionWarningMessage || 'You are viewing a non-default version of these docs.';
220
+ var text = warning.querySelector('[data-version-warning-text]');
221
+
222
+ if (text) {
223
+ text.textContent = message;
224
+ }
225
+
226
+ if (activeTarget && defaultTarget && activeTarget.version !== defaultTarget.version) {
227
+ warning.classList.remove('d-none');
228
+ } else {
229
+ warning.classList.add('d-none');
230
+ }
231
+ }
232
+
233
+ function render(payload) {
234
+ var targets = normalizeVersions(payload);
235
+
236
+ if (!targets.length) {
237
+ renderFallback();
238
+ return;
239
+ }
240
+
241
+ var currentPath = normalizePath(window.location.pathname);
242
+ var activeTarget = findActiveTarget(currentPath, targets);
243
+ var defaultTarget = findDefaultTarget(targets);
244
+ var relativePath = stripActiveRoot(currentPath, activeTarget);
245
+ var currentSearch = window.location.search || '';
246
+ var currentHash = window.location.hash || '';
247
+
248
+ if (selector) {
249
+ var list = selector.querySelector('[data-version-options]');
250
+ var currentLabel = selector.querySelector('[data-version-current-label]');
251
+ var status = selector.querySelector('[data-version-status]');
252
+
253
+ selector.classList.remove('d-none');
254
+
255
+ if (list) {
256
+ list.innerHTML = '';
257
+
258
+ targets.forEach(function (target) {
259
+ var item = document.createElement('a');
260
+ item.className = 'SelectMenu-item';
261
+ item.setAttribute('role', 'menuitem');
262
+ item.href = buildHref(joinPaths(target.root, relativePath)) + currentSearch + currentHash;
263
+ item.textContent = target.label;
264
+
265
+ if (activeTarget && target.key === activeTarget.key) {
266
+ item.setAttribute('aria-current', 'page');
267
+ item.classList.add('text-semibold');
268
+ }
269
+
270
+ item.addEventListener('click', function () {
271
+ selector.removeAttribute('open');
272
+ });
273
+
274
+ list.appendChild(item);
275
+ });
276
+ }
277
+
278
+ if (currentLabel) {
279
+ currentLabel.textContent = activeTarget ? activeTarget.label : '';
280
+ }
281
+
282
+ if (status) {
283
+ status.textContent = targets.length + ' target' + (targets.length === 1 ? '' : 's') + ' available';
284
+ }
285
+ }
286
+
287
+ updateWarning(activeTarget, defaultTarget);
288
+ }
289
+
290
+ fetch(versionsUrl, { cache: 'no-cache' })
291
+ .then(function (response) {
292
+ if (!response.ok) {
293
+ throw new Error('Unable to load version metadata');
294
+ }
295
+
296
+ return response.json();
297
+ })
298
+ .then(render)
299
+ .catch(renderFallback);
300
+ });
metadata ADDED
@@ -0,0 +1,184 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-theme-primerpages
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.3.0
5
+ platform: ruby
6
+ authors:
7
+ - Allison Thackston
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-06-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.5'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">"
28
+ - !ruby/object:Gem::Version
29
+ version: '3.5'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: jekyll-seo-tag
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.8'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.8'
47
+ - !ruby/object:Gem::Dependency
48
+ name: jemoji
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.13'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.13'
61
+ - !ruby/object:Gem::Dependency
62
+ name: kramdown-parser-gfm
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 1.1.0
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 1.1.0
75
+ description:
76
+ email:
77
+ - allison@allisonthackston.com
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - LICENSE
83
+ - README.md
84
+ - _config.yml
85
+ - _includes/awesome-nav-breadcrumb-trail.html
86
+ - _includes/awesome-nav-breadcrumbs.html
87
+ - _includes/awesome-nav-menu-tree.html
88
+ - _includes/awesome-nav-menu.html
89
+ - _includes/awesome-nav-sidebar.html
90
+ - _includes/awesome-nav-tree.html
91
+ - _includes/breadcrumbs.html
92
+ - _includes/category_index.html
93
+ - _includes/collection-menu.html
94
+ - _includes/collection-sidebar.html
95
+ - _includes/custom-colors.html
96
+ - _includes/footer.html
97
+ - _includes/head.html
98
+ - _includes/header-appbar.html
99
+ - _includes/header-sidebar.html
100
+ - _includes/header-stacked.html
101
+ - _includes/header-topbar.html
102
+ - _includes/link-card.html
103
+ - _includes/links.html
104
+ - _includes/masthead.html
105
+ - _includes/mini-repo-info-card.html
106
+ - _includes/nav-overlay.html
107
+ - _includes/nav.html
108
+ - _includes/navbar-underline.html
109
+ - _includes/paginator_nav.html
110
+ - _includes/post-card.html
111
+ - _includes/post-feature-card.html
112
+ - _includes/post-gallery.html
113
+ - _includes/post-index.html
114
+ - _includes/post-tease-image-card.html
115
+ - _includes/post-tease-text-card.html
116
+ - _includes/post-timeline-card.html
117
+ - _includes/post-timeline.html
118
+ - _includes/posts.html
119
+ - _includes/related.html
120
+ - _includes/repo-card.html
121
+ - _includes/repositories.html
122
+ - _includes/resolve-versioning.html
123
+ - _includes/social.html
124
+ - _includes/toggle.html
125
+ - _includes/user-metadata.html
126
+ - _includes/version-selector.html
127
+ - _includes/version-warning.html
128
+ - _layouts/category_index.html
129
+ - _layouts/category_layout.html
130
+ - _layouts/default.html
131
+ - _layouts/docs.html
132
+ - _layouts/docs_index.html
133
+ - _layouts/home.html
134
+ - _layouts/landing.html
135
+ - _layouts/linktree.html
136
+ - _layouts/page.html
137
+ - _layouts/paginate.html
138
+ - _layouts/paginate_timeline.html
139
+ - _layouts/post.html
140
+ - _layouts/profile.html
141
+ - _layouts/repositories.html
142
+ - _layouts/tag_index.html
143
+ - _layouts/tags.html
144
+ - _sass/_admonitions.scss
145
+ - _sass/_highlight-syntax.scss
146
+ - _sass/_language-colors.scss
147
+ - _sass/_main.scss
148
+ - _sass/jekyll-theme-primerpages-compat.scss
149
+ - _sass/jekyll-theme-primerpages.scss
150
+ - assets/css/style.scss
151
+ - assets/css/theme.scss
152
+ - assets/img/default.png
153
+ - assets/img/favicon.ico
154
+ - assets/img/social-preview.png
155
+ - assets/img/user-image.jpg
156
+ - assets/js/anchor-links.js
157
+ - assets/js/mermaid.js
158
+ - assets/js/theme-toggle.js
159
+ - assets/js/topbar.js
160
+ - assets/js/versioning.js
161
+ homepage: https://www.primerpages.com
162
+ licenses:
163
+ - MIT
164
+ metadata: {}
165
+ post_install_message:
166
+ rdoc_options: []
167
+ require_paths:
168
+ - lib
169
+ required_ruby_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: 2.7.0
174
+ required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ requirements: []
180
+ rubygems_version: 3.5.22
181
+ signing_key:
182
+ specification_version: 4
183
+ summary: Jekyll theme built off of Github's personal website template and primer.
184
+ test_files: []