1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-01 13:37:49 +00:00

Add image thumbnail

This commit is contained in:
RGBCube 2024-01-18 15:56:22 +03:00
parent 86d3677ed1
commit 97d41827c7
No known key found for this signature in database
5 changed files with 7 additions and 7 deletions

1
.gitignore vendored
View file

@ -13,6 +13,7 @@
!.gitignore
!*.gif
!*.png
!*.woff2
!*.css

View file

@ -50,6 +50,7 @@
gifFilter = path: type: builtins.match ".*gif$" path != null;
jsFilter = path: type: builtins.match ".*js$" path != null;
mdFilter = path: type: builtins.match ".*md$" path != null;
pngFilter = path: type: builtins.match ".*png$" path != null;
txtFilter = path: type: builtins.match ".*txt$" path != null;
woff2Filter = path: type: builtins.match ".*woff2$" path != null;
@ -60,6 +61,7 @@
|| (gifFilter path type)
|| (jsFilter path type)
|| (mdFilter path type)
|| (pngFilter path type)
|| (txtFilter path type)
|| (woff2Filter path type);
};

BIN
src/page/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -76,7 +76,6 @@ pub fn create(title: Option<&str>, head: Markup, body: Markup) -> Markup {
name.clone()
}
}) }
(pname("author", name))
(property("og:site_name", name))
(property("og:title", name))
@ -87,10 +86,8 @@ pub fn create(title: Option<&str>, head: Markup, body: Markup) -> Markup {
link rel="icon" href=(asset::File("icon.gif")) type="image/gif";
(property("og:image", &asset::File("thumbnail.png").to_string()))
(property("og:image:type", "image/png"))
(property("og:image:height", "1080"))
(property("og:image:width", "600"))
(pname("twitter:image", &asset::File("icon.png").to_string()))
(pname("theme-color", "#00FFFF"))
@let url = MANIFEST.package.as_ref().unwrap().homepage().unwrap();
(property("og:url", url))

View file

@ -25,7 +25,7 @@ use crate::{
},
};
const ASSET_EXTENSIONS: &[&str] = &[".js", ".css", ".woff2", ".gif", ".txt"];
const ASSET_EXTENSIONS: &[&str] = &[".js", ".css", ".woff2", ".gif", ".png", ".txt"];
const ROOT_EXTENSIONS: &[&str] = &[".txt"];
static ASSETS: LazyLock<HashMap<String, Bytes>> = LazyLock::new(|| {