Drupal is a very popular and well-known CMS for educational websites. And it's very important that Drupal has tools to deal with bibliography and citations. For Drupal 7 (and earlier versions) there is the Bibliography Module aka Drupal Scholar aka the Biblio module available. Unfortunately, after some time that Drupal 8 had been released there still was no version of this module available for Drupal 8 and no related activity. We - the company ADCI Solutions - have decided to start the development of the module which allows us to deal with bibliography and citations in Drupal 8 and named it Bibliography & Citation aka BibCite.

Why Drupal was chosen: 

Why don't just join the maintainers of the Biblio module and release a Drupal 8 version? The first reason is continuity. By the time we started development there were about 8000 usages of the Biblio module. Due to the module specifics, almost every usage is a rather deliberate choice so there was a big community of interested users. So changes in the data structure, in API, in UI, etc. have to be successive and evolutionary.

The second reason is Biblio's legacy. Its history is very long and starts from Drupal 4.6. As a result, it has some technical and architecture issues:

  • Data storage. In a few words, all data is stored in a special content type. There is a lot of custom code to reach it.
  • Drupal integration. Custom code is required to integrate Biblio with some of the core's modules and popular contrib modules like Views, Rules and other.
  • Codebase and architecture problems. There are a lot of legacy code and code issues. The code was partly written in PHP 4+. Due to this fact, it is very hard to add new features and maintain the project.
  • Lack of configuration management. It's hard to move configuration from one instance to another and re-use it on different sites.

We had a clear understanding that architecture and API need to be reconsidered and re-implemented to fit Drupal 8 well and eliminate legacy. With the new module, we had no bounds in design and implementation.

Describe the project (goals, requirements and outcome): 

Terms

The module solves quite specific tasks; to make the reading easier for you we highlighted several important terms that we’re operating often in this case study.

A bibliography is a list of all of the sources you have used (whether referenced or not) in the process of researching your work. In general, the bibliography should include:

  • the authors' names
  • the titles of the works
  • the names and locations of the companies that published your copies of the sources
  • the dates your copies were published
  • the page numbers of your sources (if they are a part of multi-source volumes)

Citation is the way you tell your readers that certain material in your work came from another source. It can be a reference to a book, an article, a web page and so on. Giving credit to the original author by citing sources is the only way to use other people's work without plagiarizing. It's main but not the only reason to cite sources though.

Citation Style Language (CSL) is a popular open XML-based language to describe the formatting of citations and bibliographies. The official CSL style repository contains more than 8000 styles and is frequently updated. CSL is used by many commercial and open source products.

Assume you have a list of bibliographies for your work and you need to display it somehow. Basically your citations should satisfy some style guide. Citation styles (formats) can be broadly divided into the styles that are common to the Humanities and the Sciences. There is a number of widely used style guides, for example, The Chicago Manual of Style еhat has been coming out since 1906, which prescribes writing and citation styles, APA style, MLA Handbook, and others. A number of organizations have created styles to fit their needs. Individual publishers often have their own in-house variations as well.

Description

What does the Bibliography & Citation module offer? First of all, it closely follows the Drupal way: implementation follows Drupal best practices and Drupal API is widely utilized. The basis is Drupal Entity API. The module utilizes Entity API as much as possible. Not only the main structures are made using entities, but they are also used for configurations, too. This approach allows developing really flexible and extendable solutions. For example, it is easy to extend or alter the current module’s features and it’s possible to develop add-ons. You will see this further. Standard Drupal UI elements are used so that it looks familiar to everyone.

The project consists of several submodules:

  • Bibliography & Citation
  • Bibliography & Citation - Entity
  • Bibliography & Citation - Import
  • Bibliography & Citation - Export
  • Bibliography & Citation - Bibtex
  • Bibliography & Citation - RIS

Let's examine each module in detail.

Bibliography & Citation

It is the core module that provides API for bibliographic citations rendering. CSL styles are used for rendering. It also provides the administration UI which allows to choose a processor (currently only citeproc PHP is available) and to choose global CSL style.

You can also manage CSL styles from the administration UI - you can edit or delete a predefined style or install a new style manually or from .csl or xml files.

 CSL styles
 CSL styles

Bibliography & Citation - Entity

It provides storage for bibliographic data in Drupal entities. It defines three types of entities:

  • Reference
  • Contributor
  • Keyword

It also includes the basic functionality for rendering with the help of a display mode or the Views handler. Another important feature is mapping. For example, you can map BibTeX types into Reference type (bundle) via the administration UI. And you can do the same with fields.

Bibliography & Citation - Entity

Let’s examine entity types in detail.

Reference

Reference entities stores all bibliographic data. There are about 30 predefined types (bundles) e.g. artwork, book, etc. These bundles are configurable: you can add your own bundles via the administration UI. Bundles are fieldable. Also, you can customize the following properties:

  • availability
  • requirements
  • labels
  • descriptions

If a corresponding author entity exists in a system, the autocomplete feature will be activated.

If an author entity does not exist then a new author entity will be created.

