Skip to content

Commit

Permalink
s/CLS/CSL/g
Browse files Browse the repository at this point in the history
  • Loading branch information
tetov committed Aug 7, 2024
1 parent 1eca33a commit 72dc995
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/citations.ts
Original file line number Diff line number Diff line change
@@ -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 =
Expand All @@ -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]] };
};

Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/gatsby-node/create-schema-customization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,23 +158,23 @@ const createSchemaCustomization: GatsbyNode["createSchemaCustomization"] = ({
given: String!
}
type CLSDate {
type CSLDate {
year: Int!
month: Int
day: Int
}
type CvYamlPublications implements Node {
abstract: String
accessed: CLSDate
accessed: CSLDate
author: [CSLName!]!
citation_key: String
citation_key: String!
container_title: String
DOI: String
event_place: String
event_title: String
issued: CLSDate!
issued: CSLDate!
language: String
language: String
license: String
Expand Down
2 changes: 1 addition & 1 deletion src/pages/cv.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const CVProject: React.FC<Queries.CvYamlProjects> = ({
[
roles.length > 1 ? "Roles" : "Role",
roles.length > 1 ? (
<CVUnorderedList>
<CVUnorderedList key="role_list">
{roles.map((role) => (
<li key={role}>{role}</li>
))}
Expand Down

0 comments on commit 72dc995

Please sign in to comment.