Skip to content

Commit 9857e9a

Browse files
brunoborgesCopilot
andcommitted
Organize HTML examples into category subfolders
Move 86 HTML example files from root into 10 category subfolders: language/, collections/, strings/, streams/, concurrency/, io/, errors/, datetime/, security/, tooling/ Update all references: - Asset paths in detail pages (styles.css → ../styles.css, etc.) - Canonical and og:url meta tags - Internal navigation links (prev/next, related tips) - Card links in index.html - Search navigation in app.js Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fef2e26 commit 9857e9a

File tree

88 files changed

+1034
-1034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1034
-1034
lines changed

app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
selectedIndex = visibleResults.length > 0 ? 0 : -1;
6969

7070
resultsContainer.innerHTML = visibleResults.map((s, i) => `
71-
<div class="search-result${i === 0 ? ' selected' : ''}" data-slug="${s.slug}">
71+
<div class="search-result${i === 0 ? ' selected' : ''}" data-slug="${s.slug}" data-category="${s.category}">
7272
<div>
7373
<div class="title">${escapeHtml(s.title)}</div>
7474
<div class="desc">${escapeHtml(s.summary)}</div>
@@ -80,7 +80,7 @@
8080
// Click handlers on results
8181
resultsContainer.querySelectorAll('.search-result').forEach(el => {
8282
el.addEventListener('click', () => {
83-
window.location.href = '/' + el.dataset.slug + '.html';
83+
window.location.href = '/' + el.dataset.category + '/' + el.dataset.slug + '.html';
8484
});
8585
});
8686
};
@@ -139,7 +139,7 @@
139139
} else if (e.key === 'Enter') {
140140
e.preventDefault();
141141
if (selectedIndex >= 0 && visibleResults[selectedIndex]) {
142-
window.location.href = '/' + visibleResults[selectedIndex].slug + '.html';
142+
window.location.href = '/' + visibleResults[selectedIndex].category + '/' + visibleResults[selectedIndex].slug + '.html';
143143
}
144144
}
145145
});
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<title>Collectors.teeing() | java.evolved</title>
77
<meta name="description" content="Compute two aggregations in a single stream pass.">
88
<meta name="robots" content="index, follow">
9-
<link rel="canonical" href="https://javaevolved.github.io/collectors-teeing.html">
10-
<link rel="stylesheet" href="styles.css">
11-
<link rel="icon" href="favicon.svg" type="image/svg+xml">
12-
<link rel="manifest" href="manifest.json">
9+
<link rel="canonical" href="https://javaevolved.github.io/collections/collectors-teeing.html">
10+
<link rel="stylesheet" href="../styles.css">
11+
<link rel="icon" href="../favicon.svg" type="image/svg+xml">
12+
<link rel="manifest" href="../manifest.json">
1313
<meta name="theme-color" content="#f97316">
1414
<meta name="mobile-web-app-capable" content="yes">
1515
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
1616
<meta name="apple-mobile-web-app-title" content="java.evolved">
1717

1818
<meta property="og:title" content="Collectors.teeing() | java.evolved">
1919
<meta property="og:description" content="Compute two aggregations in a single stream pass.">
20-
<meta property="og:url" content="https://javaevolved.github.io/collectors-teeing.html">
20+
<meta property="og:url" content="https://javaevolved.github.io/collections/collectors-teeing.html">
2121
<meta property="og:type" content="article">
2222
<meta property="og:site_name" content="java.evolved">
2323
<meta property="og:locale" content="en_US">
@@ -89,8 +89,8 @@
8989
<a href="/" class="back-link">← All patterns</a>
9090

9191
<div class="nav-arrows">
92-
<a href="/stream-tolist-shorthand.html" aria-label="Previous pattern"></a>
93-
<a href="/stream-toarray-typed.html" aria-label="Next pattern"></a>
92+
<a href="/collections/stream-tolist-shorthand.html" aria-label="Previous pattern"></a>
93+
<a href="/collections/stream-toarray-typed.html" aria-label="Next pattern"></a>
9494
</div>
9595
</div>
9696
</div>
@@ -205,7 +205,7 @@ <h2>How it works</h2>
205205
<section class="related">
206206
<h2>Related patterns</h2>
207207
<div class="related-grid">
208-
<a href="/copying-collections-immutably.html" class="tip-card">
208+
<a href="/collections/copying-collections-immutably.html" class="tip-card">
209209
<div class="tip-card-body">
210210
<div class="tip-card-header">
211211
<div class="tip-badges">
@@ -235,7 +235,7 @@ <h3>Copying collections immutably</h3>
235235
<span class="arrow-link"></span>
236236
</div>
237237
</a>
238-
<a href="/unmodifiable-collectors.html" class="tip-card">
238+
<a href="/collections/unmodifiable-collectors.html" class="tip-card">
239239
<div class="tip-card-body">
240240
<div class="tip-card-header">
241241
<div class="tip-badges">
@@ -268,7 +268,7 @@ <h3>Unmodifiable collectors</h3>
268268
<span class="arrow-link"></span>
269269
</div>
270270
</a>
271-
<a href="/stream-toarray-typed.html" class="tip-card">
271+
<a href="/collections/stream-toarray-typed.html" class="tip-card">
272272
<div class="tip-card-body">
273273
<div class="tip-card-header">
274274
<div class="tip-badges">
@@ -319,6 +319,6 @@ <h3>Typed stream toArray</h3>
319319
<p><a href="https://github.com/javaevolved/javaevolved.github.io" target="_blank" rel="noopener">View on GitHub</a></p>
320320
</footer>
321321

322-
<script src="app.js"></script>
322+
<script src="../app.js"></script>
323323
</body>
324324
</html>

copying-collections-immutably.html renamed to collections/copying-collections-immutably.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<title>Copying collections immutably | java.evolved</title>
77
<meta name="description" content="Create an immutable copy of any collection in one call.">
88
<meta name="robots" content="index, follow">
9-
<link rel="canonical" href="https://javaevolved.github.io/copying-collections-immutably.html">
10-
<link rel="stylesheet" href="styles.css">
11-
<link rel="icon" href="favicon.svg" type="image/svg+xml">
12-
<link rel="manifest" href="manifest.json">
9+
<link rel="canonical" href="https://javaevolved.github.io/collections/copying-collections-immutably.html">
10+
<link rel="stylesheet" href="../styles.css">
11+
<link rel="icon" href="../favicon.svg" type="image/svg+xml">
12+
<link rel="manifest" href="../manifest.json">
1313
<meta name="theme-color" content="#f97316">
1414
<meta name="mobile-web-app-capable" content="yes">
1515
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
1616
<meta name="apple-mobile-web-app-title" content="java.evolved">
1717

1818
<meta property="og:title" content="Copying collections immutably | java.evolved">
1919
<meta property="og:description" content="Create an immutable copy of any collection in one call.">
20-
<meta property="og:url" content="https://javaevolved.github.io/copying-collections-immutably.html">
20+
<meta property="og:url" content="https://javaevolved.github.io/collections/copying-collections-immutably.html">
2121
<meta property="og:type" content="article">
2222
<meta property="og:site_name" content="java.evolved">
2323
<meta property="og:locale" content="en_US">
@@ -89,8 +89,8 @@
8989
<a href="/" class="back-link">← All patterns</a>
9090

9191
<div class="nav-arrows">
92-
<a href="/immutable-set-creation.html" aria-label="Previous pattern"></a>
93-
<a href="/map-entry-factory.html" aria-label="Next pattern"></a>
92+
<a href="/collections/immutable-set-creation.html" aria-label="Previous pattern"></a>
93+
<a href="/collections/map-entry-factory.html" aria-label="Next pattern"></a>
9494
</div>
9595
</div>
9696
</div>
@@ -199,7 +199,7 @@ <h2>How it works</h2>
199199
<section class="related">
200200
<h2>Related patterns</h2>
201201
<div class="related-grid">
202-
<a href="/immutable-set-creation.html" class="tip-card">
202+
<a href="/collections/immutable-set-creation.html" class="tip-card">
203203
<div class="tip-card-body">
204204
<div class="tip-card-header">
205205
<div class="tip-badges">
@@ -231,7 +231,7 @@ <h3>Immutable set creation</h3>
231231
<span class="arrow-link"></span>
232232
</div>
233233
</a>
234-
<a href="/map-entry-factory.html" class="tip-card">
234+
<a href="/collections/map-entry-factory.html" class="tip-card">
235235
<div class="tip-card-body">
236236
<div class="tip-card-header">
237237
<div class="tip-badges">
@@ -260,7 +260,7 @@ <h3>Map.entry() factory</h3>
260260
<span class="arrow-link"></span>
261261
</div>
262262
</a>
263-
<a href="/immutable-list-creation.html" class="tip-card">
263+
<a href="/collections/immutable-list-creation.html" class="tip-card">
264264
<div class="tip-card-body">
265265
<div class="tip-card-header">
266266
<div class="tip-badges">
@@ -311,6 +311,6 @@ <h3>Immutable list creation</h3>
311311
<p><a href="https://github.com/javaevolved/javaevolved.github.io" target="_blank" rel="noopener">View on GitHub</a></p>
312312
</footer>
313313

314-
<script src="app.js"></script>
314+
<script src="../app.js"></script>
315315
</body>
316316
</html>
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<title>Immutable list creation | java.evolved</title>
77
<meta name="description" content="Create immutable lists in one clean expression.">
88
<meta name="robots" content="index, follow">
9-
<link rel="canonical" href="https://javaevolved.github.io/immutable-list-creation.html">
10-
<link rel="stylesheet" href="styles.css">
11-
<link rel="icon" href="favicon.svg" type="image/svg+xml">
12-
<link rel="manifest" href="manifest.json">
9+
<link rel="canonical" href="https://javaevolved.github.io/collections/immutable-list-creation.html">
10+
<link rel="stylesheet" href="../styles.css">
11+
<link rel="icon" href="../favicon.svg" type="image/svg+xml">
12+
<link rel="manifest" href="../manifest.json">
1313
<meta name="theme-color" content="#f97316">
1414
<meta name="mobile-web-app-capable" content="yes">
1515
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
1616
<meta name="apple-mobile-web-app-title" content="java.evolved">
1717

1818
<meta property="og:title" content="Immutable list creation | java.evolved">
1919
<meta property="og:description" content="Create immutable lists in one clean expression.">
20-
<meta property="og:url" content="https://javaevolved.github.io/immutable-list-creation.html">
20+
<meta property="og:url" content="https://javaevolved.github.io/collections/immutable-list-creation.html">
2121
<meta property="og:type" content="article">
2222
<meta property="og:site_name" content="java.evolved">
2323
<meta property="og:locale" content="en_US">
@@ -89,8 +89,8 @@
8989
<a href="/" class="back-link">← All patterns</a>
9090

9191
<div class="nav-arrows">
92-
<a href="/exhaustive-switch.html" aria-label="Previous pattern"></a>
93-
<a href="/immutable-map-creation.html" aria-label="Next pattern"></a>
92+
<a href="/language/exhaustive-switch.html" aria-label="Previous pattern"></a>
93+
<a href="/collections/immutable-map-creation.html" aria-label="Next pattern"></a>
9494
</div>
9595
</div>
9696
</div>
@@ -201,7 +201,7 @@ <h2>How it works</h2>
201201
<section class="related">
202202
<h2>Related patterns</h2>
203203
<div class="related-grid">
204-
<a href="/immutable-map-creation.html" class="tip-card">
204+
<a href="/collections/immutable-map-creation.html" class="tip-card">
205205
<div class="tip-card-body">
206206
<div class="tip-card-header">
207207
<div class="tip-badges">
@@ -232,7 +232,7 @@ <h3>Immutable map creation</h3>
232232
<span class="arrow-link"></span>
233233
</div>
234234
</a>
235-
<a href="/immutable-set-creation.html" class="tip-card">
235+
<a href="/collections/immutable-set-creation.html" class="tip-card">
236236
<div class="tip-card-body">
237237
<div class="tip-card-header">
238238
<div class="tip-badges">
@@ -264,7 +264,7 @@ <h3>Immutable set creation</h3>
264264
<span class="arrow-link"></span>
265265
</div>
266266
</a>
267-
<a href="/sequenced-collections.html" class="tip-card">
267+
<a href="/collections/sequenced-collections.html" class="tip-card">
268268
<div class="tip-card-body">
269269
<div class="tip-card-header">
270270
<div class="tip-badges">
@@ -315,6 +315,6 @@ <h3>Sequenced collections</h3>
315315
<p><a href="https://github.com/javaevolved/javaevolved.github.io" target="_blank" rel="noopener">View on GitHub</a></p>
316316
</footer>
317317

318-
<script src="app.js"></script>
318+
<script src="../app.js"></script>
319319
</body>
320320
</html>
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<title>Immutable map creation | java.evolved</title>
77
<meta name="description" content="Create immutable maps inline without a builder.">
88
<meta name="robots" content="index, follow">
9-
<link rel="canonical" href="https://javaevolved.github.io/immutable-map-creation.html">
10-
<link rel="stylesheet" href="styles.css">
11-
<link rel="icon" href="favicon.svg" type="image/svg+xml">
12-
<link rel="manifest" href="manifest.json">
9+
<link rel="canonical" href="https://javaevolved.github.io/collections/immutable-map-creation.html">
10+
<link rel="stylesheet" href="../styles.css">
11+
<link rel="icon" href="../favicon.svg" type="image/svg+xml">
12+
<link rel="manifest" href="../manifest.json">
1313
<meta name="theme-color" content="#f97316">
1414
<meta name="mobile-web-app-capable" content="yes">
1515
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
1616
<meta name="apple-mobile-web-app-title" content="java.evolved">
1717

1818
<meta property="og:title" content="Immutable map creation | java.evolved">
1919
<meta property="og:description" content="Create immutable maps inline without a builder.">
20-
<meta property="og:url" content="https://javaevolved.github.io/immutable-map-creation.html">
20+
<meta property="og:url" content="https://javaevolved.github.io/collections/immutable-map-creation.html">
2121
<meta property="og:type" content="article">
2222
<meta property="og:site_name" content="java.evolved">
2323
<meta property="og:locale" content="en_US">
@@ -89,8 +89,8 @@
8989
<a href="/" class="back-link">← All patterns</a>
9090

9191
<div class="nav-arrows">
92-
<a href="/immutable-list-creation.html" aria-label="Previous pattern"></a>
93-
<a href="/immutable-set-creation.html" aria-label="Next pattern"></a>
92+
<a href="/collections/immutable-list-creation.html" aria-label="Previous pattern"></a>
93+
<a href="/collections/immutable-set-creation.html" aria-label="Next pattern"></a>
9494
</div>
9595
</div>
9696
</div>
@@ -200,7 +200,7 @@ <h2>How it works</h2>
200200
<section class="related">
201201
<h2>Related patterns</h2>
202202
<div class="related-grid">
203-
<a href="/copying-collections-immutably.html" class="tip-card">
203+
<a href="/collections/copying-collections-immutably.html" class="tip-card">
204204
<div class="tip-card-body">
205205
<div class="tip-card-header">
206206
<div class="tip-badges">
@@ -230,7 +230,7 @@ <h3>Copying collections immutably</h3>
230230
<span class="arrow-link"></span>
231231
</div>
232232
</a>
233-
<a href="/sequenced-collections.html" class="tip-card">
233+
<a href="/collections/sequenced-collections.html" class="tip-card">
234234
<div class="tip-card-body">
235235
<div class="tip-card-header">
236236
<div class="tip-badges">
@@ -262,7 +262,7 @@ <h3>Sequenced collections</h3>
262262
<span class="arrow-link"></span>
263263
</div>
264264
</a>
265-
<a href="/stream-tolist-shorthand.html" class="tip-card">
265+
<a href="/collections/stream-tolist-shorthand.html" class="tip-card">
266266
<div class="tip-card-body">
267267
<div class="tip-card-header">
268268
<div class="tip-badges">
@@ -311,6 +311,6 @@ <h3>Stream toList() shorthand</h3>
311311
<p><a href="https://github.com/javaevolved/javaevolved.github.io" target="_blank" rel="noopener">View on GitHub</a></p>
312312
</footer>
313313

314-
<script src="app.js"></script>
314+
<script src="../app.js"></script>
315315
</body>
316316
</html>
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<title>Immutable set creation | java.evolved</title>
77
<meta name="description" content="Create immutable sets with a single factory call.">
88
<meta name="robots" content="index, follow">
9-
<link rel="canonical" href="https://javaevolved.github.io/immutable-set-creation.html">
10-
<link rel="stylesheet" href="styles.css">
11-
<link rel="icon" href="favicon.svg" type="image/svg+xml">
12-
<link rel="manifest" href="manifest.json">
9+
<link rel="canonical" href="https://javaevolved.github.io/collections/immutable-set-creation.html">
10+
<link rel="stylesheet" href="../styles.css">
11+
<link rel="icon" href="../favicon.svg" type="image/svg+xml">
12+
<link rel="manifest" href="../manifest.json">
1313
<meta name="theme-color" content="#f97316">
1414
<meta name="mobile-web-app-capable" content="yes">
1515
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
1616
<meta name="apple-mobile-web-app-title" content="java.evolved">
1717

1818
<meta property="og:title" content="Immutable set creation | java.evolved">
1919
<meta property="og:description" content="Create immutable sets with a single factory call.">
20-
<meta property="og:url" content="https://javaevolved.github.io/immutable-set-creation.html">
20+
<meta property="og:url" content="https://javaevolved.github.io/collections/immutable-set-creation.html">
2121
<meta property="og:type" content="article">
2222
<meta property="og:site_name" content="java.evolved">
2323
<meta property="og:locale" content="en_US">
@@ -89,8 +89,8 @@
8989
<a href="/" class="back-link">← All patterns</a>
9090

9191
<div class="nav-arrows">
92-
<a href="/immutable-map-creation.html" aria-label="Previous pattern"></a>
93-
<a href="/copying-collections-immutably.html" aria-label="Next pattern"></a>
92+
<a href="/collections/immutable-map-creation.html" aria-label="Previous pattern"></a>
93+
<a href="/collections/copying-collections-immutably.html" aria-label="Next pattern"></a>
9494
</div>
9595
</div>
9696
</div>
@@ -201,7 +201,7 @@ <h2>How it works</h2>
201201
<section class="related">
202202
<h2>Related patterns</h2>
203203
<div class="related-grid">
204-
<a href="/copying-collections-immutably.html" class="tip-card">
204+
<a href="/collections/copying-collections-immutably.html" class="tip-card">
205205
<div class="tip-card-body">
206206
<div class="tip-card-header">
207207
<div class="tip-badges">
@@ -231,7 +231,7 @@ <h3>Copying collections immutably</h3>
231231
<span class="arrow-link"></span>
232232
</div>
233233
</a>
234-
<a href="/collectors-teeing.html" class="tip-card">
234+
<a href="/collections/collectors-teeing.html" class="tip-card">
235235
<div class="tip-card-body">
236236
<div class="tip-card-header">
237237
<div class="tip-badges">
@@ -267,7 +267,7 @@ <h3>Collectors.teeing()</h3>
267267
<span class="arrow-link"></span>
268268
</div>
269269
</a>
270-
<a href="/stream-tolist-shorthand.html" class="tip-card">
270+
<a href="/collections/stream-tolist-shorthand.html" class="tip-card">
271271
<div class="tip-card-body">
272272
<div class="tip-card-header">
273273
<div class="tip-badges">
@@ -316,6 +316,6 @@ <h3>Stream toList() shorthand</h3>
316316
<p><a href="https://github.com/javaevolved/javaevolved.github.io" target="_blank" rel="noopener">View on GitHub</a></p>
317317
</footer>
318318

319-
<script src="app.js"></script>
319+
<script src="../app.js"></script>
320320
</body>
321321
</html>

0 commit comments

Comments
 (0)