Skip to content

Commit

Permalink
Add better solution
Browse files Browse the repository at this point in the history
  • Loading branch information
TrialDragon committed Mar 8, 2024
1 parent 2f937e3 commit 820c854
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/example-showcase/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ header_message = \"Examples (WebGL2)\"
if !to_show.wasm {
continue;
}
let category_path = root_path.join(&to_show.category);
let category_path = root_path.join(&to_show.category.replace(['(', ')'], "").replace(' ', "-").to_lowercase());

if !categories.contains_key(&to_show.category) {
let _ = fs::create_dir_all(&category_path);
Expand Down Expand Up @@ -500,6 +500,7 @@ title = \"{}\"
template = \"example{}.html\"
weight = {}
description = \"{}\"
aliases = [\"/examples{}/{}/{}\"]
[extra]
technical_name = \"{}\"
Expand All @@ -516,6 +517,12 @@ header_message = \"Examples ({})\"
},
categories.get(&to_show.category).unwrap(),
to_show.description.replace('"', "'"),
match api {
WebApi::Webgpu => "-webgpu",
WebApi::Webgl2 => "",
},
to_show.category,
&to_show.technical_name.replace('_', "-"),
&to_show.technical_name.replace('_', "-"),
match api {
WebApi::Webgpu => "-webgpu",
Expand Down

0 comments on commit 820c854

Please sign in to comment.