Make profile identity, bio and fonts configurable
The profile header, photo page byline and copyright footer previously
hardcoded the author name, handle, bio, and font choices. Move all of
these to CLI flags on the binary and matching options on the NixOS
module so the same build can serve any single-user gallery.
New surface, all with defaults matching the previous hardcoded values:
--author / services.photogallery.author
--handle / services.photogallery.handle
--bio / services.photogallery.bio
--bio-alt / services.photogallery.bioAlt ("" to omit)
--fonts-url / services.photogallery.fontsURL
--serif-family / services.photogallery.serifFamily
--ml-family / services.photogallery.mlFamily
Templates read the two font families from a small inline <style> that
overrides the :root variables, so the stylesheet stays fully static and
the font URL is loaded via the configured stylesheet link.
README updated to describe the new options, the medium/full-size photo
detail flow, and the EXIF-based date prefill on the upload page.
This commit is contained in:
@@ -12,6 +12,13 @@ func main() {
|
||||
baseURL := flag.String("base-url", "http://localhost:8080", "public base URL, no trailing slash")
|
||||
port := flag.String("port", "8080", "port to listen on")
|
||||
serve := flag.Bool("serve", false, "serve the generated site on the same port (for local development)")
|
||||
author := flag.String("author", "Ashik Salahudeen", "author name shown on the profile header, photo pages and in the copyright footer")
|
||||
handle := flag.String("handle", "@puttaalu@inflo.ws", "handle line shown under the author name on the profile header")
|
||||
bio := flag.String("bio", "Personal photo journal.", "primary bio line shown on the profile header")
|
||||
bioAlt := flag.String("bio-alt", "എന്തിനോ വേണ്ടി തിളയ്ക്കുന്ന സാമ്പാർ", "secondary bio line rendered on a new line in the alt-script font")
|
||||
fontsURL := flag.String("fonts-url", "https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,600;0,700;1,400&family=Manjari:wght@100;400;700&display=swap", "stylesheet URL loading the two web fonts")
|
||||
serifFamily := flag.String("serif-family", "Crimson Pro", "CSS font-family for the primary serif text")
|
||||
mlFamily := flag.String("ml-family", "Manjari", "CSS font-family for the alt-script (Malayalam) bio line")
|
||||
flag.Parse()
|
||||
|
||||
for _, d := range []string{*contentDir, *outputDir} {
|
||||
@@ -20,7 +27,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
g := NewGenerator(*contentDir, *outputDir, *baseURL)
|
||||
g := NewGenerator(*contentDir, *outputDir, *baseURL, *author, *handle, *bio, *bioAlt, *fontsURL, *serifFamily, *mlFamily)
|
||||
|
||||
if err := g.Build(); err != nil {
|
||||
log.Printf("initial build: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user