fixed image paths
This commit is contained in:
parent
2df1640a10
commit
0b3a99f097
2 changed files with 6 additions and 7 deletions
|
|
@ -30,10 +30,6 @@ jobs:
|
|||
cache: true
|
||||
cache-dependancy-path: go.mod
|
||||
|
||||
- name: Clean out junk
|
||||
run: |
|
||||
git clean -ffdx
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
go generate
|
||||
|
|
|
|||
9
main.go
9
main.go
|
|
@ -42,10 +42,12 @@ func portfolioImages(page string) []string {
|
|||
var names []string
|
||||
for _, e := range entries {
|
||||
if filepath.Ext(e.Name()) == ".avif" {
|
||||
names = append(names, e.Name())
|
||||
name := page + "/" + e.Name()
|
||||
names = append(names, name)
|
||||
}
|
||||
}
|
||||
sort.Strings(names)
|
||||
|
||||
return names
|
||||
}
|
||||
|
||||
|
|
@ -67,10 +69,11 @@ func portfolioPages() {
|
|||
sort.Strings(pages)
|
||||
|
||||
for i, page := range pages {
|
||||
images := portfolioImages(page)
|
||||
if i == 0 {
|
||||
saveFile("portfolio", html.Portfolio(portfolioImages(page), "portfolio", pages))
|
||||
saveFile("portfolio", html.Portfolio(images, "portfolio", pages))
|
||||
} else {
|
||||
saveFile(to_url(page), html.Portfolio(portfolioImages(page), to_url(page), pages))
|
||||
saveFile(to_url(page), html.Portfolio(images, to_url(page), pages))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue