peaceiris / hugo-theme-iris

Hugo IRIS Theme - Portfolio and Blog
https://hugothemeiris.peaceiris.com/
MIT License
70 stars 18 forks source link
hugo hugo-module hugo-theme

Hugo IRIS Theme

Hugo Iris Theme thumbnail [![LICENSE](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/peaceiris/hugo-theme-iris/blob/main/LICENSE) [![release](https://img.shields.io/github/release/peaceiris/hugo-theme-iris.svg)](https://github.com/peaceiris/hugo-theme-iris/releases/latest) [![release date](https://img.shields.io/github/release-date/peaceiris/hugo-theme-iris.svg)](https://github.com/peaceiris/hugo-theme-iris/releases) [![release feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/hugo-theme-iris/releases.atom) ![deploy status](https://github.com/peaceiris/hugo-theme-iris/workflows/CI/badge.svg?branch=main&event=push) [![hugo themes](https://img.shields.io/static/v1?label=Hugo%20Themes&message=IRIS&color=blueviolet)](https://themes.gohugo.io/themes/hugo-theme-iris/) [![lighthouse score](https://img.shields.io/static/v1?label=Lighthouse%20Score&message=Good&color=green)](https://hugothemeiris.peaceiris.com/report.html)

Go to the demo site.

Table of Contents

Overview

This repository includes a Hugo theme.

Features

Roadmap

Back to TOC ☝️

Getting Started

Install Hugo

You can find the minimum supported Hugo version in theme.toml min_version. Using Hugo extended version is desirable.

Install Go

This theme depends on Hugo Modules.

Install Node.js and npm

This theme depends on node and npm.

cf. Installing Node.js via package manager | Node.js

Initialize New Hugo Project

Here is the setup script.

mkdir homepage
wget https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/main/scripts/setup.sh
bash ./setup.sh homepage "your_github_id"
cd homepage
npm ci
hugo server

Customize your site! ʕ◔ϖ◔ʔ

Create a Post Page

hugo new posts/new.md

Create a Slide Page

hugo new --kind slide posts/new-slide.md
Back to TOC ☝️

Customize Theme

TBW.

config

content

assets

data

i18n

static

Back to TOC ☝️

Hosting

Netlify

Deploy to Netlify

GitHub Pages using Actions

The following actions are useful to deploy your site to GitHub Pages using GitHub Actions.

Back to TOC ☝️

Shortcodes

circle

If your logo image is located at assets/images/logo.jpg.

{{< circle src="https://github.com/peaceiris/hugo-theme-iris/raw/main/images/logo.jpg" alt="hugo-theme-iris logo" >}}
Shortcode mermaid

button

<div class="buttons">
  {{< button href="https://gohugo.io/" txt="Hugo Homepage" >}}
  {{< button href="https://github.com/gohugoio/" txt="Hugo GitHub" >}}
  {{< button href="https://discourse.gohugo.io/" txt="Hugo Forum" >}}
  {{< button href="https://twitter.com/GoHugoIO" txt="Hugo Twitter" >}}
</div>
Shortcode button

mermaid

{{< mermaid >}}
sequenceDiagram
  participant Alice
  participant Bob
  Alice->>John: Hello John, how are you?
  loop Healthcheck
    John->>John: Fight against hypochondria
  end
  Note right of John: Rational thoughts <br/>prevail!
  John-->>Alice: Great!
  John->>Bob: How about you?
  Bob-->>John: Jolly good!
{{< /mermaid >}}
Shortcode mermaid

repo

Run the following script to get the latest repository data. The script requires the gh command.

For more details: scripts/fetch_data.sh

brew install gh
gh auth login
cd ./your_hugo_project
export GH_USER_ID="peaceiris"
bash ./scripts/fetch_data.sh "${GH_USER_ID}" > "./data/github/${GH_USER_ID}.json"

We can show a repository card like as follows.

{{< repo id="peaceiris" name="actions-gh-pages" >}}

{{< repo id="peaceiris" name="actions-hugo" >}}
Shortcode repo

github-sponsors-list

Please follow the instruction as the same as the repo shortcode.

{{< github-sponsors-list id="peaceiris" >}}
Shortcode github-sponsors-list

table

{{< table >}}
| Key | Value |
|---|---|
| Static Site Generator | Hugo |
| Language | Go |
{{< /table >}}
Mouse out Mouse over
Shortcode table mouse out Shortcode table mouse over

math

See also the example page.

When you use the ampersand sign &, you need to use the following math shortcode.

{{< math >}}
\begin{vmatrix}a & b\\
c & d
\end{vmatrix}
{{< /math >}}
Back to TOC ☝️

How to Update the Theme

cd your_hugo_project
hugo mod get -u hugo mod get -u github.com/peaceiris/hugo-theme-iris
hugo mod tidy && hugo mod verify
git add go.mod go.sum
git commit -m "deps: bump hugo-theme-iris"
Back to TOC ☝️

Special Thanks

Back to TOC ☝️

Changelog

Maintainer

Contributing

To contribute to this Hugo theme.

You can find more detail in our Contributing Guide.

License

Development

{{ partial "console-log" $hoge }}

Back to TOC ☝️