Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beautify example showcase site URLs #12348

Conversation

TrialDragon
Copy link
Member

Objective

The current example showcase site URLs have white-space and caps in them which looks ugly as an URL.

Fixes bevyengine/bevy-website#736

Solution

To fix this the example showcase tool now makes the category used for the site sections lowercase, separated by a hyphen rather than white-space, and without parentheses.

@rparrett rparrett requested a review from mockersf March 6, 2024 22:34
@rparrett
Copy link
Contributor

rparrett commented Mar 6, 2024

I think this requires storing a separate value for the "slugified" category. The "slugified" category is now being displayed in headers on the website:

image

Pinged François, because I'm not sure what ramifications this will have on other tools that utilize example-showcase.

Co-authored-by: Rob Parrett <[email protected]>
@mockersf
Copy link
Member

mockersf commented Mar 7, 2024

This will break all existing links to a specific example

@TrialDragon
Copy link
Member Author

This will break all existing links to a specific example

Hmm, yeah. Looking thru stuff again I'll redo this in such a way that it only impacts the website list and will have aliases for the previous URLs rather than the current... naive solution I did which impacts everything in retrospect.

@TrialDragon TrialDragon marked this pull request as draft March 8, 2024 01:47
@TrialDragon TrialDragon marked this pull request as ready for review March 8, 2024 23:28
@mnmaita mnmaita added the C-Examples An addition or correction to our examples label Mar 13, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 17, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 17, 2024
Merged via the queue into bevyengine:main with commit 0820b7f Mar 17, 2024
27 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Jul 30, 2024
…#14500)

# Objective

Fixes bevyengine/bevy-website#1558
Followup to #12348 

For the website pages extra link, it needs kebab case for the category
name and a trailing forward slash to make the link for the Bevy website
correct and not have unnecessary redirections.

## Solution

Changes the category name to kebab case for the extra link, and adds a
trailing forward slash to the link.

## Testing

I have tested these changes.

Clone my fork with the changes in `bevy-website/generate-wasm-examples/`
then `cd bevy && git switch bevy-website/1558_fix_beautify_example_links
&& cd ..` and then `./generate_wasm_examples.sh` to generate examples.

Afterwards runs `zola serve` and go to `http://127.0.0.1:1111/examples`
and hover over or inspect the cards links / anchors to see that the link
is now correct, click on any of the cards to see that there is no
redirects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example URLs are ugly
8 participants