Skip to content

Commit

Permalink
Simplify template name util
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Nov 22, 2024
1 parent 84fa9b4 commit 26a4256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function toTemplateName({ repo, name, path }: ExampleDataWithRepo): string {
return name;
} else if (repo === 'withastro/starlight') {
// Examples in the Starlight monorepo support a shorthand syntax
return path === 'examples/basics' ? 'starlight' : `starlight/${path.replace('examples/', '')}`;
return path === 'examples/basics' ? 'starlight' : path.replace('examples/', 'starlight/');
} else {
// Other repositories require the full GitHub identifier, e.g. `username/repo/path/to/template`
return `${repo}/${path}`;
Expand Down

0 comments on commit 26a4256

Please sign in to comment.