Skip to content

Commit

Permalink
change icon and image to full object, lets see if this fixes it for m…
Browse files Browse the repository at this point in the history
…astodo
  • Loading branch information
emad-elsaid committed Nov 30, 2022
1 parent 6b35d15 commit 9817a9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/xlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
--sidebar=false \
--sitemap.domain=xlog.emadelsaid.com \
--activitypub.domain=xlog.emadelsaid.com \
--activitypub.username=me \
--activitypub.username=self \
--activitypub.summary="Xlog is a static site generator for digital gardening written in Go. It serves markdown files as HTML and allows editing files online. It focuses on enriching markdown files and surfacing implicit links between pages."
rm *.md
chmod -R 0777 .
Expand Down
16 changes: 12 additions & 4 deletions extensions/activitypub/activitypub.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ type profileResponse struct {
Inbox string `json:"inbox,omitempty"`
Outbox string `json:"outbox,omitempty"`
Endpoints map[string]string `json:"endpoints,omitempty"`
Icon string `json:"icon,omitempty"`
Image string `json:"image,omitempty"`
Icon map[string]string `json:"icon,omitempty"`
Image map[string]string `json:"image,omitempty"`
}

func profile(w Response, r Request) Output {
Expand All @@ -120,8 +120,16 @@ func profile(w Response, r Request) Output {
Endpoints: map[string]string{
"sharedInbox": fmt.Sprintf("https://%s/+/activitypub/@%s/inbox", domain, username),
},
Icon: fmt.Sprintf("https://%s/public/logo.png", domain),
Image: fmt.Sprintf("https://%s/public/logo.png", domain),
Icon: map[string]string{
"type": "Image",
"mediaType": "image/png",
"href": fmt.Sprintf("https://%s/public/logo.png", domain),
},
Image: map[string]string{
"type": "Image",
"mediaType": "image/png",
"href": fmt.Sprintf("https://%s/public/logo.png", domain),
},
},
)

Expand Down

0 comments on commit 9817a9c

Please sign in to comment.