Fix OpenAlex publication badge rendering#20
Conversation
|
Failed prettier code check. Check this file for more information. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 400c804728
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {% capture openalex_api_url %}https://api.openalex.org/works/{{ entry.openalex_id }}?select=cited_by_count{% endcapture %} | ||
| <a | ||
| class="openalex-badge" | ||
| href="https://openalex.org/works/{{ entry.openalex_id }}" |
There was a problem hiding this comment.
Normalize OpenAlex IDs before composing badge URLs
The new OpenAlex badge code assumes entry.openalex_id is only the short key (for example W123...) and blindly prepends https://api.openalex.org/works/ and https://openalex.org/works/. If a bibliography entry stores the canonical OpenAlex ID format (https://openalex.org/W...), both the API URL and destination URL become malformed (double-prefixed), so the badge image and link break for that publication.
Useful? React with 👍 / 👎.
Summary
openalex_idhttps://openalex.org/works/{openalex_id}Verification
bundle exec jekyll buildcompleted with exit code 0 locallyNote: local ImageMagick emitted
convert: command not foundwarnings during responsive image generation, but Jekyll completed successfully.