HugoPortfolioBlog

srinidhi-github-blog — Hugo Portfolio Template

By srinidhibhat45

A Hugo-based static blog and portfolio site template with a GitHub-style interface, generating pages from Markdown content and TOML configuration, supporting pinned posts, summary truncation, LaTeX formulas, and last modified time.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-03View source

What stands out

A quick read of the recorded project description.

01

Hugo static site with content managed as Markdown files, and posts located in the content/post directory

02

GitHub-style interface, with the homepage supporting a readme.md as the site introduction

03

Setting pin: true in the front matter pins a post

04

Supports two summary truncation methods: the summary field or <!--more-->

05

Enabling math in the front matter causes KaTeX to render inline and block formulas

06

config.toml can configure the author, social accounts, custom links, RSS, and favicon

Template Details

This is a Hugo static site template. The repository is named srinidhi-github-blog, and the README states that its theme is github-style. Site content is organized as Markdown files, with posts placed in the content/post directory and created via hugo new post/title.md; Hugo generates drafts with draft: true by default, and they must be changed to false to appear on the site. A readme.md can be placed on the homepage as a personal introduction or site description.

The template provides several content control capabilities: setting pin: true in the front matter pins a post; the summary field or the <!--more--> marker controls the summary range displayed on list pages, with the difference being that summary does not appear in the body text. Enabling lastmod in config.toml and configuring the frontmatter allows the post's last modified time to be displayed. Adding math: true to a post's front matter (the README example writes katex: math) causes KaTeX to automatically render \( ... \) inline formulas and $$ ... $$ block formulas.

Configuration is centralized in config.toml, where you can set the site title, author, description, social accounts (GitHub, Facebook, Twitter, LinkedIn, Instagram, Tumblr, email), keywords, RSS, favicon, location information, and a custom link list. The README also provides a deploy.sh example that publishes build output to the gh-pages branch via git worktree, and recommends setting HUGO_ENV=production for production builds to enable Google Analytics.

The repository uses the MIT license, allowing free use, modification, commercial use, and distribution of the code, provided the copyright and license notice are retained; demo images, fonts, icons, and other third-party assets, as well as external services such as domains and hosting, require separate verification of licensing and fees. The repository has 0 stars and was last updated in 2021. The README is mainly based on the upstream github-style theme's documentation and provides no additional information about accessibility, browser compatibility, or long-term maintenance status.

HugoPortfolioBlog

Is it right for your project?

Use Cases

  • Building a personal technical blog and publishing Markdown posts
  • Creating a portfolio or resume-style site with a personal introduction homepage
  • Blogs that need pinned key posts or control over summary display on list pages
  • Writing technical notes or study records that include mathematical formulas

Suitable For

  • Individual developers familiar with or willing to learn Hugo and Markdown
  • Users who need a static blog that can be hosted on GitHub Pages or Netlify
  • Writers who prefer a GitHub visual style interface
  • Users who want to freely modify and distribute code under the MIT license

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    First run hugo new site mysite to create a site, then add the theme to themes/github-style as a git submodule

  2. 2

    When upgrading from an older version, rename content/posts to content/post

  3. 3

    New posts default to draft: true and must be changed to false to be displayed

  4. 4

    Fill in baseURL, title, author, social accounts, and other parameters in config.toml

  5. 5

    The README provides a deploy.sh example that publishes to the gh-pages branch via git worktree; for production builds, setting HUGO_ENV=production is recommended

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not mean that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Enabling Google Analytics requires applying for an account and filling in a tracking ID; this is an external service and may involve privacy and compliance requirements.
  • The deployment example relies on the Hugo command-line tool and git worktree to publish to the gh-pages branch, and you must prepare the build and hosting environment yourself.
  • The theme is introduced from the upstream repository as a git submodule, and its use and updates require access to that external GitHub repository.
  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional fees.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

googleAnalytics = "UA-123456-789"

Original README

env HUGO_ENV="production" hugo -t github-style

Original README

git submodule add [email protected]:MeiK2333/github-style.git themes/github-style

Original README
https://github.com/srinidhibhat45/srinidhi-github-blog/blob/main/LICENSEhttps://github.com/srinidhibhat45/srinidhi-github-blog/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-03. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
Partly documented · 70 / 100
Technologies
Hugo
Website type
Portfolio · Blog
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2021-04-15
Screenshot last checked
2026-10-03

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Hugo as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-04