It supports the human name parser feature so that you can just type a full name as a string and it will be automatically populated to appropriate fields.

 referebce entity

Reference entities can be related to content via the Entity Reference field and rendered in a usual way: using display modes or Views.

Contributor

Contributor entities store info about authors. The authors may be assigned to a role and a category. You can manage a list of roles and categories via the administration UI. As I mentioned, it supports the human name parser feature. Also in the administration UI, you can configure a pattern for displaying a full author name. Another important feature is deduplication. If you have duplicated author records, you can merge them into a single entity. It can be done manually (via administration views action) or automatically during the import process.

 contributor entity

Import and Export

These modules provide an ability to import and export bibliographic data.

You can export all existing data or an exact piece. The same for import: you can import a single reference manually or in a bulk via a file upload. The pre-fill feature is available so that you can edit data before saving the reference. There are two available formats for import/export for now: BibTeX and RIS. Those are the most important formats. The module is flexible and it is not a big deal to add new formats in the future and of course, some formats are already planned to be added in future releases of the module.
 

Contrib Additions

It's pretty clear that it's critical to have a migration path from the Biblio module to the BibCite, to allow the users to move from older Drupal versions to the latest and greatest Drupal 8. This resulted in the Bibliography & Citation - Migrate module which provides migration paths from Drupal 6 and 7.

There is also a number of contrib modules that extend the Biblio module and provide some additions. Eventually, a number of additions to the BibCite module will appear to reflect Biblio extensions' functionality. We implemented the Metatag Google Scholar module which provides a number of meta tags to help with the indexing of scholarly content/articles in Google Scholar. Its functionality is general and doesn't depend on the BibCite, but this combination is probably one of the main use cases.
 

Conclusion

We believe that our efforts resulted in the great module which fits Drupal 8 very well and allows the sites that deal with bibliographic data a lot to migrate to Drupal 8. The module is under active development and many cool features are planned. There are about 60 usages already, and many users are really interested in the module. We received a noticeable amount of feedback, different bug reports, feature requests, patch and improvement suggestions. This is really great and strongly motivates us to continue the module's development and react to community needs. Feel free to submit your issues or feature requests.

Technical specifications

Drupal version: 
Drupal 8.x
Why these modules/theme/distribution were chosen: 

The Bibliography & Citation is the core module that provides API for bibliographic citations rendering.

Bibliography & Citation - Migrate provides the ability to migrate your bibliographic data from the Bibliography (biblio) module (Compatible with 6.x and 7.x versions).

Metatag Google Scholar module which provides a number of meta tags to help with indexing of scholarly content/articles in Google Scholar.

Organizations involved: 
Sectors: 
Education
Healthcare
Publishing

Comments

sealionking’s picture

great module for me to implement to my education information management and consulting project system

fred_O’s picture

Hi !

Have you tried this module? Can I see a post where you use it? Can you quote a reference by its key as in bibtex?

Thank you,

-Fred

jeenpx’s picture

Hi,

I found this module very much satisfy my requirement and its really a great one. Since this is in Alpha release, I want to know about its Beta release. When can we expect its Beta release?

Regards,
Jeen

fred_O’s picture

Have you tried this module? Can I see a post where you use it? Can you quote a reference by its key as in bibtex?

Thank you,

-Fred

spinblue’s picture

This module imports BibTex fine with drupal core 8.8.2 & PHP 7.2.28.   I see all the references created as 'Bibliographic Data' under content.    Is there a pre-made entry page already configured for the visitors, sorted by years?      If so, what would the URL be?   /content/bibcite/reference did not work.  

antongp’s picture

The only listing which shows all reference entities and shipped with the module by default is /admin/content/bibcite/reference page. But this page requires admin permissions. There is no page provided by the module which shows all references and is accessible by regular users.

Such page for regular users can easily be created with the core's Views module, actually. But we'll consider adding such page to the module - it looks reasonable to add it.

mjeltsch’s picture

I am just trying to "easily" create a view of the publications. When using fields to populate the view, I cannot help noticing that some of the most important fields are not available (Journal) and others (Author) do not have the expected effect (nothing is ever displayed). So adding a page with a reasonable view would be a good way to increase adoption of this module. I myself have delayed upgrading from Drupal7 for this very reason (https://jeltsch.org).

johnnny83’s picture

Let's say I have an institute with scientists and projects. Each of them has their own content type. Every time I add a new book or thesis I want to connect that entity with specific scientist(s) and project(s). When I open a node of a scientist or project the references connected to them should be listed. How can I achieve this? I tried to add entity reference fields to the reference types, but I don't know how to access this information when I open a scientist or project node...

johnnny83’s picture

I want to show a list of all publications with Views. I'm using the fields mode and the citation field. The problem is, when I want to sort them by author each publication is shown as many times as the number of authors it has. So a publication with with three authors is shown three times. I already tried the distinct query option and many variations of the aggregation option, but either too much is sorted out or there is an SQL error. How can I sort all publications by the last name of the first author?