Social Meta

Share links with images on Facebook and Twitter.

After Dark provides Open Graph Protocol and Twitter Cards metadata in pages to achieve rich sharing cards on Facebook, Twitter and more:

Open Graph sharing card screenshot

Adjust author in Site Configuration to specify name shown, if any:

[params]
  author = "Bali Bebas!"

Set or override author per page using Front Matter as shown here:

title = "Become a Digital Nomad in Bali: The Lost Guide"
description = "Everything you need to know to become a Digital Nomad in Bali."
author = "After Dark"
date = "2017-02-02T11:57:24+08:00"
publishdate = "2017-01-28T02:31:22+08:00"
images = [
  "https://source.unsplash.com/-09QE4q0ezw/2000x1322"
]

Adjust images to specify an external image or, if using Page Bundles, specify the relative path to the image resource to use:

images = [
  "/post/post-title/images/lana-abie-581813-unsplash.jpg"
]
Why use arrays? Open Graph supports multiple image sizes. And though After Dark doesn’t support multiple sizes, users can create custom layouts that do.

If no page-level image is provided After Dark will fallback to a site-wide image which may be adjusted or removed from Site Configuration:

[params]
  images = [
    "https://source.unsplash.com/-09QE4q0ezw/2000x1322" # site-wide og:image
  ]

See Unsplash and Unsplash Source for thousands of royalty-free images.

Connecting to server…
0 hashes (0 h/s)