Inspect the recorded source material

SHA-256: 77b2f5808f623d2fbb39014550615d3b7960ab747f2b495f5558dc859896fd99

2026-10-03T22:38:37.161Z

Source file / repository
# github-style

## Init hugo site

```bash
hugo new site mysite
cd mysite
```

## Install the theme

```bash
git submodule add [email protected]:MeiK2333/github-style.git themes/github-style
```

## Update the theme

If you just installed the theme, it is already in the latest version. If not, you can update using the below commands

```bash
cd themes/github-style
git pull
```

Then, you need to rename the previous `posts` folder to `post`

```bash
cd <you-project-folder>
mv content/posts content/post
```

## Setup readme

```bash
hugo new readme.md
echo '`Hello World!`' > content/readme.md
```

## Pin post

```
---
pin: true
---
```

## Add new post

Hugo will create a post with `draft: true`, change it to false in order for it to show in the website.

```
hugo new post/title_of_the_post.md
```

## Limit display content

### Approch 1: use summary

```
---
title: "title"
date: 2019-10-22T18:46:47+08:00
draft: false
summary: "The summary content"
---
```

### Approch 2: use `<!--more-->`

Use `<!--more-->` to seperate content that will display in the posts page as abstraction and the rest of the content. This is different from summary, as summary will not appear in the post.
```
---
title: "title"
date: 2019-10-22T18:46:47+08:00
draft: false
---
abstraction show in the post page
<!--more-->
other content
```

## add last modified data

add to `config.toml`

```toml
lastmod = true

[frontmatter]
  lastmod = ["lastmod", ":fileModTime", ":default"]
```

## Support LaTex

In you post add `math: true` to [front matter](https://gohugo.io/content-management/front-matter/)

```
---
katex: math
---
```

Then the [katex script](https://katex.org/docs/autorender.html) will auto render the string enclosed be delimiters.

```
# replace ... with latex formula
display inline \\( ... \\)
display block $$ ... $$
```

![latex example](images/latex_example.png)

## config.toml example

```toml
baseURL = "https://meik2333.com/"
languageCode = "zh-cn"
title = "MeiK's blog"
theme = "github-style"
googleAnalytics = "UA-123456-789"
pygmentsCodeFences = true
pygmentsUseClasses = true

[params]
  author = "MeiK"
  description = "In solitude, where we are least alone."
  github = "MeiK2333"
  facebook = "MeiK2333"
  twitter = "MeiK2333"
  linkedin = "MeiK2333"
  instagram = "MeiK2333"
  tumblr = "MeiK2333"
  email = "[email protected]"
  url = "https://meik2333.com"
  keywords = "blog, google analytics"
  rss = true
  lastmod = true
  favicon = "/images/github.png"
  location = "China"

  [[params.links]]
    title = "Link"
    href = "https://github.com/meik2333"
  [[params.links]]
    title = "Link2"
    href = "https://meik2333.com"
    icon = "https://meik2333.com/images/avatar.png"

[frontmatter]
  lastmod = ["lastmod", ":fileModTime", ":default"]

```

## deploy.sh example

There are various way to deploy to github, here is a link to official [document](https://gohugo.io/hosting-and-deployment/hosting-on-github/).

Here is an sample. Note line 22 have `env HUGO_ENV="production"`, makes sure googleAnalysis is loaded during production, but is not loaded when we are testing it in localhost.

```bash
#!/bin/sh

if [ "`git status -s`" ]
then
    echo "The working directory is dirty. Please commit any pending changes."
    exit 1;
fi

echo "Deleting old publication"
rm -rf public
mkdir public
git worktree prune
rm -rf .git/worktrees/public/

echo "Checking out gh-pages branch into public"
git worktree add -B gh-pages public origin/gh-pages

echo "Removing existing files"
rm -rf public/*

echo "Generating site"
env HUGO_ENV="production" hugo -t github-style

echo "Updating gh-pages branch"
cd public && git add --all && git commit -m "Publishing to gh-pages (publish.sh)"

#echo "Pushing to github"
#git push --all
```

Then you can verify the site is working and use `git push --all` to push the change to github. If you don't want to check again every time, you can uncomment the `#git push --all` in the script.
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.