Skip to content

Commit

Permalink
feat: set OGP
Browse files Browse the repository at this point in the history
  • Loading branch information
rei1024 committed Oct 3, 2024
1 parent 680e82a commit fe5f474
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_DATE="2024-10-03T05:55:58.579Z"
15 changes: 13 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Conway's Game of Life in 3D</title>

<link rel="canonical" href="https://rei1024.github.io/game-of-life-3d/" />

<meta name="author" content="Rei" />

<meta name="date" content="%VITE_DATE%" />

<meta
property="og:image"
content="https://rei1024.github.io/game-of-life-3d/ogp.jpg"
/>
</head>
<body>
<canvas id="renderCanvas"></canvas>
Expand Down Expand Up @@ -32,7 +43,7 @@ <h2>Settings</h2>
<input type="checkbox" id="auto-random" />
</p>
<p>
<label for="auto-rotate">Auto Rotate:</label>
<label for="auto-rotate">Auto rotate:</label>
<input type="checkbox" id="auto-rotate" />
</p>
<p>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "tsc && node prebuild.js && vite build",
"preview": "vite preview"
},
"devDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions prebuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { writeFile } from "node:fs/promises";

async function main() {
await writeFile(".env", `VITE_DATE="${new Date().toISOString()}"`);
}

main();
Binary file added public/ogp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fe5f474

Please sign in to comment.