πŸ‘©πŸΌβ€πŸ« Teach academic courses
✨

πŸ‘©πŸΌβ€πŸ« Teach academic courses

Oct 24, 2023Β·
Dariush Azimi
Dariush Azimi
Β· 3 min read
Embed rich media such as videos and LaTeX math
blog

HugoBlox Kit is designed to give technical content creators a seamless experience. You can focus on the content and the HugoBlox Kit which this template is built upon handles the rest.

Embed videos, podcasts, code, LaTeX math, and even test students!

On this page, you’ll find some examples of the types of technical content that can be rendered with Hugo Blox.

Citation

Here’s an example of citing a publication using the cite shortcode:

You can also use the default view by omitting the view parameter:

Video

Teach your course by sharing videos with your students. Choose from one of the following approaches:

Youtube:

{{< youtube D2vj0WcvH5c >}}

Bilibili:

{{< bilibili BV1WV4y1r7DF >}}

Video file

Videos may be added to a page by either placing them in your assets/media/ media library or in your page’s folder, and then embedding them with the video shortcode:

{{< video src="my_video.mp4" controls="yes" >}}

Podcast

You can add a podcast or music to a page by placing the MP3 file in the page’s folder or the media library folder and then embedding the audio on your page with the audio shortcode:

{{< audio src="ambient-piano.mp3" >}}

Try it out:

Test students

Provide a simple yet fun self-assessment by revealing the solutions to challenges with the spoiler shortcode:

{{< spoiler text="πŸ‘‰ Click to view the solution" >}}
You found me!
{{< /spoiler >}}

renders as

πŸ‘‰ Click to view the solution
You found me πŸŽ‰

Math

HugoBlox Kit supports a Markdown extension for $\LaTeX$ math. Enable math by setting the math: true option in your page’s front matter, or enable math for your entire site by toggling math in your config/_default/params.yaml file:

features:
  math:
    enable: true

To render inline or block math, wrap your LaTeX math with $...$ or $$...$$, respectively.

Example math block:

$$
\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}
$$

renders as

$$\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}$$

Example inline math $\nabla F(\mathbf{x}_{n})$ renders as $\nabla F(\mathbf{x}_{n})$.

Example multi-line math using the math linebreak (\\):

$$f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} & \text{if }k=1, \\
1-p_{0}^{*} & \text{if }k=0.\end{cases}$$

renders as

$$ f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} & \text{if }k=1, \\ 1-p_{0}^{*} & \text{if }k=0.\end{cases} $$

Code

HugoBlox Kit utilises Hugo’s Markdown extension for highlighting code syntax. The code theme can be selected in the config/_default/params.yaml file.

```python
import pandas as pd
data = pd.read_csv("data.csv")
data.head()
```

renders as

import pandas as pd
data = pd.read_csv("data.csv")
data.head()

Inline Images

{{< icon name="python" >}} Python

renders as

python Python

Did you find this page helpful? Consider sharing it πŸ™Œ

Dariush Azimi
Authors
Physicist & Computational Specialist

Darius Azimi is a highly analytical Physicist with a robust foundation in Theoretical, subatomic, and Plasma Physics. With a career spanning multiple M.Sc. degrees from top Swedish and Iranian institution, I specialize in bridging the gap between complex theoretical frameworks and practical computational applications. My expertise lies in developing high-fidelity simulationsβ€”using PIC, Monte Carlo, and Molecular Dynamicsβ€”to investigate the linear and non-linear properties of dynamic physical systems. ​I am a published author in journals such as the International Journal of Modern Physics B, where I have contributed to the understanding of statistical physics, binary hard sphere mixtures, and quantum perturbation theory. By combining rigorous mathematical modeling with advanced software development in C++, Fortran, and Python, I deliver high-quality analytical solutions for complex equations using iterative solvers like GMRES and BICGSTAB. Whether driving academic research or consulting on technical subatomic systems, I am dedicated to pushing the boundaries of applied physics through algorithmic innovation and data-driven insights. Outside of my research, I have enjoyed contributing to the Swedish educational system as a substitute teacher, which has further refined my ability to communicate complex ideas in Swedish.