fission-codes / swag.fission.codes

https://swag.fission.codes
Other
1 stars 0 forks source link

Add social meta-tags to YAML #2

Closed bmann closed 4 years ago

bmann commented 4 years ago

Social previews are even more key for landing pages:

matheus23 commented 4 years ago

I've added a way to configure some metadata for pages in the yaml file: https://github.com/matheus23/swag.fission.codes/blob/d64ec5a203bbd46055434b91bf624e3ab9a31371/content/index.yml#L1-L7

However, there's some metadata for the page (mostly metadata for configuring appearance as an app, if added to the home screen), that can't be easily configured in yaml files, because of the way elm-pages works here: https://github.com/matheus23/swag.fission.codes/blob/d64ec5a203bbd46055434b91bf624e3ab9a31371/src/Main.elm#L21-L34

Keep in mind that at the moment the preview image for social metadata will only work, when the site is live under https://swag.fission.codes (Or whatever is configured here). For testing purposes I just change that url and rebuild.

E.g. here is the latest commit with the canonical site url changed: https://muscular-angular-red-crow.fission.app

bmann commented 4 years ago

@matheus23 is this ready for merging? I’d like to get both this and swag done done and then we can move on.

matheus23 commented 4 years ago

Yeah, apart from the copywriting on the metadata, this is ready :+1:

matheus23 commented 4 years ago

I've added another property for configuration to the yaml "summary_type", which can be "large" or "normal". This changes how the preview card appears on twitter or discord. When we only have an icon to show, it makes sense to have a smaller preview, I think.