Skip to content

Commit 629715c

Browse files
brunoborgesCopilot
andcommitted
Add Related Documentation section with links to Javadoc and Oracle docs
- Add 'docs' field to all 90 JSON files with curated links to Javadoc API references, JEP pages, and Oracle documentation - All 112 unique URLs validated (no 404s) - Create templates/doc-link.html for rendering doc links - Add 'Related Documentation' section to slug template - Add .docs-links and .doc-link CSS styling - Update both Java and Python generators - Update copilot-instructions.md schema - Rebuild fat JAR Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f1445e8 commit 629715c

File tree

97 files changed

+846
-22
lines changed

Some content is hidden

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

97 files changed

+846
-22
lines changed

.github/copilot-instructions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ Each `content/category/slug.json` file has this structure:
8282
"category/slug-1",
8383
"category/slug-2",
8484
"category/slug-3"
85+
],
86+
"docs": [
87+
{ "title": "Javadoc or Guide Title", "href": "https://docs.oracle.com/..." }
8588
]
8689
}
8790
```
@@ -92,6 +95,7 @@ Each `content/category/slug.json` file has this structure:
9295
- `category` must match the parent folder name
9396
- `whyModernWins` must have exactly **3** entries
9497
- `related` must have exactly **3** entries (as `category/slug` paths)
98+
- `docs` must have at least **1** entry linking to Javadoc or Oracle documentation
9599
- `prev`/`next` are `category/slug` paths or `null` for first/last
96100
- Code in `oldCode`/`modernCode` uses `\n` for newlines
97101

content/collections/collectors-teeing.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@
4040
"collections/copying-collections-immutably",
4141
"collections/unmodifiable-collectors",
4242
"collections/stream-toarray-typed"
43+
],
44+
"docs": [
45+
{
46+
"title": "Collectors.teeing()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/Collectors.html#teeing(java.util.stream.Collector,java.util.stream.Collector,java.util.function.BiFunction)"
48+
}
4349
]
4450
}

content/collections/copying-collections-immutably.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@
4040
"collections/immutable-set-creation",
4141
"collections/map-entry-factory",
4242
"collections/immutable-list-creation"
43+
],
44+
"docs": [
45+
{
46+
"title": "List.copyOf()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html#copyOf(java.util.Collection)"
48+
}
4349
]
4450
}

content/collections/immutable-list-creation.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,15 @@
4040
"collections/immutable-map-creation",
4141
"collections/immutable-set-creation",
4242
"collections/sequenced-collections"
43+
],
44+
"docs": [
45+
{
46+
"title": "List.of()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html#of()"
48+
},
49+
{
50+
"title": "Collections Factory Methods (JEP 269)",
51+
"href": "https://openjdk.org/jeps/269"
52+
}
4353
]
4454
}

content/collections/immutable-map-creation.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,15 @@
4040
"collections/copying-collections-immutably",
4141
"collections/sequenced-collections",
4242
"streams/stream-tolist"
43+
],
44+
"docs": [
45+
{
46+
"title": "Map.of()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html#of()"
48+
},
49+
{
50+
"title": "Map.ofEntries()",
51+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html#ofEntries(java.util.Map.Entry...)"
52+
}
4353
]
4454
}

content/collections/immutable-set-creation.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,15 @@
4040
"collections/copying-collections-immutably",
4141
"collections/collectors-teeing",
4242
"streams/stream-tolist"
43+
],
44+
"docs": [
45+
{
46+
"title": "Set.of()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html#of()"
48+
},
49+
{
50+
"title": "Collections Factory Methods (JEP 269)",
51+
"href": "https://openjdk.org/jeps/269"
52+
}
4353
]
4454
}

content/collections/map-entry-factory.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@
4040
"collections/sequenced-collections",
4141
"collections/immutable-map-creation",
4242
"collections/immutable-list-creation"
43+
],
44+
"docs": [
45+
{
46+
"title": "Map.entry()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html#entry(K,V)"
48+
}
4349
]
4450
}

content/collections/sequenced-collections.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,15 @@
4040
"collections/collectors-teeing",
4141
"collections/immutable-set-creation",
4242
"collections/immutable-map-creation"
43+
],
44+
"docs": [
45+
{
46+
"title": "Sequenced Collections (JEP 431)",
47+
"href": "https://openjdk.org/jeps/431"
48+
},
49+
{
50+
"title": "SequencedCollection",
51+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/SequencedCollection.html"
52+
}
4353
]
4454
}

content/collections/stream-toarray-typed.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@
4040
"collections/collectors-teeing",
4141
"collections/map-entry-factory",
4242
"collections/immutable-set-creation"
43+
],
44+
"docs": [
45+
{
46+
"title": "Stream.toArray()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/Stream.html#toArray(java.util.function.IntFunction)"
48+
}
4349
]
4450
}

content/collections/unmodifiable-collectors.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@
4040
"collections/immutable-map-creation",
4141
"collections/immutable-set-creation",
4242
"collections/map-entry-factory"
43+
],
44+
"docs": [
45+
{
46+
"title": "Collectors.toUnmodifiableList()",
47+
"href": "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/Collectors.html#toUnmodifiableList()"
48+
}
4349
]
4450
}

0 commit comments

Comments
 (0)