Skip to content

Commit

Permalink
🚀 Deploy new version [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pabio-escobar committed Jul 2, 2022
1 parent ac6b07a commit 1fec9d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69601,14 +69601,16 @@ const parseNoteFile = async (dirName, year, file) => {
.toString()
.trim();
const date = new Date(dateInput);
const title = (contents.split("\n").find((line) => line.startsWith("title: ")) || "").replace("title: ", "") ||
(contents.split("\n").find((line) => line.startsWith("# ")) || "")
.split("# ")[1]
.trim() ||
undefined;
return {
slug: file,
title: (contents.split("\n").find((line) => line.startsWith("title: ")) || "").replace("title: ", "") ||
(contents.split("\n").find((line) => line.startsWith("# ")) || "")
.split("# ")[1]
.trim() ||
undefined,
title: title,
date,
words: contents.length - (title || "").length,
};
};
const token = core_1.getInput("token") || process.env.GH_PAT || process.env.GITHUB_TOKEN;
Expand Down Expand Up @@ -69641,7 +69643,7 @@ const run = async () => {
let addedYears = [];
allNotes[year].forEach((note) => {
const isPast = new Date(note.date).getTime() < new Date().getTime();
const text = `${addedYears.includes(year) ? "" : `### ${year}\n\n`}- [${note.title || `\`${note.slug}\``}](./${dirName}/${year}/${note.slug}), ${new Date(note.date).toLocaleDateString("en-us", {
const text = `${addedYears.includes(year) ? "" : `### ${year}\n\n`}- [${note.title || `\`${note.slug}\``}](./${dirName}/${year}/${note.slug}) (${note.words.toLocaleString("en-US")} words), ${new Date(note.date).toLocaleDateString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 1fec9d3

Please sign in to comment.