Skip to content

Commit

Permalink
Fix: Link path for Publication fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
highjun committed Oct 8, 2024
1 parent c9a32c5 commit eccbc77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/publications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const publications: {
date,
published: true,
supplementary: {
paper: fs.existsSync(`public/publications/papers/${key}.pdf`) ? `${key}.pdf` : undefined,
slide: fs.existsSync(`public/publications/slides/${key}.pdf`) ? `${key}.pdf` : undefined,
paper: fs.existsSync(`public/publications/papers/${key}.pdf`) ? `/publications/papers/${key}.pdf` : undefined,
slide: fs.existsSync(`public/publications/slides/${key}.pdf`) ? `/publications/slides/${key}.pdf` : undefined,
video: supplementaries[key]?.video,
code: supplementaries[key]?.code,
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/publications/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Publication: React.FC<PublicationInfo> = (publication) => {
<p className="italic text-base leading-7 text-gray-600 dark:text-gray-300">{publication.venue + (publication.published ? "" : " (To be appear)")}</p>
<div className="flex mt-1">
{[[publication.supplementary.paper, "paper", "blue"],
[publication.supplementary.video, "slide", "yellow"],
[publication.supplementary.slide, "slide", "yellow"],
[publication.supplementary.code, "code", "gray"],
[publication.supplementary.video, "video", "red"]].map(([link, type, color]) => (
link && <Link href={link} newpage key={type} className={`bg-${color}-100 text-${color}-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded dark:bg-${color}-900 dark:text-${color}-300`}>
Expand Down

0 comments on commit eccbc77

Please sign in to comment.