Using relref to Get Relative Permalink
We can use relref to get the relative permalink to a page for the href attribute of <a>.
We can use relref to get the relative permalink to a page for the href attribute of <a>.
We can use ref to get the absolute permalink to a page for the href attribute of <a>.
If we use Markdown to define a variable, we can use markdownify to transform Markdown to HTML.
Hugo provides humanize function to make a String with the first letter capitalized.
For user-defined variable, we can either define it as site variable or page variable. $.Param reads page variable first. If it doesn’t exist, then read site variable.
We can use default to provide the default value of the template variable instead of using if else.
Except for px, em and rem are popular units for font size.
If we use <iframe> with other page in different domains. we can use CustomEvent or postMessage to communicate between each other.
As for extracting Floating-point Number to finite digit, we can use parseInt or toFixed.
We can convert from Number to String by String, toString, Type Coercion or Template String.