Skip to content

Fix OpenAlex publication badge rendering#20

Merged
systemreliability merged 3 commits into
mainfrom
codex/fix-openalex-id-badges
May 3, 2026
Merged

Fix OpenAlex publication badge rendering#20
systemreliability merged 3 commits into
mainfrom
codex/fix-openalex-id-badges

Conversation

@systemreliability
Copy link
Copy Markdown
Owner

Summary

  • Render OpenAlex badges only when a bibliography entry has openalex_id
  • Link OpenAlex badges directly to https://openalex.org/works/{openalex_id}
  • Place OpenAlex before Dimensions and keep Altmetric zero-mention badges hidden
  • Remove the DOI-based OpenAlex injection from the publication badge script

Verification

  • bundle exec jekyll build completed with exit code 0 locally
  • Generated publications HTML shows OpenAlex before Dimensions and no OpenAlex badge for the thesis entry

Note: local ImageMagick emitted convert: command not found warnings during responsive image generation, but Jekyll completed successfully.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

Failed prettier code check. Check this file for more information.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread _layouts/bib.liquid
Comment on lines +312 to +315
{% 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 }}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@systemreliability systemreliability merged commit 3e68b4e into main May 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant