<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Hugo on MIZE</title><link>https://mizerc.github.io/categories/hugo/</link><description>Recent content in Hugo on MIZE</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://mizerc.github.io/categories/hugo/index.xml" rel="self" type="application/rss+xml"/><item><title>Hugo</title><link>https://mizerc.github.io/posts/002-hugo-setup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mizerc.github.io/posts/002-hugo-setup/</guid><description>&lt;p&gt;Hugo is a popular static site generator written in the Go programming language.
It is a tool that builds websites from your content files defined as simple text files (usually &lt;code&gt;Markdown&lt;/code&gt;, but also &lt;code&gt;Emacs Org Mode&lt;/code&gt; or &lt;code&gt;AsciiDoc&lt;/code&gt;).
The you run &lt;code&gt;hugo build&lt;/code&gt;, and it generates a folder of plain HTML, CSS and JavaScript files ready to be hosted on the internet.&lt;/p&gt;
&lt;h2 id="installing-hugo"&gt;Installing Hugo&lt;/h2&gt;
&lt;p&gt;In macOS, you can install Hugo using Homebrew.&lt;/p&gt;</description></item><item><title>Hugo: Adding Support to TeX</title><link>https://mizerc.github.io/posts/003-hugo-tex/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mizerc.github.io/posts/003-hugo-tex/</guid><description>&lt;p&gt;The &lt;a href="https://katex.org/"&gt;KaTeX&lt;/a&gt; library allow you to enable TeX support to your hugo website.
The library supports all major browsers.
TeX syntax allows us to write mathematical formulas and scientific symbols easily.&lt;/p&gt;
&lt;p&gt;$$
\int_a^b f(x) dx
$$&lt;/p&gt;
&lt;h3 id="installing"&gt;Installing&lt;/h3&gt;
&lt;p&gt;To install, we just need to import the library files from some CDN to our Hugo website.
One way to do this is using the &lt;strong&gt;Hugo partials&lt;/strong&gt; which allow us to import small HTML context.&lt;/p&gt;</description></item><item><title>Hugo: Adding Support to HTML Canvas</title><link>https://mizerc.github.io/posts/004-hugo-canvas-support/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mizerc.github.io/posts/004-hugo-canvas-support/</guid><description>&lt;script type="importmap"&gt;
{
"imports": {
"three": "https://unpkg.com/three@0.160.0/build/three.module.js"
}
}
&lt;/script&gt;
&lt;p&gt;This post walks through how to add an HTML Canvas to a Hugo site, with additional guidance on including external JavaScript libraries from a CDN, such as Three.js to render the cube shown below:&lt;/p&gt;
&lt;!-- If you need to add HTML canvas or import JavaScript libraries from a CDN in your Hugo website, this post will walk you thru on how to do that.
In the end you will be able to use HTML canvas to render things like a 3d rotating cube from your markdown file: --&gt;
&lt;style&gt;
p.canvasjs-label {
text-align: center;
font-family: 'Georgia', serif;
color: #555;
font-size: 0.8rem;
text-align: center;
font-style: italic;
line-height: 1.3;
}
&lt;/style&gt;
&lt;div style="display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 16px;"&gt;
&lt;div style="width: 500px; height: 500px; margin: 8px;" id="div-container-cube1"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script type="module" src="scripts/cube1.js"&gt;&lt;/script&gt;
&lt;h3 id="hugo-shortcodes"&gt;Hugo Shortcodes&lt;/h3&gt;
&lt;p&gt;Adding support to a new HTML DOM in your Hugo site is possible using Hugo &lt;a href="https://gohugo.io/content-management/shortcodes/"&gt;shortcodes&lt;/a&gt;.
Which is a way to add custom HTML elements to your website like image, video, and HTML canvas.
The shortcode is a HTML template invoked within markup, accepting any number of arguments.&lt;/p&gt;</description></item></channel></rss>