LinMinquan's Blog

Experience technology to change life

Hugo add meta for Facebook and Twitter share link preview

After analyze a example link that can preview in Facebook & Twitter and search Google, I found it just need to add some meta on blog post’s html header.  One guy give an example code below. <!DOCTYPE html <html lang="en" <head prefix="og: article: website:" <meta http-equiv="content-type" content="text/html; charset=utf-8" <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" <meta name="title" content="{{ .Title }} | {{ .Site.Title }}" <meta name="description" content="{{ .Description }}" <!-- Start of Open Graph -- <meta property=" Read more →