Viet's Blog

Access Hugo Page Variables

  • Apr 30, 2017
  • POST
Challenge Earlier today I had difficulty integrating with Facebook Open Graph and called their Open Graph Debugger for help. I also used Twitter Card Validator to verify if the page can be rendered as a Twitter card. There were still missing pieces from meta data. The complete Open Graph and Twitter card meta data would look like this: <!-- Provide absolute URLs --> <meta name="title" content="Page Title for Search Engines Results | Website Name" /> <meta name="description" content="Page Description for Search Engine Results" /> <meta property="og:title" content="Page Title for Facebook" /> <meta property="og:description" content="Page Description for Facebook" /> <meta property="og:image" content="https://www.

About

  • Apr 30, 2017
I love food, photography, traveling, and have huge interest in entrepreneurship and start-ups. I’m currently a Senior Software Engineer at Bloomberg. I write financial software for living and love sharing my passion with fellow developers and students.

Facebook Open Graph Debugger & Twitter Cards Validator

  • Apr 30, 2017
  • POST
Blogging engines such as WordPress and Ghost should take care of images and Facebook Open Graph integration for you. Unfortunately, that’s not the case with Hugo and Octopress. I did a bit of googling and found that we need to have a meta tag og:image in the header for Facebook to show your image when posting. Meta-tags for HTML Header <!-- Provide absolute URLs --> <!-- Sample from https://rickmanelius.com/article/sharing-facebook-how-improve-your-results-customizing-image-title-and-summary-text --> <meta name="title" content="Page Title for Search Engines Results | Website Name" /> <meta name="description" content="Page Description for Search Engine Results" /> <meta property="og:title" content="Page Title for Facebook" /> <meta property="og:description" content="Page Description for Facebook" /> <meta property="og:image" content="https://www.

Permalinks, Tags, Images, RSS, Sitemap

  • Apr 30, 2017
  • POST
From the previous post, you already know how to use a Hugo theme, write a new entry. Now you want to add tags, permalinks and images for better reading experience. Add Permalinks & Tags By default Hugo does not give you tags, categories and permalinks. This can be quickly remedied by updating your config.toml file: baseURL = "http://vietlq.github.io/" languageCode = "en-us" title = "Viet's Blog" theme = "hugo-geo" [permalinks] post = "/:year/:month/:day/:title/" [taxonomies] category = "categories" tag = "tags" [params] # To satisfy hugo-geo theme header = "Viet's Blog" Author = "Viet Le" Now add tags = ["go", "hugo", "git", "blog", "config", "setup"] to front matter of your entry.

Enter, Hugo

  • Apr 30, 2017
  • POST
Yesterday I spent a couple of hours to set up and config Octopress. It was a good hacking experience and Octopress architecture and design proved overly complex and inconsistent with Jekyll’s simplicity that it built on. There’s no simple way to use a Jekyll theme with Octopress. Apart from that, Octopress has not been in good health since 2015, there were few commits and changes, it’s literally dying. So today I decided to make a bold move to search for new static site generators.

Hello, Octopress

  • Apr 29, 2017
  • POST
The Story I have been looking for ways to make static blogging possible. The danger of having WordPress and its insecure plugins is a no-no for me. A couple of years ago I came across Jekyll and the amount of Ruby dependencies and steps to accomplish a single task was disturbing and it wasn’t a pleasant start. So I sticked with WordPress while still looking for alternatives. Octopress appeared in searches and I gave it a try.
Prev
LATESTS
Make Grub Font Size Bigger
  • Sep 22, 2019
  • POST
Endianness Agnostic ntoh
  • Jun 22, 2019
  • POST
Upcoming Posts
  • Jun 15, 2019
  • POST
Taming Elementary OS
  • May 11, 2019
  • POST
Fix Wifi for Ubuntu on Microsoft Surface
  • May 11, 2019
  • POST
Endianness Detection the Hard Way
  • Jun 17, 2018
  • POST
OCaml Packaging With Topkg and OPAM
  • May 28, 2018
  • POST
Safer C++ By Handling Function Result
  • May 12, 2018
  • POST
P2P Browsing Web With Beaker and Dat
  • Mar 31, 2018
  • POST
Edit and Annotate PDF
  • Mar 30, 2018
  • POST
CATEGORIES
TAGS
  • dev
  • tips
  • ubuntu
  • hugo
  • blog
  • c++
  • config
  • git
  • security
  • social-media

© Viet's Blog

Powered by Hugo.

Robust designed by Daisuke Tsuji.