mirror of
https://github.com/RGBCube/Site
synced 2025-08-01 13:37:49 +00:00
Small experiment
This commit is contained in:
parent
6e6471b35c
commit
86ce56fa0e
3 changed files with 17 additions and 7 deletions
17
Cargo.lock
generated
17
Cargo.lock
generated
|
@ -376,7 +376,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
|
|||
[[package]]
|
||||
name = "embed"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/RGBCube/embed-rs#7c41253f4f6006fcc2aad189c19132d2f0cccec2"
|
||||
source = "git+https://github.com/RGBCube/embed-rs#d1a0e9a7931c65407a9348e980236b58595f21c6"
|
||||
dependencies = [
|
||||
"embed-macros",
|
||||
]
|
||||
|
@ -384,7 +384,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "embed-macros"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/RGBCube/embed-rs#7c41253f4f6006fcc2aad189c19132d2f0cccec2"
|
||||
source = "git+https://github.com/RGBCube/embed-rs#d1a0e9a7931c65407a9348e980236b58595f21c6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -930,6 +930,14 @@ version = "0.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||
|
||||
[[package]]
|
||||
name = "proc-file"
|
||||
version = "1.0.0"
|
||||
source = "git+https://github.com/RGBCube/proc-file#c514ea1841b5ca5f86ecb2fa8173879683824b36"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "1.0.4"
|
||||
|
@ -1222,6 +1230,7 @@ dependencies = [
|
|||
"maud",
|
||||
"mime_guess",
|
||||
"minify-js",
|
||||
"proc-file",
|
||||
"pulldown-cmark",
|
||||
"serde",
|
||||
"serde_yaml",
|
||||
|
@ -1263,9 +1272,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
|||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.10.1"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ccbca6f34534eb78dbee83f6b2c9442fea7113f43d9e80ea320f0972ae5dc08d"
|
||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
|
|
|
@ -24,6 +24,7 @@ log = { version = "0.4.20", features = [ "serde" ] }
|
|||
maud = { git = "https://github.com/lambda-fairy/maud", features = [ "axum" ] }
|
||||
mime_guess = "2.0.4"
|
||||
minify-js = "0.6.0"
|
||||
proc-file = { git = "https://github.com/RGBCube/proc-file" }
|
||||
pulldown-cmark = "0.9.3"
|
||||
serde = { version = "1.0.195", features = [ "derive" ] }
|
||||
serde_yaml = "0.9.30"
|
||||
|
|
|
@ -26,14 +26,14 @@ pub struct Metadata {
|
|||
}
|
||||
|
||||
pub static PAGES: LazyLock<HashMap<String, (Metadata, Markup)>> = LazyLock::new(|| {
|
||||
let routes_path = path::Path::new(file!())
|
||||
let routes_path = dbg!(path::Path::new(proc_file::file!())
|
||||
.parent()
|
||||
.unwrap()
|
||||
.canonicalize()
|
||||
.unwrap();
|
||||
.unwrap());
|
||||
|
||||
HashMap::from_iter(embed::dir!(".").flatten().iter().filter_map(|file| {
|
||||
let path = path::Path::new(file.path().as_ref())
|
||||
let path = dbg!(path::Path::new(file.path().as_ref()))
|
||||
.strip_prefix(&routes_path)
|
||||
.unwrap()
|
||||
.to_str()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue