postcards icon indicating copy to clipboard operation
postcards copied to clipboard

Add meta og tags

Open monkeywithacupcake opened this issue 3 years ago • 1 comments

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 title and image information.

Using this in the yaml:

meta:
  description: "data.coffee.run"
  url: "https://monkeywithacupcake.github.io"
  twitter: "jessachandler"

**results in this in the html header: **

 <meta name="description" content="data.coffee.run" />
      <meta name="twitter:description" content="data.coffee.run" />
      <meta name="og:description" content="data.coffee.run" />
      <meta name="twitter:title" content="Cheers!" />
      <meta name="og:title" content="Cheers!" />
      <meta name="twitter:url" content="https://monkeywithacupcake.github.io" />
      <meta property="og:url" content="https://monkeywithacupcake.github.io" />
      <meta name="twitter:image:src" content="https://monkeywithacupcake.github.io/jess.jpg" />
      <meta property="og:image" content="https://monkeywithacupcake.github.io/jess.jpg" />
      <meta name="twitter:card" content="summary" />
      <meta name="twitter:creator" content="@jessachandler" />
      <meta name="twitter:site" content="@jessachandler" />

and this twitter card:

Screen Shot of twitter card validator

monkeywithacupcake avatar Apr 03 '21 00:04 monkeywithacupcake

This would be a good place to try a template partial: https://pandoc.org/MANUAL.html#partials

hadley avatar Jan 02 '22 20:01 hadley