Skip to content

Commit

Permalink
feat(tools): update thi.ng links generator
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 13, 2024
1 parent cab2b84 commit 0be1cef
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions tools/src/update-thing-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,46 +39,45 @@ for (let f of pkgDirs) {
{},
meta({ charset: "UTF-8" }),
meta({
content: pkg.keywords?.join(",") || "",
name: "keywords",
content: pkg.keywords?.join(",") || "",
}),
meta({ property: "og:url", content: `https://thi.ng/${id}` }),
meta({ property: "og:site_name", content: `thi.ng/${id}` }),
meta({ property: "og:title", content: pkg.description }),
meta({
property: "og:image",
content:
"https://thi.ng/assets/img/twitter-card-800x418.jpg",
}),
meta({ property: "og:image:width", content: "800" }),
meta({ property: "og:image:height", content: "418" }),
meta(<any>{
content: "summary_large_image",
name: "twitter:card",
content: "summary_large_image",
}),
meta(<any>{
content: "@thing_umbrella",
name: "twitter:site:id",
content: "@thing_umbrella",
}),
meta(<any>{
content: "@thing_umbrella",
name: "twitter:creator",
}),
meta({ content: `https://thi.ng/${id}`, property: "og:url" }),
meta({ content: "thi.ng", property: "og:site_name" }),
meta({
content: pkg.description,
property: "og:title",
}),
meta({
content:
"https://thi.ng/assets/img/twitter-card-800x418.jpg",
property: "og:image",
content: "@thing_umbrella",
}),
meta(<any>{
name: "twitter:image:alt",
content:
"thi.ng logo with a colorful generative art background",
name: "twitter:image:alt",
}),
meta({
"http-equiv": "refresh",
content: `0; url=https://github.com/thi-ng/umbrella/tree/${branch}/packages/${id}`,
content: `0; url=https://github.com/thi-ng/umbrella/tree/${branch}/packages/${id}#readme`,
}),
title({}, pkg.name)
)
);
const $html = serialize([DOCTYPE_HTML, doc]);
// console.log($html, "\n-------");
LOGGER.debug($html, "\n-------");
writeText(tmpFile, $html, LOGGER);
execFileSync(
"aws",
Expand Down

0 comments on commit 0be1cef

Please sign in to comment.