dump the current scope in Hugo
{{ . | jsonify (dict "indent" " ") }}
or dump a variable
{{ $var | jsonify (dict "indent" " ") }}
Now you will be see what are the variable in this object, so no more guessing during template development.
Jan 22, 2023 | #HUGO
dump the current scope in Hugo
{{ . | jsonify (dict "indent" " ") }}
or dump a variable
{{ $var | jsonify (dict "indent" " ") }}
Now you will be see what are the variable in this object, so no more guessing during template development.
Sometimes you may want to remove certain urls or path from sitemap.xml to improve seo of you website. Here is how you do it for hugo static site generator.
Since hugo and handlebar.js both use same template syntax, directly including the handlebar.js template in hugo will reslut hugo build error. Here is the workaround on How to include Handlebar.js or any js templating library that use the same syntax as hugo templates.
Hugo has inbuilt support to compile sass, scss and js sources. In this article we will explain how to compile Bootstrap’s CSS and JavaScript libraries from source. You can follow the similar approach to compile almost any independent sass, scss and JavaScript libraries.
Learn what is the difference between _index.md and index.md