Skip to content

Commit 86fa533

Browse files
committed
Add guides link in with metadata and rephrase docs link in main body.
1 parent 80e484e commit 86fa533

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

src/templates/extension-detail.js

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const ExtensionDetailTemplate = ({
217217
const sponsors = metadata?.sponsors || metadata?.sponsor || metadata.sourceControl?.sponsors
218218

219219
const extensionCount = metadata?.sourceControl?.repository?.extensionCount
220-
220+
const guideDescription = metadata.guide?.includes("quarkus.io/") ? "quarkus.io/guides" : metadata.guide?.includes("docs.quarkiverse.io/") || metadata.guide?.includes("https://quarkiverse.github.io/quarkiverse-docs/") ? "docs.quarkiverse.io" : metadata.guide?.includes("README.md") ? "readme" : metadata.guide?.includes(".") ? "docs" : null
221221
const alongWith = extensionCount > 1 ? `, along with ${extensionCount} other extensions,` : ""
222222

223223
return (
@@ -257,11 +257,11 @@ const ExtensionDetailTemplate = ({
257257
{metadata.guide && (
258258
<DocumentationSection>
259259
<DocumentationHeading>Guides</DocumentationHeading>
260-
Make sure to use the extension's{" "}
260+
This extension has a{" "}
261261
<VisibleLink href={metadata.guide}>
262-
documentation
262+
guide
263263
</VisibleLink>{" "}
264-
to get your questions answered.
264+
to get you going.
265265
</DocumentationSection>
266266
)}
267267
<DocumentationSection>
@@ -365,6 +365,20 @@ const ExtensionDetailTemplate = ({
365365
text: metadata.maven?.artifactId,
366366
}}
367367
/>
368+
<ExtensionMetadata
369+
data={{
370+
name: "Guide",
371+
text: guideDescription,
372+
url: metadata.guide,
373+
}}
374+
/>
375+
<ExtensionMetadata
376+
data={{
377+
name: "Javadoc",
378+
text: metadata.javadoc?.url ? "javadoc.io" : null, // Slight workaround to make sure we don't display the field if the url is null
379+
url: metadata.javadoc?.url,
380+
}}
381+
/>
368382
<ExtensionMetadata
369383
data={{
370384
name: "Built with",
@@ -409,21 +423,6 @@ const ExtensionDetailTemplate = ({
409423
: qualifiedPrettyPlatform(element),
410424
}}
411425
/>
412-
<ExtensionMetadata
413-
data={{
414-
name: "Minimum Java version",
415-
fieldName: "minimumJavaVersion",
416-
metadata,
417-
}}
418-
/>
419-
420-
<ExtensionMetadata
421-
data={{
422-
name: "Javadoc",
423-
text: metadata.javadoc?.url ? "javadoc.io" : null, // Slight workaround to make sure we don't display the field if the url is null
424-
url: metadata.javadoc?.url,
425-
}}
426-
/>
427426
<ExtensionMetadata
428427
data={{
429428
name: "Sponsor",
@@ -470,7 +469,13 @@ const ExtensionDetailTemplate = ({
470469
url: extension.metadata?.sourceControl?.issuesUrl,
471470
}}
472471
/>
473-
472+
<ExtensionMetadata
473+
data={{
474+
name: "Minimum Java version",
475+
fieldName: "minimumJavaVersion",
476+
metadata,
477+
}}
478+
/>
474479
<ClosingRule />
475480

476481
<AuthorGuidance>

test-integration/detail-page.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe("an extension details page", () => {
5252

5353
it("should have a link to the documentation", async () => {
5454
await expect(
55-
page.waitForSelector(`xpath///*[contains(text(), "documentation")]`)
55+
page.waitForSelector(`xpath///*[contains(text(), "guide")]`)
5656
).resolves.toBeTruthy()
5757
})
5858

0 commit comments

Comments
 (0)