zooniverse / Talk-archiver

A static site generator for old Talk forums, based on elevenpack.
Apache License 2.0
0 stars 1 forks source link

og:url contains the wrong URL #59

Closed eatyourgreens closed 4 years ago

eatyourgreens commented 4 years ago

og:url, in the head of each page, is being published with the wrong URLs. Here are some examples: https://talk.sciencegossip.org/recent

<meta property='og:url' content="https://talk.talk.sciencegossip.org/recent/" />

https://talk.higgshunters.org/recent/

<meta property='og:url' content="https://talk.higgs_hunter/recent/" />

This is a bug in the project code, which assumes that the Talk domain can be generated by swapping talk. for www. in the first build arg. However, the first build arg might be the Talk domain, or the name of an S3 bucket.

eatyourgreens commented 4 years ago

Chimp & See has no bucket path set, so we can't always rely on bucket path to give us the domain. https://api.zooniverse.org/projects/chimp

eatyourgreens commented 4 years ago

Partially fixed by d80ccf5.

We still need to handle cases where we build by project name (because the bucket path is undefined or ambiguous eg.

yarn build chimp

builds talk.chimpandsee.org.

Also cases where the bucket path does not map directly to the talk domain by prepending talk. eg.

yarn build quench.galaxyzoo.org

builds quenchtalk.galaxyzoo.org.