WP Manifestindependent plugin directory
manifest / seo / rogue-scholar-doi-sync

Rogue Scholar DOI Sync

WordPress plugin to add Rogue Scholar DOIs to posts

by Reda Sadki · github.com/redasadki/rogue-scholar-doi-sync

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/redasadki/rogue-scholar-doi-sync/archive/refs/heads/main.zip

Syncs DOIs from any Rogue Scholar–indexed blog into Yoast SEO canonical URLs for your WordPress posts, and exposes a shortcode to display the DOI.

What’s new in 1.3.0

  • Per‑post DOI sync is now asynchronous, scheduled via a single cron event, so saving/updating posts no longer waits on a remote HTTP request.
  • Shortcode [rogue_scholar_doi] now only renders when the Yoast canonical URL is a doi.org/... URL, avoiding misinterpretation of non‑DOI canonicals.

Features

  • Generic support for any Rogue Scholar InvenioRDM community (community ID configurable in settings).
  • Robust mapping using:
    • pids.doi.identifier for DOIs.
    • metadata.identifiers[scheme="url"] for original blog URLs.
    • Fallback to metadata.identifiers[scheme="guid"]wp_posts.guid for URL‑change resilience.
  • Integration with Yoast SEO:
    • Stores https://doi.org/<doi> in _yoast_wpseo_canonical.
    • Overrides Yoast’s canonical output via wpseo_canonical so canonical tags point to DOIs when present.
  • Sync modes:
    • Manual full sync (admin page).
    • Hourly incremental cron sync of newest records.
    • Asynchronous per‑post sync scheduled on save_post after publish.
  • Shortcode:
    • [rogue_scholar_doi] to display the DOI URL or bare DOI text.
  • Logging:
    • Optional logging to wp-content/debug.log (prefix [RogueScholarDOI]), when WP_DEBUG_LOG is enabled.

Requirements

  • WordPress 6.x (or recent 5.x).
  • Yoast SEO plugin active.
  • Rogue Scholar community records with:
    • pids.doi.identifier populated.
    • Your blog URLs in metadata.identifiers with scheme="url".
    • Ideally GUIDs in metadata.identifiers with scheme="guid" for robust mapping.

Usage

Configure

In Rogue Scholar DOIs → Settings:

  • Set Community ID to your Rogue Scholar community’s UUID.
  • Optionally set Community Slug.
  • Enable logging if you want debug output.

Initial full sync

  1. Go to Rogue Scholar DOIs.
  2. Click Sync DOIs from Rogue Scholar (full).
  3. Watch for success or error notice; check debug.log for [RogueScholarDOI] entries if needed.

Automatic sync

  • Hourly cron: Incremental sync of newest records.
  • Per‑post async sync: On update of a published post without a DOI canonical:
    • Schedules rs_doi_async_single_sync 5 seconds later.
    • That async job checks newest records for a matching URL and writes the DOI canonical if found.

Shortcode

Inside post content:


[rogue_scholar_doi]