Skip to content

Examples Hub#179

Merged
mathieu-benoit merged 41 commits intomainfrom
score-example-hub
Jul 1, 2025
Merged

Examples Hub#179
mathieu-benoit merged 41 commits intomainfrom
score-example-hub

Conversation

@TobiasBabin
Copy link
Copy Markdown
Contributor

Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.

What is the motivation?

These changes will introduce a "Score example hub" to help users of Score find ready-to-use examples already available in other Score repos like the Score examples more easily and at a central place.

This PR covers the first iteration of the example hub to integrate examples for core Score usage. Future PRs will add Resource provisioners and Patch templates.

What does this change do?

This change

  • Adds a Git-based integration of the relevant Score repositories into the directory structure of the present repo
  • Adds GitHub automation to periodically update this content
  • Adds tooling to generate interactive pages to browse, filter, and consume example content
  • Adds GitHub automation to periodically update these pages based on updated external repo content

What is your testing strategy?

  • Create and run the entire Hugo site locally including the newly generated example hub.
  • Have the GitHub automation run on the underlying branch. We can switch it to run on main only before merging.

Is this related to any issues?

No.

Have you read the Contributing Guidelines?

…t 928f47e

git-subtree-dir: gen/external-repos/score-spec/examples
git-subtree-split: 928f47e08f163943f7ba153938b64513a781e237
@TobiasBabin TobiasBabin marked this pull request as draft May 16, 2025 08:34
…tent

Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
TobiasBabin and others added 18 commits May 16, 2025 10:42
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
…ent from commit 6a20bf3

git-subtree-dir: gen/external-repos/score-spec/community-provisioners
git-subtree-split: 6a20bf34acc2a7dcaf261357f2ff781f2054b3c0
…nal-repos/score-spec/community-provisioners'

Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
@mathieu-benoit mathieu-benoit self-requested a review June 9, 2025 18:48
@mathieu-benoit
Copy link
Copy Markdown
Contributor

Great stuff in there, thanks @sberoch!

Just did some tests, so sharing and capturing some screenshots here.

image image image

Copy link
Copy Markdown
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super great, thanks!

I have some comments that require some updates please, captured while I was testing this PR:

  1. yarn run dprint check was failing, I needed to fix the CI by running and commiting yarn fmt here 99b825d, is it something that could be fixed in the script generating these files?

  2. When running yarn run hugo server, we are getting this new warning WARN calling IsSet with unsupported type "invalid" (<nil>) will always return false., could we fix this?

  3. I'm seeing a new behavior when opening the website, in the navigation panel on the left, all the menu items are expanded by default, it was not the case before. Only the one with the focus, when we click on it, was expanded. Is that on-purpose or could we get back to the previous behavior?

  4. When clicking on Service under the Resources section and not the Specification section, it's actually showing the Service from the Specification section:

image
  1. Apparently some of the info and actions in the header were lost? See in this screenshot where we see the 4 min read and all the actions on the top right corner (View page source, Edit this page`, etc.), could we have them back please?
image
  1. Apparently some of the info in the footer were lost too? See in this screenshot where we see the Last modified June 4, 2025... and the email, twitter, github, slack icons:
image
  1. For any Score file when clicking on (view on GitHub) we are getting a 404 because landing to https://github.com/score-spec/examples/blob/main/score/specification/ instead of https://github.com/score-spec/examples/blob/main/specification/

  2. The style around the tabs seems bit different from what we have today (round corner, tab selected with pink border), could we be consistent here and have the same style as before? See here:

image
  1. I'm seeing a styling issue on this page, seeing this now (grey + link, but text not visible):
image

@TobiasBabin
Copy link
Copy Markdown
Contributor Author

Awesome @sberoch , thanks a lot! I also tested the pages and found just these items to look at, adding on to @mathieu-benoit 's findings.

All test URLs referring to running the site locally.

  1. Following up on item 4. in @mathieu-benoit 's comment:

I actually cannot reproduce it, works as expected in my local site.

  • When I select "Specification - Service", I get the "Specification" example
  • When I select "Resources - Service", I get the "Resources" example
  • When I select both, I get nothing, which is expected

@mathieu-benoit Can you double-check

  1. README display for community provisioners

This example correctly shows the example files in the score-compose and score-k8s tabs. It does not yet show the READMEs because we have not added them yet to the sources. They will be located at

  • /examples/score/community-provisioners/score-compose.md
  • /examples/score/community-provisioners/score-k8s.md

If I temporarily add them here manually and re-generate the site, they are displayed, but then the examples files are not shown anymore.

Desired state: the README content plus the example files are shown.
See this section in the FigJam spec board.

  1. Search bar not shown in example section

Can we have the search bar while in the examples section? It is currently not shown.

image

  1. Nit: When using the new top menu to switch between "Documentation" and "Examples", do not open a new tab.

  2. Nit: Keep "Examples" highlighted in the top menu when browsing the examples, not just on the /examples landing page

sberoch added 3 commits June 24, 2025 19:19
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
@sberoch sberoch force-pushed the score-example-hub branch from b594e69 to 4b8ab19 Compare June 26, 2025 19:04
@TobiasBabin
Copy link
Copy Markdown
Contributor Author

Thanks @sberoch ! I Re-tested all items we mentioned and found them working 🚀 with just one exception to go:

  1. Search bar not shown in example section

Can we have the search bar while in the examples section? It is currently not shown.

image

Hint: A quick check shows that the relevant element from head-end.html is present on the page when in the examples section, but it won't render the search box. Maybe that helps, I'm not enough of a CSS buff to quickly see more.

sberoch and others added 7 commits June 27, 2025 10:07
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
@TobiasBabin
Copy link
Copy Markdown
Contributor Author

Hi @sberoch, apologies for an oversight on my end: for this item, the social icons are back but the "Last modified" GitInfo is not.

  1. Apparently some of the info in the footer were lost too? See in this screenshot where we see the Last modified June 4, 2025... and the email, twitter, github, slack icons:
image

The behavior is a little weird - the parameter enableGitInfo = true continues to be set in config.toml but when I run the site locally, the info will only render if I also pass the hugo server --enableGitInfo flag 🤔 We could add this flag to these calls but it affects a number of hugo command calls throughout package.json as well as the GitHub workflows, and it really should not be required.

Do you have an idea why it stopped working?

sberoch and others added 2 commits June 30, 2025 14:20
Signed-off-by: Santiago Beroch <sberoch@gmail.com>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
@TobiasBabin TobiasBabin marked this pull request as ready for review July 1, 2025 10:10
TobiasBabin and others added 7 commits July 1, 2025 12:41
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
Signed-off-by: Tobias Babin <tobias.babin@humanitec.com>
@mathieu-benoit mathieu-benoit changed the title Score example hub Examples Hub Jul 1, 2025
Copy link
Copy Markdown
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mathieu-benoit mathieu-benoit merged commit 03fe6ed into main Jul 1, 2025
6 checks passed
@mathieu-benoit mathieu-benoit deleted the score-example-hub branch July 1, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants