How to get a DOI for your blog posts

How to get a DOI for your blog posts

如何为你的博客文章获取 DOI

Each new post on this blog now has a Digital Object Identifier. This post looks at the how and the why of getting one, whether it is useful, and any issues you might experience if you go down this path. 本博客的每一篇新文章现在都有了一个数字对象标识符(DOI)。本文将探讨获取 DOI 的方法与原因、它的实用性,以及你在尝试此路径时可能会遇到的问题。

Background

背景

A few years ago, I documented how to get an International Standard Serial Number (ISSN) for a blog. An ISSN uniquely identifies a publication, which makes it easier for scholars and researchers to reference it. Getting one depends a little on whether a national institution is willing to accept your application. Similarly, I also got an ORCiD which is used to uniquely identify researchers. That means it is possible to disambiguate “Einstein, A” the eminent physicist from “Einstein, A” a lovely chap called Allen who researches invasive slugs in Paraguay. 几年前,我记录了如何为博客获取国际标准连续出版物号(ISSN)。ISSN 可以唯一标识一份出版物,使学者和研究人员更容易引用它。获取 ISSN 在一定程度上取决于国家机构是否愿意接受你的申请。同样,我还获取了用于唯一标识研究人员的 ORCiD。这意味着可以将杰出的物理学家“Einstein, A”与在巴拉圭研究入侵性蛞蝓的可爱小伙子“Allen Einstein”区分开来。

My blog posts are regularly referenced in academic papers, books, conferences, and news articles. The way most scholars cite a work is using a Digital Object Identifier. The idea is that a DOI is a unique and persistent code which can be used to refer to a specific article. If I ever stop using shkspr.mobi as my domain, or re-order my website, the DOI can be redirected to the article’s new home. Future scholars will be able to follow a reference more easily than hoping https://example.com/article123 still exists. 我的博客文章经常被学术论文、书籍、会议和新闻文章引用。大多数学者引用作品的方式是使用数字对象标识符(DOI)。DOI 的核心理念是一个唯一且持久的代码,可用于指向特定的文章。如果我不再使用 shkspr.mobi 作为域名,或者重新整理了网站结构,DOI 依然可以重定向到文章的新地址。未来的学者将能够更轻松地追踪引用,而不必祈祷 https://example.com/article123 依然存在。

Getting a DOI the easy way

获取 DOI 的简便方法

If you’re an academic, your institution will have a paid subscription to a service which will “mint” a new DOI for all your articles. If not, you can upload your paper to a service like arXiv and they’ll mint a DOI for you. That’s how I got a DOI for my MSc. What about people who aren’t traditional academics or who want to keep their content on their own website? There are a variety of paid-for services, some of which charge an eye-watering amount of money to create a DOI for you. Or, there’s Rogue Scholar. 如果你是学术界人士,你所在的机构通常会订阅相关服务,为你的所有文章“铸造”新的 DOI。如果不是,你可以将论文上传到 arXiv 等服务平台,他们会为你铸造 DOI。我硕士论文的 DOI 就是这样获取的。那么,对于非传统学术界人士,或者希望将内容保留在自己网站上的人来说该怎么办呢?市面上有各种付费服务,其中一些创建 DOI 的费用高得惊人。或者,你也可以选择 Rogue Scholar。

Let’s Go Rogue!

让我们“叛逆”一下!

So what is Rogue-Scholar.org? Rogue Scholar is an open access archive and registry for science blogs. It preserves science blog posts, makes them citable via DOI, and ensures their long-term discoverability alongside formal scholarly literature. Nifty! My blog just about sneaks in to their “Computer Science” category. They require you to have a full-text feed of your posts. You also need to licence your content to them as Creative Commons Attribution. 那么 Rogue-Scholar.org 是什么?Rogue Scholar 是一个针对科学博客的开放获取存档与注册平台。它保存科学博客文章,通过 DOI 使其可被引用,并确保它们能与正式的学术文献一起被长期发现。很棒吧!我的博客勉强挤进了他们的“计算机科学”类别。他们要求你提供文章的全文订阅源(Feed),并且你需要将内容授权为知识共享署名(Creative Commons Attribution)协议。

Applying wasn’t too difficult. I filled in their form, then jumped into their Slack. We had a bit of a discussion about what I needed to change in order to be approved. A few days later, I was live at https://rogue-scholar.org/communities/shkspr/ Which means, if you visit https://doi.org/10.59350/395ha-fss97 you’ll be redirected to one of my blog posts. 申请过程并不难。我填写了表格,然后加入了他们的 Slack。我们讨论了一下为了获得批准我需要做哪些修改。几天后,我的博客就在 https://rogue-scholar.org/communities/shkspr/ 上线了。这意味着,如果你访问 https://doi.org/10.59350/395ha-fss97,你将被重定向到我的一篇博客文章。

Automatic Submission of New Content

新内容的自动提交

Rogue Scholar automatically polls my feed, ingests my content, and then mints a DOI for every new post they encounter. There’s nothing manual I have to do. That’s all very well for new content. But I have posts on here going way back to 1986. How can they get discovered and DOI’d? Rogue Scholar 会自动轮询我的订阅源,抓取我的内容,并为遇到的每一篇新文章铸造 DOI。我无需进行任何手动操作。这对新内容来说很好,但我这里还有追溯到 1986 年的文章。它们该如何被发现并获取 DOI 呢?

Manual Submission of Old Content

旧内容的手动提交

By default, Rogue Scholar ingested the 40 most recent posts from my blog. Actually, that’s not quite accurate. It got the 40 most recently updated posts. As I’d recently edited a few older posts, they got themselves a DOI. I don’t know how often Rogue Scholar polls my blog’s feed. In my experiments, adding a new post resulted in a DOI being issued a couple of minutes after publication. At the moment, there doesn’t seem to be an easy way to add older content. I’m working on a WordPress plugin to retroactively add DOIs and make them discoverable. 默认情况下,Rogue Scholar 抓取了我博客中最近的 40 篇文章。实际上,这不太准确,它抓取的是最近更新的 40 篇文章。由于我最近编辑了几篇旧文章,它们也获得了 DOI。我不知道 Rogue Scholar 多久轮询一次我的博客订阅源。根据我的实验,发布新文章后几分钟内就会生成 DOI。目前似乎还没有简单的方法来添加更早的内容。我正在开发一个 WordPress 插件,以便追溯性地添加 DOI 并使其可被发现。

Getting the DOI

获取 DOI

The Rogue Scholar API is based on InvenioDRM. Retrieving the DOI via their API requires you to make an unauthenticated request to: https://rogue-scholar.org/api/records?q=metadata.identifiers.identifier%3A%22https%3A%2F%2Fexample.com%2Fwhatever%22 Rogue Scholar API 基于 InvenioDRM。通过其 API 获取 DOI 需要向以下地址发送未经身份验证的请求:https://rogue-scholar.org/api/records?q=metadata.identifiers.identifier%3A%22https%3A%2F%2Fexample.com%2Fwhatever%22

That’s your URL, wrapped in quotes, and the whole thing URL encoded. Visit this example. You can also use your post’s GUID. That gets back a rather detailed JSON document. The DOI is noted in several locations, but is easiest to find in hits→hits→0→links→doi. 这就是你的 URL,用引号括起来,并进行 URL 编码。访问这个示例。你也可以使用文章的 GUID。这会返回一份相当详细的 JSON 文档。DOI 在多个位置都有标注,但最容易在 hits→hits→0→links→doi 中找到。

It’s important to note that Rogue Scholar generates two DOIs for your post. One for the post, another for the specific version of the post. If you update a post, it should get a new DOI. That way someone can refer to the post where you said your favourite band was the Spice Girls and not the edited one where you changed it to say BWitched. Alternatively, you can use the CrossRef search if you want to look at HTML results. See this CrossRef example. 需要注意的是,Rogue Scholar 会为你的文章生成两个 DOI:一个是针对文章本身的,另一个是针对文章特定版本的。如果你更新了文章,它应该会获得一个新的 DOI。这样,别人就可以引用你写“最喜欢的乐队是 Spice Girls”的那一版,而不是你修改后写着“BWitched”的那一版。或者,如果你想查看 HTML 结果,可以使用 CrossRef 搜索。查看此 CrossRef 示例。

As an aside, once you have the DOI, it’s possible to create a short DOI at https://shortdoi.org/ - I’ll be honest, I’ve never seen these in the wild and they are not recommended for use. Nevertheless, the API is pretty simple - https://shortdoi.org/10.59350/395ha-fss97?format=json will return a shorter URL like https://doi.org/rnjj. Finally, there’s a “vanity” DOI for the entire blog. In my case 10.59350/shkspr. 顺便提一下,一旦有了 DOI,可以在 https://shortdoi.org/ 创建短 DOI。老实说,我从未在实际应用中见过它们,也不建议使用。不过,其 API 非常简单——https://shortdoi.org/10.59350/395ha-fss97?format=json 会返回一个类似 https://doi.org/rnjj 的短 URL。最后,还有一个针对整个博客的“个性化”DOI,我的是 10.59350/shkspr

Generating your own DOI

生成你自己的 DOI

Your blog posts can self-attest a DOI - when Rogue Scholar sees that in your Atom feed, it will register it on your behalf. The code for generating a valid DOI is relatively straightforward. Generate a random number between 0 and 1,099,511,627,775. Convert it to a Base 32 string. Add a two character checksum to the end. Prefix it with 10.59350/. 你的博客文章可以自证 DOI——当 Rogue Scholar 在你的 Atom 订阅源中看到它时,就会代你进行注册。生成有效 DOI 的代码相对简单:生成一个 0 到 1,099,511,627,775 之间的随机数,将其转换为 Base 32 字符串,在末尾添加两个字符的校验和,并加上前缀 10.59350/

Your new DOI can be made discoverable in your Atom feed by adding this to a post: 通过在文章中添加以下内容,你的新 DOI 可以在 Atom 订阅源中被发现:

<id>https://doi.org/10.59350/12345-67890</id>

Shortly after publication, it will be “minted” and be linkable. 发布后不久,它就会被“铸造”并可供链接。

Making the DOI discoverable in HTML

在 HTML 中使 DOI 可被发现

How do you semantically add a DOI to your HTML’s metadata? By far the most popular citation manager is Zotero. They maintain a page describing the metadata they look for. According to them, this needs to be in your page’s <head>: 如何以语义方式将 DOI 添加到 HTML 的元数据中?目前最流行的引文管理器是 Zotero。他们维护着一个页面,描述了他们所查找的元数据。根据他们的说明,这需要放在页面的 <head> 中:

<meta name=citation_doi content=10..../...>

They don’t say whether it requires the https://doi.org/ prefix - but looking at Mendeley and AltMetric, it appears not. 他们没有说明是否需要 https://doi.org/ 前缀,但查看 Mendeley 和 AltMetric,似乎并不需要。