DOI Registrations for all Ghost Blogs
This blog since earlier this month is no longer using a JAMStack setup but a regular Ghost setup using Ghost Pro for hosting. The primary driver were the new native search and native comments, but I needed to do a little bit of work to keep the DOI registration working. This is done now, and an added benefit is that DOI registration is now straightforward for any blog that uses Ghost as a platform.
Requirements
- An account to register DOIs with Crossref or DataCite
- A Ghost blog that allows custom themes (e.g via Ghost Pro, DigitalPress, or self-hosted)
Blog Configuration
We expose all metadata via schema.org upon publication, which is parsed and converted to Crossref or DataCite XML using a GitHub Action. All the metadata we need (e.g. author, title, and publication date) are already exposed as schema.org. The only required element missing is the DOI.
You can come up with your own unique DOI scheme, but it is easier (and cooler) using the briard Ruby gem (version 2.4.2 and up) to generate a random DOI using your DOI prefix:
briard encode 10.53731
=> https://doi.org/10.53731/cgdnpqv-vxss4fm
This DOI is then entered in the post settings for the canonical URL:
There are some optional metadata that you can add as well:
- The canonical URL should be displayed on each blog post:
- The author ORCID, put the ID in the website settings of your author profile:
- The license for the blog post content, put into a DCTERMS.license meta tag, and the ISSN:
To make working with these small changes easier, I forked the official headline theme, and you can download my forked version (renamed schlagzeile) as ZIP file from its GitHub page. After uploading the theme to your Ghost site, activate schlagzeile in the settings:
You can use the site design settings to add license information and ISSN for your blog:
GitHub Action
Once the blog is configured as above, and you have a new post, use a GitHub Action to trigger the DOI registration. You can copy my webhook GitHub Action and need to set these variables (for Crossref, similar variables for DataCite):
- CROSSREF_DEPOSITOR_NAME
- CROSSREF_DEPOSITOR_EMAIL
- CROSSREF_REGISTRANT
- CROSSREF_USERNAME_WITH_ROLE
- CROSSREF_PASSWORD
You then trigger the workflow action by entering the path to the published blog post:
If your blog doesn't publish more than weekly, this semi-automated workflow is probably ok (and takes under a minute). Reach out to me in the comments for further questions or feedback.
Not every scholarly blog is using Ghost, but I currently can't provide guidance for other blogging platforms, for example Wordpress.
Comments ()