Homepage Configuration

Contents â–¾

The Sans theme offers three distinct homepage layouts to accommodate various website styles and content presentation preferences. This guide provides detailed configuration instructions for each layout type.


Available Homepage Layouts

The theme supports three homepage variations, each designed for specific use cases:

Layout TypeUse CaseComplexity
Only PostsMinimal blog or news siteSimple
Logo PagePersonal portfolio or branding siteModerate
Blog PageFull-featured blog with hero sectionAdvanced
Table: Homepage Layout Options

1. Only Posts Layout

This streamlined layout presents a chronological list of posts with titles and publication dates, ideal for content-focused websites.

Fig: Only Posts Homepage Layout

Fig: Only Posts Homepage Layout

2. Logo Page Layout

A centered avatar-based layout featuring minimal biographical information, suitable for personal portfolios and professional profiles.

Fig: Logo Page Homepage Layout

Fig: Logo Page Homepage Layout

3. Blog Page Layout

A comprehensive blog homepage featuring a hero section, newsletter integration, and enhanced post previews with metadata and cover images.

Slideshow image
Hero Section
Slideshow image
Newsletter Section
Slideshow image
Posts Display

Blog Page Homepage Layout


Configuration Instructions

Only Posts Layout

This layout provides a minimalist approach, displaying only post titles and publication dates.

Configuration Parameters

Navigate to config/params.toml and apply the following configuration:

TOML
1
2
3
[homepage]
  onlyPostsInHomePage = true
  dateFormat = "2 Jan 2006"
ParameterValueDescription
onlyPostsInHomePagetrueEnables the posts-only homepage layout
dateFormat2 Jan 2006Defines the date display format (Go time format)
Table: Only Posts Configuration

Additional Notes


Logo Page Layout

This layout features a centered avatar with essential biographical information and optional social media links.

Configuration Parameters

TOML
1
2
3
4
5
6
7
8
9
[homepage]
  onlyPostsInHomePage = false
  homePageLogo = true
  homePageTitle = "JOHN DOE"
  homePageTagLine = "Welcome to my website"
  homePageLogoPath = 'images/avatar.png'
  homePageAbout = "Hi! I'm John Doe, a passionate blogger and portfolio creator. Explore my latest posts and projects here."
  dateFormat = "2 Jan 2006"
  showSocialLinksHome = true
ParameterTypeDescription
onlyPostsInHomePagebooleanMust be set to false to enable this layout
homePageLogobooleanActivates the logo-centered layout
homePageTitlestringPrimary heading displayed on homepage
homePageTagLinestringSubtitle or catchphrase beneath the title
homePageLogoPathstringPath to avatar image relative to assets/images/
homePageAboutstringBiographical description text
dateFormatstringDate formatting specification
showSocialLinksHomebooleanControls social media link visibility
Table: Logo Page Configuration Parameters

Image Asset Location

Place your avatar image in the following directory structure:

TEXT
1
2
3
4
your-hugo-site/
└── assets/
    └── images/
        └── avatar.png

Reference the image using the relative path: images/avatar.png

Social Media Integration

Social media link visibility is controlled by the showSocialLinksHome parameter:

Add your social media profiles in hugo.toml:

TOML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
[social]
  facebook = "https://facebook.com/yourpage"
  x = "https://x.com/yourhandle"
  instagram = "https://instagram.com/yourhandle"
  linkedin = "https://linkedin.com/in/yourprofile"
  youtube = "https://youtube.com/@yourchannel"
  tiktok = "https://tiktok.com/@yourhandle"
  github = "https://github.com/yourusername"
  reddit = "https://reddit.com/u/yourusername"
  pinterest = "https://pinterest.com/yourhandle"
  snapchat = "https://snapchat.com/add/yourhandle"
  discord = "https://discord.gg/yourinvite"
  twitch = "https://twitch.tv/yourchannel"
  telegram = "https://t.me/yourhandle"
  whatsapp = "https://wa.me/yourphonenumber"
  mastodon = "https://mastodon.social/@yourhandle"
  bluesky = "https://bsky.app/profile/yourhandle"
  threads = "https://threads.net/@yourhandle"
  medium = "https://medium.com/@yourhandle"

Note: Only parameters with assigned values will be displayed. To hide specific platforms, remove or comment out the corresponding lines.


Blog Page Layout

The most feature-rich homepage layout, incorporating a hero section with welcome message, newsletter subscription functionality, and enhanced post previews.

Configuration Parameters

TOML
1
2
3
4
5
6
7
8
9
[homepage]
  onlyPostsInHomePage = false
  homePageLogo = false 
  homePageCoverPath = 'images/img_forest.jpg'
  homePageCoverTitle = "Welcome to our blog and portfolio."
  homePageCoverTagLine = "Discover insights, stories, and ideas that inspire. Join our community of readers exploring the latest trends and timeless wisdom."
  homePageSummaryLength = 500
  homePagePostDate = false 
  dateFormat = "2 Jan 2006"
ParameterTypeDescription
onlyPostsInHomePagebooleanMust be false to enable blog page layout
homePageLogobooleanMust be false to activate blog page layout
homePageCoverPathstringPath to hero section background image
homePageCoverTitlestringPrimary heading in hero section
homePageCoverTagLinestringDescriptive text displayed in hero section
homePageSummaryLengthintegerMaximum character count for post summaries
homePagePostDatebooleanControls date display in post previews
dateFormatstringDate formatting specification
Table: Blog Page Configuration Parameters

Layout Activation Logic

The Blog Page layout is automatically activated when both onlyPostsInHomePage and homePageLogo are set to false. This hierarchical configuration system ensures only one layout is active at any time.

Post Preview Features

The Blog Page layout enhances post displays with:


Layout Selection Guide

Choose the appropriate homepage layout based on your website’s primary purpose:

LayoutBest ForKey Features
Only PostsContent-focused blogsMinimal design, fast loading, emphasizes content
Logo PagePersonal portfoliosProfessional presentation, social integration, branding focus
Blog PageFull-featured blogsRich media, newsletter integration, enhanced post previews
Table: Homepage Layout Comparison

Date Format Reference

The dateFormat parameter uses Go’s time formatting syntax. Common formats:

Format StringOutput ExampleDescription
2 Jan 200623 Nov 2025Day, abbreviated month, year
January 2, 2006November 23, 2025Full month name, day, year
2006-01-022025-11-23ISO 8601 format
02/01/200623/11/2025Day/Month/Year
Jan 2Nov 23Abbreviated month and day
Table: Common Date Formats