To make each day count

Best Practice With Hugo Shortcodes Function

Franklin Fang / 2022-10-23


Why I write this

It’s my ideal way to write some data visualisation work in the blog instead of jupyter generated html files. It seems that EChatrs is one of the best tools in interactive experience. Under this circumstance, I search several methods online. The easiest solution can be accessed in the Alili’s post

Methods

  1. Locate the shortcodes File (below)

    -- /layouts
    |-- /_default
    |-- /partials
    |-- /shortcodes
    |-- 404.html
    
  2. Create custom html file in shortcodes folder, such as echarts.html

  3. Generate new post and start practice shortcode

CASE

CASE 1: BAR CHART

CASE 2: LINE CHART