CanDIG / CanDIG/candig.github.io
Twitter cards/image unfurls don't work in PR previews
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
When Cloudflare does a preview on a local branch, it renders the page at a URL like https://f707160d.candig-github-io.pages.dev. Relative URLs for new images and resources in the branch will work, but absolute URLs won't.
That works for most things (e.g. new blog posts) but not for image unfurls (e.g. what you get as a preview of a page when you post the link into slack or twitter). That's because the Jekyll template creates absolute URLs. https://github.com/CanDIG/candig.github.io/blob/production/_includes/head.html#L50. We should try getting rid of that prefixing and see if (a) it breaks any existing posts and (b) if it works for new branches so we can test the unfurling ahead of time before publishing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at _includes/head.html around line 50, where the Jekyll template creates absolute URLs for images and resources. Check the effect of removing that prefix on existing posts, then use a Cloudflare preview URL to test whether new-branch pages produce working image unfurls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jekyll
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100