Hugo Profile includes a standalone gallery page type powered by viewer.js for lightbox image browsing. Clicking any image opens a full-screen overlay with zoom, rotation, and navigation controls. Unlike the homepage sections, the gallery is not aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/gurusabarish/hugo-profile/llms.txt
Use this file to discover all available pages before exploring further.
params entry in hugo.yaml — it is a dedicated content page defined by a gallery.md file in your content/ directory.
Creating the Gallery Page
Create the filecontent/gallery.md with layout: "gallery" in its front matter. Hugo Profile’s gallery.html layout template handles the rest.
Front Matter Fields
The page title displayed as the large heading at the top of the gallery page.
A subtitle shown below the title. Supports emoji shortcodes (e.g.,
:camera:).Enables the viewer.js lightbox. When set to
false, images are displayed as a plain grid with no click-to-expand behaviour, and the viewer.js assets are not loaded.An optional JavaScript options object passed directly to the viewer.js constructor. Use this to customise lightbox behaviour such as hiding the title bar, changing the toolbar, or setting transition animations. See the viewer.js options reference for all available keys.
The list of images to display. Each entry requires a single
src field containing the image URL or site-relative path.Example gallery.md
Adding Gallery to the Navigation Menu
To make the gallery accessible from the top navigation bar, add an entry to theMenus.main list in your hugo.yaml:
The
weight value controls the order of menu items. Lower numbers appear first. Adjust it alongside your other menu entries (e.g., Blog) to control placement.viewer.js Options
TheviewerOptions front matter field accepts any configuration object supported by viewer.js and is passed directly into the constructor call. For example, to disable the image title overlay:
Cloudinary Integration
Ifcloudinary_cloud_name is set in params, Hugo Profile can serve responsive, CDN-hosted images using the dynamic-img shortcode. Add the shortcode calls in the body of your gallery.md (below the front matter delimiter) instead of using galleryImages:
| Parameter | Description | Default |
|---|---|---|
src | Image path on Cloudinary (required) | — |
title | Alt text and tooltip for the image | — |
width | Cloudinary width transformation (e.g., w_800) | w_auto |
style | Inline CSS applied to the <img> element | max-width:80% |
The
dynamic-img shortcode requires your images to be uploaded and hosted on Cloudinary. Set params.cloudinary_cloud_name to your Cloudinary cloud name in hugo.yaml to activate this feature.