Articles

In-depth articles and tutorials

Welcome to the articles section. Here you’ll find comprehensive articles, tutorials, and deep-dive content on various topics related to web development, technology, and best practices.

This section demonstrates how Hugo automatically creates sections from content folders, making it easy to organize different types of content.

Advanced Hugo Sections

This is the second article, demonstrating how multiple articles appear in the same section.

Advanced Section Features

Hugo sections provide powerful features for content organization:

Custom Section Templates

You can create custom templates for each section by placing them in layouts/SECTION/:

  • layouts/articles/list.html - for /articles/ page
  • layouts/articles/single.html - for individual articles

Section Variables

In templates, you can access section-specific data:

{{ .Section }}        // "articles"
{{ .Type }}           // content type
{{ .Pages }}          // all pages in section
{{ .RegularPages }}   // only regular pages

Taxonomies per Section

Each section can have its own taxonomies (tags, categories) with independent organization.

First Article

This is the first article content. Hugo sections allow you to organize content into logical groups, and each section gets its own URL path.

What are Hugo Sections?

Hugo sections are a way to organize your content into logical groups. When you create a folder under content/, Hugo automatically treats it as a section.

Benefits of Using Sections

  • Organization: Keep related content together
  • URLs: Automatic URL structure (/articles/, /news/, etc.)
  • Templates: Custom layouts for different content types
  • RSS: Each section gets its own RSS feed

Example Structure

content/
├── articles/
│   ├── _index.md
│   ├── first-article.md
│   └── second-article.md
└── news/
    ├── _index.md
    └── breaking-news.md

This creates accessible URLs like: