Update dependencies and templates: bump templ to v0.3.943, update pflag to v1.0.7, and golang.org/x/net to v0.43.0; adjust XML declaration formatting in cover template

This commit is contained in:
2025-08-24 17:11:14 +10:00
parent 26f82dd9ea
commit ed5440f5fb
9 changed files with 48 additions and 43 deletions

View File

@@ -241,8 +241,8 @@ func CreateContentOPF(outputPath string, uuid string, volume *model.Volume, extr
})
for filename := range chapter.Content.Images {
item := model.ManifestItem{
ID: fmt.Sprintf("chapter-%03v-%s", i, filepath.Ext(filename)),
Link: fmt.Sprintf("OEBPS/Images/chapter-%03v/%s", i, filepath.Ext(filename)),
ID: fmt.Sprintf("chapter-%03v-%s", i, filepath.Base(filename)),
Link: fmt.Sprintf("OEBPS/Images/chapter-%03v/%s", i, filepath.Base(filename)),
Media: fmt.Sprintf("image/%s", strings.ReplaceAll(strings.TrimPrefix(filepath.Ext(filename), "."), "jpg", "jpeg")),
}
manifest.Items = append(manifest.Items, item)