stapix

Yet another static page generator for photo galleries

Commit
fe35f1247de21a19dac98f566076deb1de6ddce5
Parent
e60aaef2752e8849fc57ffb38fc24139f097e886
Author
Pablo <pablo-escobar@riseup.net>
Date

Minor tweak

Made it so that only the 10 first pictures in the gallery are preloaded in the index page

Diffstat

1 file changed, 1 insertion, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified src/main.rs 2 1 1
diff --git a/src/main.rs b/src/main.rs
@@ -119,7 +119,7 @@ fn render_index(pic_infos: &Vec<PictureInfo>) -> io::Result<()> {
     writeln!(f, "<title>{PAGE_TITLE}</title>")?;
     write_head(&mut f)?;
 
-    for pic in pic_infos {
+    for pic in &pic_infos[0..10] {
         writeln!(
             f,
             "<link rel=\"preload\" as=\"image\" href=\"/{THUMBS_PATH}/{name}.webp\">",