Skip to content

Commit b8519bf

Browse files
committed
enhance example section display on EntryPage
1 parent fd9111b commit b8519bf

4 files changed

Lines changed: 28 additions & 1 deletion

File tree

catalog/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# App catalog
2+
3+
Workday-built apps, maintained by Workday. Every folder here is a complete app: open it, read its README, and deploy it to your development tenant with whatever tooling you build with.
4+
5+
This section is not open to external pull requests; CODEOWNERS requires a DevRel review on any change. Think something belongs here? Open an issue and we will take it from there.
6+
7+
Contributing your own work? That lives in [examples/](../examples/), and the [contributing guide](../CONTRIBUTING.md) covers the whole flow.

examples/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Examples
2+
3+
The community section, open to everyone. Every folder here is a self-contained example: the artifact plus an `example.json` and a README that says what it is and how to use it.
4+
5+
Add your own in minutes:
6+
7+
- `node scripts/new-example.mjs my-example-name` from the repository root
8+
- No Node? `./scripts/new-example.sh` (macOS, Linux) or `scripts\new-example.ps1` (Windows)
9+
- No tooling at all? Copy [_template/](_template/) by hand, even from the GitHub web UI
10+
11+
Fill in the two generated files, drop your artifact in, and open a pull request. The [contributing guide](../CONTRIBUTING.md) has the details, and Workday DevRel reviews every submission before merge.

scripts/validate-examples.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const checkOnly = process.argv.includes("--check");
1515

1616
const config = JSON.parse(readFileSync(join(repoRoot, "hub.config.json"), "utf8"));
1717

18-
// catalog/ holds Workday-built apps, examples/ holds community samples.
18+
// catalog/ holds Workday-built apps, examples/ holds community examples.
1919
const sections = [
2020
{ dir: "catalog", markers: "catalog", defaultSource: "workday" },
2121
{ dir: "examples", markers: "examples", defaultSource: "community" }

site/src/components/EntryPage.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ const badge = sourceLabel(example);
4848
</svg>
4949
</a>
5050
<div class="min-w-0">
51+
<p class="mb-1.5 text-xs">
52+
<a
53+
href={withBase(`?section=${example.section === "App catalog" ? "catalog" : "examples"}`)}
54+
class="font-medium text-wd-blue hover:underline"
55+
>
56+
{example.section}
57+
</a>
58+
<span class="text-neutral-400 dark:text-neutral-600"> / {example.id}</span>
59+
</p>
5160
<div class="flex flex-wrap items-center gap-3">
5261
<h1 class="text-3xl font-bold tracking-tight">{example.title}</h1>
5362
{badge === "Workday" ? (

0 commit comments

Comments
 (0)