Example Hugo site using ilot pages: https://pages.ilot.page/hugo
Find a file
Antoine Martin ccf6c985c3
All checks were successful
/ render (push) Successful in 31s
Remove stray section in README
2026-05-25 13:35:32 -04:00
.forgejo/workflows Fix image URL 2026-05-25 13:11:01 -04:00
assets Update to latest hugo, papermod theme 2026-05-25 13:04:49 -04:00
content Update to latest hugo, papermod theme 2026-05-25 13:04:49 -04:00
resources/_gen/images/images Add new more up to date theme 2025-01-16 12:33:19 +00:00
static add missing file 2016-01-25 09:57:46 +07:00
themes Don't use a custom theme 2022-03-18 07:35:14 +00:00
.gitignore Add resources folder to .gitignore 2026-05-25 13:05:17 -04:00
config.toml Set baseURL to ilot pages 2026-05-25 13:32:25 -04:00
go.mod Update to latest hugo, papermod theme 2026-05-25 13:04:49 -04:00
go.sum Update to latest hugo, papermod theme 2026-05-25 13:04:49 -04:00
LICENSE Initial commit 2014-03-29 07:18:55 -07:00
README.md Remove stray section in README 2026-05-25 13:35:32 -04:00

Build Status


Example Hugo website using Ilot Pages.

Learn more about Ilot Pages at https://pages.ilot.io and the official documentation https://wiki.ilot.io/books/pages


Forge CI

This project's static Pages are built by Forge CI, following the steps defined in .forgejo/workflows/pages.yaml:

on:
  push:
     branches:
       - 'main'

env:
  HUGO_ENV: production
  THEME_URL: "github.com/adityatelange/hugo-PaperMod"

jobs:
  render:
    runs-on: aarch64
    container:
      image: ghcr.io/gohugoio/hugo:v0.160.1
    steps:
      - name: Repo pull
        uses: actions/checkout@v4
        with:
          fetch-depth: 1
          submodules: recursive
      - name: Pages repo pull
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          ref: pages
          path: public
      - name: Render website
        run: hugo --minify
      - name: Website upload
        run: |
          [ -f .domains ] && cp .domains public/.domains || echo '.domains not found, skipping.'
          [ -f _redirects ] && cp _redirects public/_redirects || echo '_redirects not found, skipping.'
          git log -1 --pretty=%B > commit.txt
          cd public
          date > generated.txt
          # Note: the following account information will not work on GHES
          git config user.name "forgejo-actions[bot]"
          git config user.email "pages@ilot.page"
          git add .
          git commit -F ../commit.txt
          git push

Forge makes available to the hosting server whatever files are sent to the pages branch. The workflow does the following:

  1. Fetches ghcr.io/gohugoio/hugo image
  2. Fetches the main branch and submodules, and changes directory into it
  3. Fetches the pages branch under ./public
  4. Renders website to ./public
  5. Copies (if available) .domains and _redirects file if using custom domains or custom directs
  6. Writes current commit information to commit.txt to be picked up later
  7. Commits changes to pages branch, matching commit message
  8. Pushes changes to pages branch

Set baseURL in config.toml

Update the baseURL setting in your config.toml file from "https://pages.ilot.io/hugo/" to your deployed Pages URL.

Building locally

To work locally with this project, you'll have to follow the steps below:

  1. Fork, clone or download this project.

  2. Install git, go, and npm.

  3. Install Hugo.

  4. Install the theme as a Hugo module:

    hugo mod get -u github.com/adityatelange/hugo-PaperMod
    
  5. Preview your project:

    hugo server
    
  6. Add content.

  7. Optional. Generate the website:

    hugo
    

Read more at Hugo's documentation and how to use the theme.

Use a custom theme

Hugo supports a variety of themes.

Visit https://themes.gohugo.io/ and pick the theme you want to use. In the Pages example, we use https://themes.gohugo.io/themes/hugo-papermod/.

Use a custom theme using a Hugo module

The example .pages.yaml uses Hugo modules to import the theme.

To use your own theme, the following steps will help you recreate the hugo modules that include the information of your theme. You must perform them locally:

  1. Edit config.toml and comment out the already existing theme:

    #theme = ["github.com/adityatelange/hugo-PaperMod"]
    
  2. Remove go.mod and go.sum:

    rm -f go.mod go.sum
    
  3. Recreate the theme module:

    hugo mod init gitlab.com/pages/hugo
    
  4. Recreate the checksum:

    hugo mod get -u github.com/adityatelange/hugo-PaperMod
    
  5. Edit config.toml and add the theme back:

    theme = ["github.com/adityatelange/hugo-PaperMod"]
    
  6. Finally, edit .gitlab-ci.yml, and replace the THEME_URL variable with the URL of your theme:

    THEME_URL: "github.com/adityatelange/hugo-PaperMod"
    
  7. Remove the files under content/ as they might be specific to the default theme.

  8. Add content under content/.

  9. Commit all the changes and push them to your repository.

Did you fork this project?

If you forked this project for your own use, please go to your project's Settings and remove the forking relationship, which won't be necessary unless you want to contribute back to the upstream project.

Troubleshooting

CSS is missing!

That means two things:

Minify the assets

If you want to minify the assets (JS, CSS, images, etc.), take a look at the Hugo documentation and at this merge request.