Skip to content

Commit b0533a4

Browse files
jeremymanningclaude
andcommitted
Fix CV link to render as webpage instead of source view
- HTML files now use GitHub Pages URL (contextlab.github.io) for rendering - Other files (PDFs) continue using GitHub blob URL for viewing/download 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a748e0b commit b0533a4

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

people.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h3>We're a motley crew of science nerds united in the pursuit of understanding
7171
<div>
7272
<h3>jeremy manning | lab director</h3>
7373
<p>Jeremy is an Associate Professor of Psychological and Brain Sciences at Dartmouth and directs the Contextual Dynamics Lab. He enjoys thinking about brains, non-brain brain-related things (e.g. zombies), computers, annoying-to-solve puzzles, and cats.</p>
74-
<p>[<a href="https://github.com/ContextLab/contextlab.github.io/blob/main/documents/JRM_CV.html" target="_blank">CV</a>] [<a href="https://scholar.google.com/citations?user=hskTzvcAAAAJ&amp;hl=en" target="_blank">Google Scholar</a>]</p>
74+
<p>[<a href="https://contextlab.github.io/documents/JRM_CV.html" target="_blank">CV</a>] [<a href="https://scholar.google.com/citations?user=hskTzvcAAAAJ&amp;hl=en" target="_blank">Google Scholar</a>]</p>
7575
</div>
7676
</div>
7777
</section>

scripts/citation_utils.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
# GitHub repository URL for the project
1515
GITHUB_REPO_URL = "https://github.com/ContextLab/contextlab.github.io/blob/main"
16+
GITHUB_PAGES_URL = "https://contextlab.github.io"
1617

1718

1819
def markdown_to_html(text: str) -> str:
@@ -58,8 +59,9 @@ def resolve_link(link: str, base_path: str = "data/pdfs") -> str:
5859
"""Resolve a link to a full URL.
5960
6061
If the link is already a URL (http/https), return it as-is.
61-
If the link is a path (contains /), convert to GitHub URL.
62-
If the link is just a filename, prepend base_path and convert to GitHub URL.
62+
If the link is a local path:
63+
- HTML files use GitHub Pages URL (so they render as webpages)
64+
- Other files use GitHub blob URL (for viewing/downloading)
6365
6466
Args:
6567
link: URL or filename or path
@@ -80,12 +82,18 @@ def resolve_link(link: str, base_path: str = "data/pdfs") -> str:
8082
# Remove leading slash if present
8183
link = link.lstrip('/')
8284

83-
# If it's already a path (contains /), use it directly
85+
# Determine the full path
8486
if '/' in link:
85-
return f"{GITHUB_REPO_URL}/{link}"
87+
full_path = link
88+
else:
89+
full_path = f"{base_path}/{link}"
90+
91+
# HTML files should use GitHub Pages URL so they render as webpages
92+
if full_path.endswith('.html'):
93+
return f"{GITHUB_PAGES_URL}/{full_path}"
8694

87-
# Just a filename - prepend base path
88-
return f"{GITHUB_REPO_URL}/{base_path}/{link}"
95+
# Other files use GitHub blob URL
96+
return f"{GITHUB_REPO_URL}/{full_path}"
8997

9098

9199
def build_links_html(links: List[Tuple[str, str]], base_path: str = "data/pdfs") -> str:

0 commit comments

Comments
 (0)