Distill Inserting '.' into path of og/twitter previews

I'm working on putting preview images into a distill site. The page compiles fine, but when I look at the page source I see that an extra period is added in the path. I think this is halting og/twitter from picking up the image for the card.

base_url: https://coviddata.conehealth.com
preview: images/hospitalizations.png
twitter:
  site: "@conehealth"

html output

<meta property="twitter:image" content="https://coviddata.conehealth.com/./images/hospitalizations.png"/>

The website is available at:

https://coviddata.conehealth.com/cone.html

Another note is that I am rendering the output to the docs directory in the _site.yml (see below) and then serving from github pages with a CNAME. I have tried to specify the full path in the 'preview' field and distill did not generate the "twitter:image" metaproperty at all.

name: "covid-public"
title: "SARS-CoV-2 Pandemic"
description: |
  SARS-CoV-2 Pandemic
output_dir: "docs"
favicon: images/favicon.ico
base_url: https://coviddata.conehealth.com

Any thoughts or ideas? I don't want to have to write cleaning code to strip the extra element in the path if at all possible.

I can't reproduce this issue. When I add the base_url and preview for the odc in a test website, it works ok for me. The built url is correct (without the dot)

Which version of distill are you using ? Can you update to last version ?

Can you share the source code with the error ?

Hi @cderv...latest version of distill (as of 2021-01-11) and R 4.0.2.

Looks like it was an internal firewall issue that wasn't generating (or displaying) the twitter cards, so no bug at all! I'll close this question.

Thanks for all your help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.