mirror of
https://github.com/RGBCube/Site
synced 2025-08-01 13:37:49 +00:00
Add image thumbnail
This commit is contained in:
parent
86d3677ed1
commit
97d41827c7
5 changed files with 7 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -13,6 +13,7 @@
|
|||
!.gitignore
|
||||
|
||||
!*.gif
|
||||
!*.png
|
||||
!*.woff2
|
||||
|
||||
!*.css
|
||||
|
|
|
@ -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,7 +61,8 @@
|
|||
|| (gifFilter path type)
|
||||
|| (jsFilter path type)
|
||||
|| (mdFilter path type)
|
||||
|| (txtFilter path type)
|
||||
|| (pngFilter path type)
|
||||
|| (txtFilter path type)
|
||||
|| (woff2Filter path type);
|
||||
};
|
||||
|
||||
|
|
BIN
src/page/icon.png
Normal file
BIN
src/page/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
|
@ -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))
|
||||
|
|
|
@ -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(|| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue