Skip to content

Instantly share code, notes, and snippets.

@ksuenaga
Created May 16, 2025 15:21
Show Gist options
  • Save ksuenaga/2ab6f38501bd41b1b4b04e50289f39bf to your computer and use it in GitHub Desktop.
Save ksuenaga/2ab6f38501bd41b1b4b04e50289f39bf to your computer and use it in GitHub Desktop.
Recommended Hugo site directory structure for an academic website

Hugo Academic Site Directory Structure

This document outlines the recommended directory structure for Prof. Suenaga's academic website built with Hugo.

ksuenaga.github.io/
├── archetypes/              # Templates for new content
│   ├── default.md
│   ├── publications.md
│   └── research.md
├── assets/                  # CSS, JS, and images that need processing
│   └── scss/
│       └── custom.scss      # Custom styles
├── config.toml              # Main Hugo configuration
├── content/                 # Site content
│   ├── _index.md            # English home page
│   ├── _index.ja.md         # Japanese home page
│   ├── publications/        # Research publications
│   │   ├── _index.md        # Publications landing page (English)
│   │   ├── _index.ja.md     # Publications landing page (Japanese)
│   │   └── papers/          # Individual publication entries
│   │       └── sample-publication.md
│   ├── research/            # Research projects
│   │   ├── _index.md
│   │   └── _index.ja.md
│   ├── teaching/            # Courses and teaching
│   │   ├── _index.md
│   │   └── _index.ja.md
│   └── contact/             # Contact information
│       ├── _index.md
│       └── _index.ja.md
├── data/                    # Data files used in templates
│   └── publications.yaml    # Optional: Additional publication metadata
├── layouts/                 # Custom layouts
│   ├── _default/
│   │   ├── baseof.html
│   │   ├── list.html
│   │   └── single.html
│   ├── partials/
│   │   ├── footer.html
│   │   ├── header.html
│   │   └── nav.html
│   ├── publications/
│   │   ├── list.html
│   │   └── single.html
│   └── shortcodes/
│       └── publication_cite.html
├── public/                  # Generated site (ignored by git)
├── resources/               # Cache directory (ignored by git)
├── static/                  # Static files that don't need processing
│   ├── css/
│   ├── images/
│   │   ├── profile.jpg
│   │   └── favicon.ico
│   ├── js/
│   └── pdfs/
│       └── cv.pdf
├── themes/                  # Site theme
│   └── academic/            # Your chosen theme
├── .gitignore
├── .nojekyll                # Prevents GitHub Pages from using Jekyll
├── netlify.toml             # Optional: Netlify deployment configuration
└── README.md

Explanation of Key Directories

content/

This is where all the actual content of the site lives. Each section of the site (publications, research, teaching, etc.) has its own directory with:

  • _index.md - The English landing page for the section
  • _index.ja.md - The Japanese landing page for the section
  • Individual content files as needed

layouts/

Custom layouts that override or extend the theme's templates. This allows customization without modifying the theme directly.

static/

Static assets that don't need processing, like PDFs and images.

themes/

The chosen theme for the site. The 'academic' theme or another academic-focused theme is recommended.

Multilingual Support

The site supports both English and Japanese with:

  • Primary language: English (default)
  • Secondary language: Japanese (with .ja.md suffix)

Each content file should have both an English and Japanese version for proper multilingual support.

GitHub Actions Workflow

The GitHub Actions workflow is defined in .github/workflows/hugo.yml and handles:

  1. Building the Hugo site
  2. Deploying to GitHub Pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment