Skip to content

Commit b31a1ba

Browse files
committed
Authoring: add nested docs/blog archetype and new-post helper
- archetypes/docs/blog/index.md so uses our template - scripts/new-post helper to create bundles under content/docs/blog - config: enable Chroma highlighting with 'github' style
1 parent 5782745 commit b31a1ba

8 files changed

Lines changed: 77 additions & 2 deletions

File tree

archetypes/docs/blog/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: true
5+
description: ""
6+
tags: []
7+
categories: []
8+
url: "/blog/{{ .Name }}/"
9+
bookToC: true
10+
---
11+
12+
Intro paragraph here.
13+
14+
## Section
15+
16+
Write your content...
17+

assets/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,8 @@
236236
padding-top: .75rem;
237237
border-top: 1px solid rgba(127,127,127,.25);
238238
}
239+
240+
.video, .embed { position: relative; padding-top: 56.25%; }
241+
.video iframe, .embed iframe {
242+
position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
243+
}

config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ enableRobotsTXT = true
1111
[markup.tableOfContents]
1212
startLevel = 1
1313

14+
[markup.highlight]
15+
style = "github"
16+
lineNumbers = false
17+
1418
[params]
1519
BookTheme = "auto"
1620
BookToC = true

content/docs/blog/autoencoder.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
---
2-
title: "What are autoencoders so effective in machine learning?"
2+
title: "Why autoencoders are so effective?"
33
date: 2025-08-31
44
draft: false
55
url: "/blog/autoencoder/"
66
---
77

8-
Test post.
8+
# Why Autoencoders are so effective?
9+
10+
With the recent advances in the Artificial intelligence and machine learning field, we now have access to a wide range of technologies that enable computer systems to tackle a variety of data problems efficiently. Autoencoders are an unsupervised learning technique in which we leverage neural networks to learn features of our input data implicitly.
11+
12+
Whether you want to perform dimensionality reduction, denoise images to reconstruct the original images, or detect anomalies in time series problems, or even perform complex analysis such as image segmentation, an autoencoder model can be a solution. In this blog post, you will get familiar with the fundamentals of autoencoder models and learn about their several use cases in real life problems. If you are interested in the video explanation of this topic, make sure to watch the following Youtube video where I briefly talk about autoencoders and their application:
13+
14+
<div class="youtube-container">
15+
<iframe src="https://www.youtube.com/embed/Yowt72Ic6yI" allowfullscreen></iframe>
16+
</div>
17+
18+
19+
## What is an autoencoder?
20+
21+
An autoencoder is a type of artificial neural network that takes some kind of input data which can be images, vectors, audio or whatever, and it first compresses the original input data into a lower dimension and then uses this lower dimensional representation of the data to recreate the original input!
22+
23+
The question is why should we care about reconstructing the same input? Infact, we don’t care about the output but rather we care about compressed lower dimensional representation of the input data. By training the data to minimize the error between the original data and its reconstructed version, the model utilizes the neural network to find the most efficient representation of the input data which contains the most important features. And those features will be summarized in the latent space.
24+

layouts/shortcodes/iframe.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div class="embed">
2+
<iframe
3+
src="{{ .Get "src" }}"
4+
title="{{ .Get "title" | default "Embedded content" }}"
5+
loading="lazy" allowfullscreen>
6+
</iframe>
7+
</div>
8+

layouts/shortcodes/youtube.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div class="video">
2+
<iframe
3+
src="https://www.youtube.com/embed/{{ .Get "id" }}"
4+
title="{{ .Get "title" | default "YouTube video" }}"
5+
loading="lazy" allowfullscreen>
6+
</iframe>
7+
</div>
8+

scripts/new-post

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if [ $# -lt 1 ]; then
5+
echo "Usage: scripts/new-post \"Post Title\"" >&2
6+
exit 1
7+
fi
8+
9+
title="$*"
10+
# slugify: lower, non-alnum -> dash, trim dashes
11+
slug=$(printf '%s' "$title" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g;s/^-+//;s/-+$//')
12+
13+
echo "Creating: content/docs/blog/${slug}/index.md"
14+
hugo new "docs/blog/${slug}/index.md"
15+
16+
echo "Done. Edit: content/docs/blog/${slug}/index.md"
17+
149 KB
Loading

0 commit comments

Comments
 (0)