Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lucythecat committed Sep 16, 2023
1 parent 56c89f6 commit ae595fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auri.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: publish
run: pnpm exec auri publish
- name: prepare
run: pnpm exec auri prepare
run: pnpm exec auri prepare
6 changes: 3 additions & 3 deletions documentation/integrations/og/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ export const generateOgImages = async () => {
const htmlPathnames = await readHtmlDirectory(distDirPathname);
const pages: Page[] = [];
for (const htmlPathname of htmlPathnames) {
console.log(htmlPathname)
console.log(htmlPathname);
const file = await fs.readFile(htmlPathname);
const htmlContent = file.toString("utf-8");
const titleMatches = htmlContent.match(
/og:title"\s*?content="([\s\S]*?)"\s*>/
);
const title = titleMatches?.at(1)?.replace(" Lucia", "");
if (!title) continue
if (!title) continue;
const descriptionMatches = htmlContent.match(
/og:description"\s*?content="([\s\S]*?)"\s*>/
);
const description = descriptionMatches?.at(1) || null;
const url = htmlPathname
.replace(distDirPathname, "")
.replace("/index.html", "");
console.log(url)
console.log(url);
pages.push({
title,
pathname: htmlPathname,
Expand Down

0 comments on commit ae595fb

Please sign in to comment.