From 72dc995673e54127606fb525911cbb5ab02273e9 Mon Sep 17 00:00:00 2001 From: Anton Tetov Date: Wed, 7 Aug 2024 17:22:06 +0200 Subject: [PATCH] s/CLS/CSL/g --- src/citations.ts | 8 ++++---- src/gatsby-node/create-schema-customization.ts | 6 +++--- src/pages/cv.tsx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/citations.ts b/src/citations.ts index 2d12db18..b68036cd 100644 --- a/src/citations.ts +++ b/src/citations.ts @@ -1,5 +1,5 @@ import Cite from "citation-js"; -import { Data, Date, ItemType, Person } from "csl-json"; +import { Date as CslDate, Data, ItemType, Person } from "csl-json"; import { parse as htmlParse } from "node-html-parser"; const URL_REGEX = @@ -24,7 +24,7 @@ const addLinksToHTML = (text: string): string => { return returnText; }; -const coerceCLSDateFromNode = (date: Queries.CLSDate): Date => { +const coerceCSLDateFromNode = (date: Queries.CSLDate): CslDate => { return { "date-parts": [[date.year, date.month ?? 1, date.day ?? 1]] }; }; @@ -42,9 +42,9 @@ const coerceCSLObjectFromNode = ( DOI: node.DOI ?? undefined, accessed: node.accessed !== undefined - ? coerceCLSDateFromNode(node.accessed) + ? coerceCSLDateFromNode(node.accessed) : undefined, - issued: coerceCLSDateFromNode(node.issued), + issued: coerceCSLDateFromNode(node.issued), author: node.author as Person[], URL: node.URL ?? undefined, abstract: node.abstract ?? undefined, diff --git a/src/gatsby-node/create-schema-customization.ts b/src/gatsby-node/create-schema-customization.ts index b0504819..ba09230a 100644 --- a/src/gatsby-node/create-schema-customization.ts +++ b/src/gatsby-node/create-schema-customization.ts @@ -158,7 +158,7 @@ const createSchemaCustomization: GatsbyNode["createSchemaCustomization"] = ({ given: String! } - type CLSDate { + type CSLDate { year: Int! month: Int day: Int @@ -166,7 +166,7 @@ const createSchemaCustomization: GatsbyNode["createSchemaCustomization"] = ({ type CvYamlPublications implements Node { abstract: String - accessed: CLSDate + accessed: CSLDate author: [CSLName!]! citation_key: String citation_key: String! @@ -174,7 +174,7 @@ const createSchemaCustomization: GatsbyNode["createSchemaCustomization"] = ({ DOI: String event_place: String event_title: String - issued: CLSDate! + issued: CSLDate! language: String language: String license: String diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx index be22160c..4ddaac2f 100644 --- a/src/pages/cv.tsx +++ b/src/pages/cv.tsx @@ -119,7 +119,7 @@ const CVProject: React.FC = ({ [ roles.length > 1 ? "Roles" : "Role", roles.length > 1 ? ( - + {roles.map((role) => (
  • {role}
  • ))}