Skip to content

Commit

Permalink
add favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Jun 25, 2024
1 parent 18ab835 commit 7f5a1c9
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ def empty_dist() -> None:
raise Exception(f"{f} is not a file or directory.")


def compile_favicons():
for f in Path("src/favicons").iterdir():
shutil.copyfile(f, Path("dist", f.name))


def compile_index(posts: PostIndex, commit: str):
with Path("src/index.jinja").open("r") as fp:
tpl = je.from_string(fp.read())
Expand Down Expand Up @@ -208,6 +213,7 @@ def main():

empty_dist()
shutil.copytree("src/assets", "dist/assets")
compile_favicons()
compile_index(posts, commit)
compile_posts(posts, commit)
compile_feed(posts)
Expand Down
Binary file added src/favicons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/favicons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/favicons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/favicons/favicon.ico
Binary file not shown.
19 changes: 19 additions & 0 deletions src/favicons/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
4 changes: 4 additions & 0 deletions src/head.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
<link rel="stylesheet" type="text/css" href="/assets/css/global.css?v={{ commit }}" />
<link href="https://sunsetglow.net/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed" />
<script defer src="https://ozu.sunsetglow.net/script.js" data-website-id="6519316e-0391-4a7b-ae2a-f308d136b119"></script>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">

0 comments on commit 7f5a1c9

Please sign in to comment.