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

Auto-prepend / to tile URLs #996

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion static-site/content/featured-analyses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# rendered on the splash page.
# - When adding or modifying descriptions, ensure it takes up at most two lines
# when rendered on the splash page.
# - Ensure URLs start with `/`.

- name: Mpox in the DRC
description: INRB analysis of ongoing mpox clade I outbreak in the DRC
Expand Down
4 changes: 4 additions & 0 deletions static-site/src/components/splash/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ function TileSourceIcon({ url, isNarrative }: {

let maintainers: string, image: React.JSX.Element;

if (!url.startsWith('/')) {
url = '/' + url;
}

if (url.startsWith('/community')) {
const owner = isNarrative ? url.split('/')[3] : url.split('/')[2];
maintainers = `${owner} on GitHub`;
Expand Down