Open
Conversation
adds meta section to support social sharing if meta vars found. three new variables used: meta.description, meta.url, and meta.twitter reuses variables: title, image
adds meta section to support social sharing if meta vars found. three new variables used: meta.description, meta.url, and meta.twitter reuses variables: title, image
adds meta section to support social sharing if meta vars found. three new variables used: meta.description, meta.url, and meta.twitter reuses variables: title, image
adds meta section to support social sharing if meta vars found. three new variables used: meta.description, meta.url, and meta.twitter reuses variables: title, image
add meta to yaml
add meta to yaml
add meta to yaml
add meta to yaml
remove dashes
remove dashes
remove dashes
remove dashes
add quotes around variables in meta tags
add twitter at
deal with literal at
deal with literal at
deal with literal at
removes self close meta
add closing meta tags
add url to image meta
fixes meta tags and adds url to image
close jolla meta tags and add url image
close meta tags and add image url
explains the meta options in readme
Contributor
|
This would be a good place to try a template partial: https://pandoc.org/MANUAL.html#partials |
hadley
reviewed
Jan 2, 2022
hadley
reviewed
Jan 2, 2022
gadenbuie
reviewed
Jan 3, 2022
gadenbuie
reviewed
Jan 3, 2022
| <meta name="twitter:url" content="$meta.url$"></meta> | ||
| <meta property="og:url" content="$meta.url$"></meta> | ||
| <meta name="twitter:image:src" content="$meta.url$/$image$"></meta> | ||
| <meta property="og:image" content="$meta.url$/$image$"></meta> |
There was a problem hiding this comment.
In addition to og:image, I recommend that postcards also support the og:image:alt and twitter:image:alt tags as well. One option would be to add image_alt or meta.image_alt (or both) to the YAML:
meta:
description: "floatplane data artist"
url: "example.com"
twitter: "yourname"
image: https://example.com/social.png
image_alt: Short description of social card image.
image: avatar.png
image_alt: Short description of avatar image.The two tags to add would be something like
<meta name="twitter:image:alt" content="$if(meta.image_alt)$$meta.image_alt$$else$$image_alt$$endif$"/>
<meta property="og:image:alt" content="$if(meta.image_alt)$$meta.image_alt$$else$$image_alt$$endif$"/>There was a problem hiding this comment.
Relatedly, image_alt could be added here
removes alternative for editing resulting file responding to code review
makes twitter creator conditional on twitter
makes twitter conditional
incorporates alternative urls Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
adds twitter conditional
adds twitter conditional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changes all templates in Pandoc (html) and skeleton (rmd) to allow for automatic meta/og tags without installing another package.
closes #32
relies on the already included
titleandimageinformation.Using this in the yaml:
**results in this in the html header: **
and this twitter card: