Adapting CETEIcean for static site building with React and Gatsby

Autor: Viglianti, Raffaele
Rok vydání: 2022
Předmět:
DOI: 10.5281/zenodo.7085753
Popis: The JavaScript library CETEIcean, written by Hugh Cayless and Raff Viglianti, relies on the DOM processing of web browsers and HTML5 Custom Elements to publish TEI documents as a component pluggable into any HTML structure. This makes it possible to publish and lightly transform TEI documents directly in the user’s browser, doing away with complex server-side infrastructure for TEI publishing. This lightweight approach to publishing can be valuable in a “text as data” context, where the focus of labor and algorithmic complexity may be more centered on corpus building and analysis as opposed to publication. However, CETEIcean provides a fairly bare-bones API for a fully-fledged TEI publishing solution and, without some additional considerations, TEI documents rendered with CETEIcean can be invisible to search engines. #TEI2022 - 127 This demonstration will showcase an adaptation of the CETEIcean algorithm as a plugin for the static site generator Gatsby, which relies on the popular framework React for building user interfaces (UI). The static site pages generated with Gatsby will contain embedded TEI data, making it visible to search engines. Two plugins will be shown: gatsby-transformer-ceteicean (https://www.gatsbyjs.com/plugins/gatsby-transformer-ceteicean/) prepares XML to be registered as HTML5 Custom Elements. It also allows users to apply custom transformations before and after processing if the TEI data requires it for publication (the demonstration will show an example related to addSpan elements). gatsby-theme-ceteicean (https://www.npmjs.com/package/gatsby-theme-ceteicean) implements HTML5 Custom Elements for XML publishing, particularly with TEI. It re-implements parts of CETEIcean excluding behaviors; instead, users can define React components to customize the behavior of specific TEI elements. This makes it possible to access powerful React functionalities such as state management for user interaction. The demonstration will show examples from the Scholarly Editing journal (https://scholarlyediting.org), which published TEI-based small-scale editions with these tools alongside other essay-like content.
Databáze: OpenAIRE