├── .devcontainer └── devcontainer.json ├── .dockerignore ├── .editorconfig ├── .envrc ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── dependabot.yaml ├── label-commenter-config.yml ├── labeler.yml ├── release.yml └── workflows │ ├── ci.yml │ ├── dependency-review.yml │ ├── label-commenter.yml │ ├── labeler.yml │ └── release.yml ├── .gitignore ├── .go-version ├── .husky ├── post-merge └── pre-commit ├── .nvmrc ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── archetypes ├── default.md └── slide.md ├── assets └── theme │ ├── css │ └── syntax.css │ └── scss │ ├── bulma.scss │ └── style.scss ├── deps ├── go.mod ├── go.sum └── main.go ├── docker-compose.yml ├── exampleSite ├── .gitignore ├── .hugo_build.lock ├── assets │ └── images │ │ ├── .gitignore │ │ ├── logo.jpg │ │ ├── screenshot.jpg │ │ ├── shortcode_button.jpg │ │ ├── shortcode_circle.jpg │ │ ├── shortcode_github-sponsors-list.jpg │ │ ├── shortcode_mermaid.jpg │ │ ├── shortcode_repo.jpg │ │ ├── shortcode_table_1.jpg │ │ └── shortcode_table_2.jpg ├── config │ ├── _default │ │ ├── config.yaml │ │ ├── menus │ │ │ ├── menus.en.yaml │ │ │ └── menus.ja.yaml │ │ └── params.yaml │ ├── development │ │ └── params.yaml │ ├── production │ │ ├── config.yaml │ │ └── params.yaml │ └── staging │ │ ├── config.yaml │ │ └── params.yaml ├── content │ ├── en │ │ ├── _index.md │ │ └── posts │ │ │ ├── _index.md │ │ │ ├── emoji-support.md │ │ │ ├── github-pages-and-github-actions.md │ │ │ ├── markdown-syntax.md │ │ │ ├── math.md │ │ │ ├── mermaid.md │ │ │ ├── revealjs.md │ │ │ └── rich-content.md │ └── ja │ │ ├── _index.md │ │ └── posts │ │ ├── _index.md │ │ └── github-pages-and-github-actions.md ├── data │ └── github │ │ ├── .json │ │ └── peaceiris.json ├── go.mod ├── go.sum ├── i18n │ ├── en.yaml │ └── ja.yaml ├── package-lock.json ├── package.json ├── scripts │ ├── fetch_data.sh │ └── fetch_images.ts └── static │ ├── .nojekyll │ ├── CNAME │ ├── _redirects │ ├── admin │ ├── config.yml │ └── index.html │ ├── favicon │ ├── apple-icon-180x180.jpg │ ├── favicon64.ico │ └── ms-icon-150x150.jpg │ └── images │ ├── brand.svg │ └── ogp.jpg ├── go.mod ├── go.sum ├── hugo.yaml ├── images ├── screenshot.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── _markup │ │ ├── render-heading.html │ │ ├── render-image.html │ │ └── render-link.html │ ├── baseof.html │ ├── list.html │ └── single.html ├── index.html ├── partials │ ├── badges │ │ ├── badges.html │ │ ├── canonical.html │ │ ├── draft.html │ │ └── slide.html │ ├── breadcrumb.html │ ├── canonical-link.html │ ├── check-tools.html │ ├── console-log.html │ ├── content.html │ ├── edit-button.html │ ├── eyecatch.html │ ├── footer.html │ ├── head.html │ ├── head │ │ ├── favicon.html │ │ ├── general.html │ │ ├── json-ld.html │ │ └── ogp.html │ ├── header.html │ ├── keyboard-shortcut.html │ ├── lang-button.html │ ├── mathjax.html │ ├── mermaid.html │ ├── random-post-list.html │ ├── revealjs │ │ └── js.html │ ├── share-buttons.html │ ├── toc.html │ └── view-on-github-button.html ├── robots.txt └── shortcodes │ ├── button.html │ ├── centered.html │ ├── circle.html │ ├── code.html │ ├── github-sponsors-list.html │ ├── math.html │ ├── mermaid.html │ ├── repo.html │ └── table.html ├── package-lock.json ├── package.json ├── renovate.json ├── scripts └── setup.sh └── theme.toml /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Hugo", 3 | "dockerComposeFile": "../docker-compose.yml", 4 | "service": "hugo", 5 | "shutdownAction": "none", 6 | "workspaceFolder": "/src/hugo-theme-iris", 7 | 8 | // Use 'settings' to set *default* container specific settings.json values on container create. 9 | "settings": { 10 | "terminal.integrated.shell.linux": "/bin/bash" 11 | }, 12 | 13 | // Add the IDs of extensions you want installed when the container is created in the array below. 14 | "extensions": [ 15 | "budparr.language-hugo-vscode", 16 | "bungcip.better-toml", 17 | "christian-kohler.path-intellisense", 18 | "donjayamanne.githistory", 19 | "eamodio.gitlens", 20 | "EditorConfig.EditorConfig", 21 | "esbenp.prettier-vscode", 22 | "firsttris.vscode-jest-runner", 23 | "golang.go", 24 | "GrapeCity.gc-excelviewer", 25 | "lfs.vscode-emacs-friendly", 26 | "mechatroner.rainbow-csv", 27 | "ms-azuretools.vscode-docker", 28 | "oderwat.indent-rainbow", 29 | "redhat.vscode-yaml", 30 | "shd101wyy.markdown-preview-enhanced", 31 | "VisualStudioExptTeam.vscodeintellicode", 32 | "wmaurer.change-case", 33 | "yzhang.markdown-all-in-one" 34 | ], 35 | 36 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 37 | "forwardPorts": [1313], 38 | 39 | // Specifies a command that should be run after the container has been created. 40 | // "postCreateCommand": "npm ci", 41 | 42 | // Comment out the next line to run as root instead. 43 | // "remoteUser": "runner" 44 | } 45 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .* 2 | * 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [Makefile] 12 | indent_size = 4 13 | indent_style = tab 14 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | nvmrc=~/.nvm/nvm.sh 2 | source $nvmrc 3 | nvm use 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | ## Describe the bug 8 | 9 | 10 | 11 | ## To Reproduce 12 | 13 | 23 | 24 | ## Expected behavior 25 | 26 | 27 | 28 | ## Screenshots 29 | 30 | 31 | 32 | ## Desktop (please complete the following information): 33 | 34 | 41 | 42 | ## Smartphone (please complete the following information): 43 | 44 | 52 | 53 | ## Additional context 54 | 55 | 56 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Hugo Community Forum 4 | url: https://discourse.gohugo.io/ 5 | about: Please ask questions about Hugo here. 6 | - name: Q&A for the Iris Theme 7 | url: https://github.com/peaceiris/hugo-theme-iris/discussions/categories/q-a 8 | about: Please ask questions about Hugo Iris Theme here. 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | ## Is your feature request related to a problem? Please describe. 8 | 9 | 10 | 11 | ## Describe the solution you'd like 12 | 13 | 14 | 15 | ## Describe alternatives you've considered 16 | 17 | 18 | 19 | ## Additional context 20 | 21 | 22 | -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 2 | version: 2 3 | 4 | updates: 5 | - package-ecosystem: "github-actions" 6 | directory: "/" 7 | schedule: 8 | interval: "daily" 9 | time: "13:00" 10 | timezone: "Japan" 11 | -------------------------------------------------------------------------------- /.github/label-commenter-config.yml: -------------------------------------------------------------------------------- 1 | labels: 2 | - name: resolved 3 | labeled: 4 | issue: 5 | body: | 6 | This issue has been **LOCKED** because of it being resolved! 7 | 8 | The issue has been fixed and is therefore considered resolved. 9 | If you still encounter this or it has changed, open a new issue instead of responding to solved ones. 10 | action: close 11 | locking: lock 12 | lock_reason: resolved 13 | - name: inactive 14 | labeled: 15 | issue: 16 | body: | 17 | This issue has been marked as inactive. 18 | 19 | If you still encounter this or it has changed, add a comment to provide further information. 20 | - name: stale 21 | labeled: 22 | issue: 23 | body: | 24 | This issue has been **LOCKED** because of it being old. 25 | If you still encounter this or it has changed, open a new issue. 26 | action: close 27 | locking: lock 28 | lock_reason: resolved 29 | - name: duplicate 30 | labeled: 31 | issue: 32 | body: | 33 | This issue has been closed because of duplication. 34 | action: close 35 | locking: lock 36 | lock_reason: resolved 37 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | cicd: 2 | - .github/workflows/* 3 | - renovate.json 4 | 5 | dependencies: 6 | - .nvmrc 7 | - package.json 8 | - package-lock.json 9 | - go.mod 10 | - go.sum 11 | 12 | documentation: 13 | - README.md 14 | - CONTRIBUTING.md 15 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | changelog: 2 | categories: 3 | - title: "Improvements" 4 | labels: 5 | - "*" 6 | exclude: 7 | labels: 8 | - "dependencies" 9 | - "cicd" 10 | - "documentation" 11 | - title: "Dependencies" 12 | labels: 13 | - "dependencies" 14 | - title: "CI/CD" 15 | labels: 16 | - "cicd" 17 | - title: "Documentation" 18 | labels: 19 | - "documentation" 20 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths-ignore: 8 | - "README.md" 9 | pull_request: 10 | paths-ignore: 11 | - "README.md" 12 | schedule: 13 | - cron: "13 13 * * *" 14 | workflow_dispatch: 15 | 16 | concurrency: 17 | group: ${{ github.workflow }}-${{ github.ref }} 18 | cancel-in-progress: false 19 | 20 | env: 21 | HUGO_CACHEDIR: /home/runner/.cache/hugo 22 | 23 | jobs: 24 | renovate: 25 | runs-on: ubuntu-22.04 26 | timeout-minutes: 1 27 | permissions: {} 28 | steps: 29 | - uses: actions/checkout@v4 30 | - uses: peaceiris/workflows/setup-node@v0.20.1 31 | with: 32 | node-version-file: ".nvmrc" 33 | cache: "npm" 34 | - run: npm ci 35 | - run: npm run test:renovate 36 | 37 | envs: 38 | runs-on: ubuntu-22.04 39 | timeout-minutes: 2 40 | permissions: {} 41 | outputs: 42 | HUGO_VERSION: ${{ steps.envs.outputs.HUGO_VERSION }} 43 | NODE_VERSION: ${{ steps.envs.outputs.NODE_VERSION }} 44 | steps: 45 | - uses: actions/checkout@v4 46 | 47 | - name: Set envs 48 | id: envs 49 | run: | 50 | echo "HUGO_VERSION=$(make get-hugo-version)" | tee -a "${GITHUB_OUTPUT}" 51 | echo "NODE_VERSION=$(cat .nvmrc)" | tee -a "${GITHUB_OUTPUT}" 52 | 53 | deploy: 54 | needs: envs 55 | runs-on: ubuntu-22.04 56 | timeout-minutes: 3 57 | permissions: 58 | contents: write 59 | deployments: write 60 | pull-requests: write 61 | steps: 62 | - uses: actions/checkout@v4 63 | with: 64 | fetch-depth: 0 65 | 66 | - uses: peaceiris/workflows/setup-hugo@v0.20.1 67 | with: 68 | node-version: "${{ needs.envs.outputs.NODE_VERSION }}" 69 | hugo-version: "${{ needs.envs.outputs.HUGO_VERSION }}" 70 | extended: true 71 | 72 | - run: make npm-ci 73 | 74 | - uses: denoland/setup-deno@v1 75 | with: 76 | deno-version: "v1.x" 77 | 78 | - run: make fetch-data 79 | env: 80 | GITHUB_TOKEN: ${{ secrets.GH_PAT }} 81 | 82 | - run: make build-staging 83 | 84 | - name: Deploy to Netlify 85 | uses: nwtgck/actions-netlify@v3.0.0 86 | with: 87 | publish-dir: "./exampleSite/public" 88 | production-branch: main 89 | github-token: ${{ secrets.GITHUB_TOKEN }} 90 | deploy-message: "Deploy from GitHub Actions" 91 | enable-pull-request-comment: true 92 | enable-commit-comment: false 93 | overwrites-pull-request-comment: true 94 | env: 95 | NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} 96 | NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} 97 | timeout-minutes: 1 98 | 99 | - run: make build-prod 100 | 101 | - name: Deploy 102 | uses: peaceiris/actions-gh-pages@v4.0.0 103 | if: ${{ github.ref == 'refs/heads/main' }} 104 | with: 105 | #deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} 106 | github_token: ${{ secrets.GITHUB_TOKEN }} 107 | publish_dir: ./exampleSite/public 108 | allow_empty_commit: true 109 | user_name: "github-actions[bot]" 110 | user_email: "github-actions[bot]@users.noreply.github.com" 111 | 112 | lighthouse: 113 | needs: deploy 114 | if: ${{ github.ref == 'refs/heads/main' }} 115 | runs-on: ubuntu-22.04 116 | timeout-minutes: 20 117 | permissions: 118 | contents: write 119 | steps: 120 | - uses: actions/checkout@v4 121 | 122 | - name: Install lighthouse 123 | run: sudo npm i -g lighthouse@11.7.1 124 | 125 | - name: Run lighthouse 126 | run: | 127 | lighthouse \ 128 | --chrome-flags="--headless" \ 129 | --output html --output-path ./report.html \ 130 | 'https://hugothemeiris.peaceiris.com' 131 | 132 | - name: Upload result 133 | uses: actions/upload-artifact@v4 134 | with: 135 | name: lighthouse-report 136 | path: report.html 137 | 138 | - name: Prepare assets 139 | run: | 140 | mkdir ./public 141 | cp ./report.html ./public/report.html 142 | 143 | - name: Deploy 144 | uses: peaceiris/actions-gh-pages@v4.0.0 145 | with: 146 | deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} 147 | publish_dir: ./public 148 | keep_files: true 149 | user_name: "github-actions[bot]" 150 | user_email: "github-actions[bot]@users.noreply.github.com" 151 | 152 | docker: 153 | needs: envs 154 | runs-on: ubuntu-22.04 155 | timeout-minutes: 3 156 | if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} 157 | permissions: 158 | contents: read 159 | steps: 160 | - uses: actions/checkout@v4 161 | 162 | - uses: peaceiris/workflows/setup-hugo@v0.20.1 163 | with: 164 | node-version: "${{ needs.envs.outputs.NODE_VERSION }}" 165 | hugo-version: "${{ needs.envs.outputs.HUGO_VERSION }}" 166 | extended: true 167 | 168 | - name: prepare 169 | run: | 170 | sed -i 's/enableGitInfo: true/# enableGitInfo: true/' exampleSite/config/_default/config.yaml 171 | 172 | - run: make docker-build 173 | 174 | setup: 175 | needs: envs 176 | runs-on: ubuntu-22.04 177 | timeout-minutes: 3 178 | if: ${{ github.ref == 'refs/heads/main' }} 179 | permissions: 180 | contents: read 181 | steps: 182 | - uses: actions/checkout@v4 183 | 184 | - uses: peaceiris/workflows/setup-hugo@v0.20.1 185 | with: 186 | node-version: "${{ needs.envs.outputs.NODE_VERSION }}" 187 | hugo-version: "${{ needs.envs.outputs.HUGO_VERSION }}" 188 | extended: true 189 | 190 | - uses: peaceiris/workflows/setup-git@v0.20.1 191 | with: 192 | flags: "--global" 193 | 194 | - name: Create a new Hugo project 195 | run: | 196 | mkdir ~/homepage 197 | cp scripts/setup.sh ~ 198 | cd ~ 199 | bash ./setup.sh "homepage" "peaceiris" 200 | cd homepage 201 | npm ci 202 | hugo 203 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | # Source repository: https://github.com/actions/dependency-review-action 2 | # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement 3 | name: 'Dependency Review' 4 | 5 | on: 6 | pull_request: 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | dependency-review: 13 | runs-on: ubuntu-22.04 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: actions/dependency-review-action@v4 17 | -------------------------------------------------------------------------------- /.github/workflows/label-commenter.yml: -------------------------------------------------------------------------------- 1 | name: Label Commenter 2 | 3 | on: 4 | issues: 5 | types: [labeled, unlabeled] 6 | pull_request_target: 7 | types: [labeled, unlabeled] 8 | 9 | jobs: 10 | comment: 11 | runs-on: ubuntu-22.04 12 | timeout-minutes: 1 13 | permissions: 14 | contents: read 15 | issues: write 16 | pull-requests: write 17 | steps: 18 | - uses: actions/checkout@v4 19 | - uses: peaceiris/actions-label-commenter@v1 20 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Pull Request Labeler" 2 | 3 | on: 4 | pull_request_target: 5 | 6 | jobs: 7 | triage: 8 | runs-on: ubuntu-22.04 9 | timeout-minutes: 1 10 | permissions: 11 | pull-requests: write 12 | steps: 13 | # https://github.com/actions/labeler 14 | - uses: actions/labeler@v4.3.0 15 | with: 16 | repo-token: ${{ github.token }} 17 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | semver_type: 7 | description: "Semver type" 8 | required: true 9 | type: "choice" 10 | options: 11 | - "patch" 12 | - "minor" 13 | # - "major" 14 | default: "patch" 15 | 16 | jobs: 17 | main: 18 | runs-on: ubuntu-22.04 19 | timeout-minutes: 5 20 | permissions: 21 | contents: write 22 | steps: 23 | - uses: peaceiris/actions-github-app-token@v1 24 | id: app 25 | with: 26 | app_id: ${{ secrets.GH_APP_ID }} 27 | private_key: ${{ secrets.GH_APP_PRIVATE_KEY }} 28 | 29 | - uses: actions/checkout@v4 30 | with: 31 | token: ${{ steps.app.outputs.token }} 32 | fetch-depth: 0 33 | 34 | - uses: peaceiris/workflows/setup-git@v0.20.1 35 | 36 | - name: Create release 37 | env: 38 | GITHUB_TOKEN: ${{ steps.app.outputs.token }} 39 | run: | 40 | CURRENT_TAG=$(git describe --abbrev=0) 41 | NEW_VERSION=$(npm_config_yes=true npx semver "${CURRENT_TAG}" --increment ${{ github.event.inputs.semver_type }}) 42 | NEW_TAG="v${NEW_VERSION}" 43 | RELEASE_TITLE="Release ${NEW_TAG}" 44 | git tag -a "${NEW_TAG}" -m "${RELEASE_TITLE}" 45 | git push origin "${NEW_TAG}" 46 | gh release create "${NEW_TAG}" --title "${RELEASE_TITLE}" --generate-notes --discussion-category "Announcements" 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | .idea/ 4 | .vscode/ 5 | 6 | public 7 | node_modules 8 | -------------------------------------------------------------------------------- /.go-version: -------------------------------------------------------------------------------- 1 | 1.22.3 2 | -------------------------------------------------------------------------------- /.husky/post-merge: -------------------------------------------------------------------------------- 1 | npm ci 2 | git remote prune origin 3 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx lint-staged 2 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 20.19.5 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing Guide 2 | 3 | 4 | 5 | 6 | - [Find Similar Issues or Pull Requests](#find-similar-issues-or-pull-requests) 7 | - [Develop](#develop) 8 | - [Create Commit and Push](#create-commit-and-push) 9 | - [Open Pull Request](#open-pull-request) 10 | - [Update Local Repository](#update-local-repository) 11 | 12 | 13 | 14 | 15 | 16 | ## Find Similar Issues or Pull Requests 17 | 18 | Nothing? Then, open a new issue first, and discuss problems or proposals. 19 | 20 | 21 | 22 | ## Develop 23 | 24 | ```sh 25 | # (1) Fork this repository on GitHub. 26 | 27 | # (2) Clone your fork repository to your local. 28 | git clone https://github.com//hugo-theme-iris.git 29 | cd ./hugo-theme-iris 30 | 31 | # (3) Start Hugo Server with Docker. 32 | make up 33 | ``` 34 | 35 | 36 | 37 | ## Create Commit and Push 38 | 39 | ```sh 40 | git checkout -b feat-something-option 41 | vim ./path/to/files 42 | git add ./path/to/files 43 | git commit -m "feat: Add something option" 44 | git push origin feat-something-option 45 | ``` 46 | 47 | 48 | 49 | ## Open Pull Request 50 | 51 | On Github. 52 | 53 | 54 | 55 | ## Update Local Repository 56 | 57 | ```sh 58 | git remote add upstream https://github.com/peaceiris/hugo-theme-iris.git 59 | git checkout main 60 | git pull upstream main 61 | ``` 62 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Shohei Ueda (@peaceiris) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | pwd := $(CURDIR) 2 | cmd := "" 3 | DOCKER_COMPOSE := docker compose 4 | GH_USER_ID := peaceiris 5 | 6 | 7 | .PHONY: bump-node 8 | bump-node: 9 | bash scripts/bump_node.sh 10 | 11 | .PHONY: docker-dev 12 | docker-dev: npm-ci 13 | $(eval opt := server --navigateToChanged --bind=0.0.0.0 --buildDrafts) 14 | export HUGO_VERSION=v$(shell make get-hugo-version) && \ 15 | $(DOCKER_COMPOSE) up -d && \ 16 | $(DOCKER_COMPOSE) exec hugo hugo $(opt) 17 | 18 | .PHONY: docker-hugo 19 | docker-hugo: npm-ci 20 | # make docker-hugo cmd="version" 21 | export HUGO_VERSION=v$(shell make get-hugo-version) && \ 22 | $(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(cmd) 23 | 24 | .PHONY: docker-build 25 | docker-build: npm-ci 26 | $(eval opt := --minify --cleanDestinationDir) 27 | export HUGO_VERSION=v$(shell make get-hugo-version) && \ 28 | $(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt) 29 | 30 | .PHONY: docker-test 31 | docker-test: npm-ci 32 | $(eval opt := --minify --renderToMemory --printPathWarnings --debug \ 33 | --templateMetrics --templateMetricsHints) 34 | export HUGO_VERSION=v$(shell make get-hugo-version) && \ 35 | $(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt) 36 | 37 | .PHONY: npm-ci 38 | npm-ci: 39 | cd ./exampleSite && \ 40 | npm ci 41 | 42 | .PHONY: dev 43 | dev: 44 | cd ./exampleSite && \ 45 | hugo server --renderStaticToDisk --navigateToChanged --buildDrafts 46 | 47 | .PHONY: test 48 | test: 49 | cd ./exampleSite && \ 50 | hugo --minify --renderToMemory --printPathWarnings --debug \ 51 | --templateMetrics --templateMetricsHints 52 | 53 | .PHONY: build-staging 54 | build-staging: 55 | cd ./exampleSite && \ 56 | hugo --minify --cleanDestinationDir \ 57 | --environment "staging" \ 58 | --printPathWarnings --debug \ 59 | --templateMetrics --templateMetricsHints 60 | 61 | .PHONY: build-prod 62 | build-prod: 63 | cd ./exampleSite && \ 64 | hugo --minify --cleanDestinationDir --printPathWarnings && \ 65 | wget -O ./public/report.html ${BASE_URL}/report.html || true 66 | 67 | .PHONY: fetch-data 68 | fetch-data: 69 | cd ./exampleSite && \ 70 | bash ./scripts/fetch_data.sh ${GH_USER_ID} > ./data/github/${GH_USER_ID}.json && \ 71 | deno run --allow-net --allow-read --allow-write --unstable scripts/fetch_images.ts 72 | 73 | .PHONY: get-go-version 74 | get-go-version: 75 | @cd ./deps && go mod edit -json | jq -r '.Go' 76 | 77 | .PHONY: get-hugo-version 78 | get-hugo-version: 79 | @cd ./deps && go mod edit -json | jq -r '.Require[] | select(.Path == "github.com/gohugoio/hugo") | .Version | split("v") | .[1]' 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Hugo IRIS Theme 3 |

4 | 5 |
6 | Hugo Iris Theme thumbnail 7 | 8 | [![LICENSE](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/peaceiris/hugo-theme-iris/blob/main/LICENSE) 9 | [![release](https://img.shields.io/github/release/peaceiris/hugo-theme-iris.svg)](https://github.com/peaceiris/hugo-theme-iris/releases/latest) 10 | [![release date](https://img.shields.io/github/release-date/peaceiris/hugo-theme-iris.svg)](https://github.com/peaceiris/hugo-theme-iris/releases) 11 | [![release feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/hugo-theme-iris/releases.atom) 12 | ![deploy status](https://github.com/peaceiris/hugo-theme-iris/workflows/CI/badge.svg?branch=main&event=push) 13 | [![hugo themes](https://img.shields.io/static/v1?label=Hugo%20Themes&message=IRIS&color=blueviolet)](https://themes.gohugo.io/themes/hugo-theme-iris/) 14 | [![lighthouse score](https://img.shields.io/static/v1?label=Lighthouse%20Score&message=Good&color=green)](https://hugothemeiris.peaceiris.com/report.html) 15 | 16 |
17 | 18 | [Go to the demo site](https://hugothemeiris.peaceiris.com/). 19 | 20 | 21 | 22 | ## Table of Contents 23 | 24 | 25 | 26 | 27 | - [Overview](#overview) 28 | - [Features](#features) 29 | - [Roadmap](#roadmap) 30 | - [Getting Started](#getting-started) 31 | - [Install Hugo](#install-hugo) 32 | - [Install Go](#install-go) 33 | - [Install Node.js and npm](#install-nodejs-and-npm) 34 | - [Initialize New Hugo Project](#initialize-new-hugo-project) 35 | - [Create a Post Page](#create-a-post-page) 36 | - [Create a Slide Page](#create-a-slide-page) 37 | - [Customize Theme](#customize-theme) 38 | - [config](#config) 39 | - [content](#content) 40 | - [assets](#assets) 41 | - [data](#data) 42 | - [i18n](#i18n) 43 | - [static](#static) 44 | - [Hosting](#hosting) 45 | - [Netlify](#netlify) 46 | - [GitHub Pages using Actions](#github-pages-using-actions) 47 | - [Shortcodes](#shortcodes) 48 | - [circle](#circle) 49 | - [button](#button) 50 | - [mermaid](#mermaid) 51 | - [repo](#repo) 52 | - [github-sponsors-list](#github-sponsors-list) 53 | - [table](#table) 54 | - [math](#math) 55 | - [How to Update the Theme](#how-to-update-the-theme) 56 | - [Special Thanks](#special-thanks) 57 | - [Changelog](#changelog) 58 | - [Maintainer](#maintainer) 59 | - [Contributing](#contributing) 60 | - [License](#license) 61 | - [Development](#development) 62 | 63 | 64 | 65 | 66 | 67 | ## Overview 68 | 69 | This repository includes a [Hugo] theme. 70 | 71 | ### Features 72 | 73 | - Dark Theme 74 | - Responsive 75 | - Support Multilingual 76 | - Pagination 77 | - SEO 78 | - Google Analytics 79 | - Open Graph Protocol 80 | - JSON-LD 81 | - Canonical URL on header 82 | - Performance 83 | - [PageSpeed Insights Scores: Good](https://developers.google.com/speed/pagespeed/insights/?hl=EN&url=https%3A%2F%2Fhugothemeiris.peaceiris.com%2F) 84 | - [Lighthouse Scores: Good](https://hugothemeiris.peaceiris.com/report.html) 85 | - Contents 86 | - Breadcrumb List 87 | - Syntax Highlighting 88 | - Table of Contents 89 | - Random Post List 90 | - [MathJax]: Beautiful math in all browsers. 91 | - [mermaid]: Generation of diagram and flowchart from text in a similar manner as markdown. 92 | - [reveal.js]: Writing slides using Markdown. 93 | - Image 94 | - Responsive 95 | - Eye-catching Image 96 | - OGP Image 97 | - WebP: requiring a Hugo extended version 98 | - Disqus Comment System 99 | - Keyboard Shortcut: Press `?` (`Shift+/`) to show help modal. 100 | 101 | ### Roadmap 102 | 103 | - Share Buttons 104 | - Netlify, Netlify CMS 105 | - Categories, Tags, Authors 106 | - Font Awesome 107 | - Related posts, next and previous post 108 | 109 |
Back to TOC ☝️
110 | 111 | 112 | 113 | ## Getting Started 114 | 115 | ### Install Hugo 116 | 117 | You can find the minimum supported Hugo version in [theme.toml] `min_version`. Using Hugo extended version is desirable. 118 | 119 | [theme.toml]: https://github.com/peaceiris/hugo-theme-iris/blob/main/theme.toml 120 | 121 | ### Install Go 122 | 123 | This theme depends on Hugo Modules. 124 | 125 | - [Download and install - The Go Programming Language](https://golang.org/doc/install) 126 | 127 | ### Install Node.js and npm 128 | 129 | This theme depends on `node` and `npm`. 130 | 131 | cf. [Installing Node.js via package manager | Node.js](https://nodejs.org/en/download/package-manager/) 132 | 133 | ### Initialize New Hugo Project 134 | 135 | Here is [the setup script](https://github.com/peaceiris/hugo-theme-iris/blob/main/scripts/setup.sh). 136 | 137 | ```sh 138 | mkdir homepage 139 | wget https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/main/scripts/setup.sh 140 | bash ./setup.sh homepage "your_github_id" 141 | cd homepage 142 | npm ci 143 | hugo server 144 | ``` 145 | 146 | - http://localhost:1313/ 147 | 148 | *Customize your site! ʕ◔ϖ◔ʔ* 149 | 150 | ### Create a Post Page 151 | 152 | ```sh 153 | hugo new posts/new.md 154 | ``` 155 | 156 | ### Create a Slide Page 157 | 158 | ```sh 159 | hugo new --kind slide posts/new-slide.md 160 | ``` 161 | 162 |
Back to TOC ☝️
163 | 164 | 165 | 166 | ## Customize Theme 167 | 168 | TBW. 169 | 170 | ### config 171 | 172 | ### content 173 | 174 | ### assets 175 | 176 | ### data 177 | 178 | ### i18n 179 | 180 | ### static 181 | 182 |
Back to TOC ☝️
183 | 184 | 185 | 186 | ## Hosting 187 | 188 | ### Netlify 189 | 190 | 191 | 192 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/peaceiris/hugo-theme-iris) 193 | 194 | ### GitHub Pages using Actions 195 | 196 | The following actions are useful to deploy your site to GitHub Pages using GitHub Actions. 197 | 198 | - [peaceiris/actions-hugo: GitHub Actions for Hugo](https://github.com/peaceiris/actions-hugo) 199 | - [peaceiris/actions-gh-pages: GitHub Actions for GitHub Pages](https://github.com/peaceiris/actions-gh-pages) 200 | 201 |
Back to TOC ☝️
202 | 203 | 204 | 205 | ## Shortcodes 206 | 207 | ### circle 208 | 209 | If your logo image is located at `assets/images/logo.jpg`. 210 | 211 | ```md 212 | {{< circle src="images/logo.jpg" alt="hugo-theme-iris logo" >}} 213 | ``` 214 | 215 | Shortcode mermaid 216 | 217 | ### button 218 | 219 | ```md 220 |
221 | {{< button href="https://gohugo.io/" txt="Hugo Homepage" >}} 222 | {{< button href="https://github.com/gohugoio/" txt="Hugo GitHub" >}} 223 | {{< button href="https://discourse.gohugo.io/" txt="Hugo Forum" >}} 224 | {{< button href="https://twitter.com/GoHugoIO" txt="Hugo Twitter" >}} 225 |
226 | ``` 227 | 228 | Shortcode button 229 | 230 | ### mermaid 231 | 232 | ```md 233 | {{< mermaid >}} 234 | sequenceDiagram 235 | participant Alice 236 | participant Bob 237 | Alice->>John: Hello John, how are you? 238 | loop Healthcheck 239 | John->>John: Fight against hypochondria 240 | end 241 | Note right of John: Rational thoughts
prevail! 242 | John-->>Alice: Great! 243 | John->>Bob: How about you? 244 | Bob-->>John: Jolly good! 245 | {{< /mermaid >}} 246 | ``` 247 | 248 | Shortcode mermaid 249 | 250 | ### repo 251 | 252 | Run the following script to get the latest repository data. 253 | The script requires the [gh] command. 254 | 255 | [gh]: https://github.com/cli/cli 256 | 257 | For more details: [scripts/fetch_data.sh](https://github.com/peaceiris/hugo-theme-iris/blob/main/exampleSite/scripts/fetch_data.sh) 258 | 259 | ```sh 260 | brew install gh 261 | gh auth login 262 | ``` 263 | 264 | ```sh 265 | cd ./your_hugo_project 266 | export GH_USER_ID="peaceiris" 267 | bash ./scripts/fetch_data.sh "${GH_USER_ID}" > "./data/github/${GH_USER_ID}.json" 268 | ``` 269 | 270 | We can show a repository card like as follows. 271 | 272 | ```md 273 | {{< repo id="peaceiris" name="actions-gh-pages" >}} 274 | 275 | {{< repo id="peaceiris" name="actions-hugo" >}} 276 | ``` 277 | 278 | Shortcode repo 279 | 280 | ### github-sponsors-list 281 | 282 | Please follow the instruction as the same as the `repo` shortcode. 283 | 284 | ```md 285 | {{< github-sponsors-list id="peaceiris" >}} 286 | ``` 287 | 288 | Shortcode github-sponsors-list 289 | 290 | ### table 291 | 292 | ```md 293 | {{< table >}} 294 | | Key | Value | 295 | |---|---| 296 | | Static Site Generator | Hugo | 297 | | Language | Go | 298 | {{< /table >}} 299 | ``` 300 | 301 | | Mouse out | Mouse over | 302 | |---|---| 303 | | ![Shortcode table mouse out](https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/main/exampleSite/assets/images/shortcode_table_1.jpg) | ![Shortcode table mouse over](https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/main/exampleSite/assets/images/shortcode_table_2.jpg) | 304 | 305 | ### math 306 | 307 | See also [the example page](https://hugothemeiris.peaceiris.com/posts/math/). 308 | 309 | When you use the ampersand sign `&`, you need to use the following math shortcode. 310 | 311 | ```md 312 | {{< math >}} 313 | \begin{vmatrix}a & b\\ 314 | c & d 315 | \end{vmatrix} 316 | {{< /math >}} 317 | ``` 318 | 319 |
Back to TOC ☝️
320 | 321 | 322 | 323 | ## How to Update the Theme 324 | 325 | ```sh 326 | cd your_hugo_project 327 | hugo mod get -u hugo mod get -u github.com/peaceiris/hugo-theme-iris 328 | hugo mod tidy && hugo mod verify 329 | git add go.mod go.sum 330 | git commit -m "deps: bump hugo-theme-iris" 331 | ``` 332 | 333 |
Back to TOC ☝️
334 | 335 | 336 | 337 | ## Special Thanks 338 | 339 | - [Hugo] 340 | - [Bulma] 341 | - [reveal.js] 342 | - [MathJax] 343 | - [mermaid] 344 | - [jaywcjlove/hotkeys](https://github.com/jaywcjlove/hotkeys) 345 | 346 | 347 | 348 |
Back to TOC ☝️
349 | 350 | 351 | 352 | ## Changelog 353 | 354 | - [hugo-theme-iris/CHANGELOG.md](https://github.com/peaceiris/hugo-theme-iris/blob/main/CHANGELOG.md) 355 | 356 | 357 | 358 | ## Maintainer 359 | 360 | - [peaceiris homepage](https://peaceiris.com) 361 | 362 | 363 | 364 | ## Contributing 365 | 366 | To contribute to this Hugo theme. 367 | 368 | You can find more detail in our [Contributing Guide]. 369 | 370 | 371 | 372 | ## License 373 | 374 | - [MIT License - peaceiris/hugo-theme-iris](https://github.com/peaceiris/hugo-theme-iris/blob/main/LICENSE) 375 | 376 | 377 | 378 | ## Development 379 | 380 | ```sh 381 | {{ partial "console-log" $hoge }} 382 | ``` 383 | 384 | --- 385 | 386 |
Back to TOC ☝️
387 | 388 | 389 | 390 | 391 | [Contributing Guide]: https://github.com/peaceiris/hugo-theme-iris/blob/main/CONTRIBUTING.md 392 | 393 | 394 | [Hugo]: https://gohugo.io/ 395 | [Bulma]: https://bulma.io/ 396 | [reveal.js]: https://github.com/hakimel/reveal.js/ 397 | [MathJax]: https://www.mathjax.org/ 398 | [mermaid]: https://github.com/knsv/mermaid 399 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | description: "" 4 | publishdate: {{ .Date }} 5 | draft: false 6 | eyecatch: "" 7 | toc: true 8 | math: false 9 | canonicalURL: "" 10 | --- 11 | -------------------------------------------------------------------------------- /archetypes/slide.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | description: 4 | publishdate: {{ .Date }} 5 | draft: false 6 | eyecatch: "" 7 | toc: true 8 | slide: true 9 | --- 10 | -------------------------------------------------------------------------------- /assets/theme/css/syntax.css: -------------------------------------------------------------------------------- 1 | /* Background */ .chroma { color: #f8f8f2; background-color: #272822 } 2 | /* Error */ .chroma .err { color: #960050; background-color: #1e0010 } 3 | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 4 | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } 5 | /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } 6 | /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 7 | /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 8 | /* Keyword */ .chroma .k { color: #66d9ef } 9 | /* KeywordConstant */ .chroma .kc { color: #66d9ef } 10 | /* KeywordDeclaration */ .chroma .kd { color: #66d9ef } 11 | /* KeywordNamespace */ .chroma .kn { color: #f92672 } 12 | /* KeywordPseudo */ .chroma .kp { color: #66d9ef } 13 | /* KeywordReserved */ .chroma .kr { color: #66d9ef } 14 | /* KeywordType */ .chroma .kt { color: #66d9ef } 15 | /* NameAttribute */ .chroma .na { color: #a6e22e } 16 | /* NameClass */ .chroma .nc { color: #a6e22e } 17 | /* NameConstant */ .chroma .no { color: #66d9ef } 18 | /* NameDecorator */ .chroma .nd { color: #a6e22e } 19 | /* NameException */ .chroma .ne { color: #a6e22e } 20 | /* NameFunction */ .chroma .nf { color: #a6e22e } 21 | /* NameOther */ .chroma .nx { color: #a6e22e } 22 | /* NameTag */ .chroma .nt { color: #f92672 } 23 | /* Literal */ .chroma .l { color: #ae81ff } 24 | /* LiteralDate */ .chroma .ld { color: #e6db74 } 25 | /* LiteralString */ .chroma .s { color: #e6db74 } 26 | /* LiteralStringAffix */ .chroma .sa { color: #e6db74 } 27 | /* LiteralStringBacktick */ .chroma .sb { color: #e6db74 } 28 | /* LiteralStringChar */ .chroma .sc { color: #e6db74 } 29 | /* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 } 30 | /* LiteralStringDoc */ .chroma .sd { color: #e6db74 } 31 | /* LiteralStringDouble */ .chroma .s2 { color: #e6db74 } 32 | /* LiteralStringEscape */ .chroma .se { color: #ae81ff } 33 | /* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 } 34 | /* LiteralStringInterpol */ .chroma .si { color: #e6db74 } 35 | /* LiteralStringOther */ .chroma .sx { color: #e6db74 } 36 | /* LiteralStringRegex */ .chroma .sr { color: #e6db74 } 37 | /* LiteralStringSingle */ .chroma .s1 { color: #e6db74 } 38 | /* LiteralStringSymbol */ .chroma .ss { color: #e6db74 } 39 | /* LiteralNumber */ .chroma .m { color: #ae81ff } 40 | /* LiteralNumberBin */ .chroma .mb { color: #ae81ff } 41 | /* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } 42 | /* LiteralNumberHex */ .chroma .mh { color: #ae81ff } 43 | /* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } 44 | /* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } 45 | /* LiteralNumberOct */ .chroma .mo { color: #ae81ff } 46 | /* Operator */ .chroma .o { color: #f92672 } 47 | /* OperatorWord */ .chroma .ow { color: #f92672 } 48 | /* Comment */ .chroma .c { color: #75715e } 49 | /* CommentHashbang */ .chroma .ch { color: #75715e } 50 | /* CommentMultiline */ .chroma .cm { color: #75715e } 51 | /* CommentSingle */ .chroma .c1 { color: #75715e } 52 | /* CommentSpecial */ .chroma .cs { color: #75715e } 53 | /* CommentPreproc */ .chroma .cp { color: #75715e } 54 | /* CommentPreprocFile */ .chroma .cpf { color: #75715e } 55 | /* GenericDeleted */ .chroma .gd { color: #f92672 } 56 | /* GenericEmph */ .chroma .ge { font-style: italic } 57 | /* GenericInserted */ .chroma .gi { color: #a6e22e } 58 | /* GenericStrong */ .chroma .gs { font-weight: bold } 59 | /* GenericSubheading */ .chroma .gu { color: #75715e } 60 | -------------------------------------------------------------------------------- /assets/theme/scss/bulma.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "bulma/sass/utilities/_all.sass"; 4 | @import "bulma/sass/base/_all.sass"; 5 | 6 | // ==================== 7 | // helpers 8 | // ==================== 9 | @import "bulma/sass/helpers/float.sass"; 10 | @import "bulma/sass/helpers/color.sass"; 11 | @import "bulma/sass/helpers/typography.sass"; 12 | @import "bulma/sass/helpers/spacing.sass"; 13 | 14 | $dimensions: 16 24 32 48 64 96 128 180 256; 15 | 16 | // ==================== 17 | // components 18 | // ==================== 19 | // @import "bulma/sass/components/_all.sass"; 20 | 21 | $breadcrumb-item-hover-color: gold; 22 | $breadcrumb-item-active-color: $grey-lighter; 23 | @import "bulma/sass/components/breadcrumb.sass"; 24 | 25 | $card-color: $grey-lighter; 26 | $card-header-color: skyblue; 27 | $card-background-color: $grey-dark; 28 | $card-footer-border-top: 1px solid $grey-darker; 29 | @import "bulma/sass/components/card.sass"; 30 | 31 | $dropdown-content-background-color: $grey-dark; 32 | $dropdown-item-color: $grey-lighter; 33 | @import "bulma/sass/components/dropdown.sass"; 34 | // @import "bulma/sass/components/level.sass"; 35 | // @import "bulma/sass/components/list.sass"; 36 | // @import "bulma/sass/components/media.sass"; 37 | // @import "bulma/sass/components/menu.sass"; 38 | // @import "bulma/sass/components/message.sass"; 39 | @import "bulma/sass/components/modal.sass"; 40 | @import "bulma/sass/components/navbar.sass"; 41 | @import "bulma/sass/components/pagination.sass"; 42 | // @import "bulma/sass/components/panel.sass"; 43 | // @import "bulma/sass/components/tabs.sass"; 44 | 45 | // ==================== 46 | // elements 47 | // ==================== 48 | // @import "bulma/sass/elements/_all.sass"; 49 | // @import "bulma/sass/elements/box.sass"; 50 | 51 | $button-color: $grey-lighter; 52 | $button-background-color: $grey-dark; 53 | $button-hover-color: skyblue; 54 | @import "bulma/sass/elements/button.sass"; 55 | @import "bulma/sass/elements/container.sass"; 56 | @import "bulma/sass/elements/content.sass"; 57 | // @import "bulma/sass/elements/form.sass"; 58 | // @import "bulma/sass/elements/icon.sass"; 59 | @import "bulma/sass/elements/image.sass"; 60 | // @import "bulma/sass/elements/notification.sass"; 61 | @import "bulma/sass/elements/other.sass"; 62 | // @import "bulma/sass/elements/progress.sass"; 63 | 64 | $table-color: $grey-lighter; 65 | $table-head-cell-color: gold; 66 | $table-cell-border: 1px solid $grey-darker; 67 | $table-background-color: $grey-dark; 68 | $table-striped-row-even-background-color: $grey-dark; 69 | $table-row-hover-background-color: sienna; 70 | $table-striped-row-even-hover-background-color: sienna; 71 | @import "bulma/sass/elements/table.sass"; 72 | 73 | @import "bulma/sass/elements/tag.sass"; 74 | @import "bulma/sass/elements/title.sass"; 75 | 76 | // ==================== 77 | // form 78 | // ==================== 79 | // @import "bulma/sass/form/_all.sass"; 80 | // @import "bulma/sass/form/checkbox-radio.sass"; 81 | // @import "bulma/sass/form/file.sass"; 82 | // @import "bulma/sass/form/input-textarea.sass"; 83 | // @import "bulma/sass/form/select.sass"; 84 | // @import "bulma/sass/form/shared.sass"; 85 | // @import "bulma/sass/form/tools.sass"; 86 | 87 | // ==================== 88 | // grid 89 | // ==================== 90 | // @import "bulma/sass/grid/_all.sass"; 91 | @import "bulma/sass/grid/columns.sass"; 92 | // @import "bulma/sass/grid/tiles.sass"; 93 | 94 | // ==================== 95 | // layout 96 | // ==================== 97 | @import "bulma/sass/layout/_all.sass"; 98 | 99 | // ==================== 100 | // Iris theme 101 | // ==================== 102 | html { 103 | overflow: auto; 104 | } 105 | 106 | body { 107 | overflow: hidden; 108 | } 109 | 110 | h2 { 111 | border-bottom: solid 2px $grey; 112 | } 113 | 114 | h3 { 115 | margin-top: 2rem; 116 | margin-bottom: 1rem; 117 | padding-left: 0.5em; 118 | border-left: solid 4px #FF7F50; 119 | } 120 | 121 | section.section { 122 | padding: 1.5rem 1.5rem; 123 | } 124 | 125 | pre { 126 | margin: 1rem 0rem; 127 | } 128 | 129 | p:not([class]) { 130 | margin: 1rem 0rem; 131 | line-height: 1.8rem; 132 | } 133 | 134 | .buttons { 135 | margin: 1rem 0rem; 136 | } 137 | 138 | a.normal-link { 139 | text-decoration: none; 140 | color: skyblue; 141 | } 142 | a.normal-link:hover { 143 | text-decoration: underline; 144 | color: skyblue; 145 | } 146 | a { 147 | text-decoration: underline; 148 | color: skyblue; 149 | } 150 | a:hover { 151 | text-decoration: none; 152 | color: gold; 153 | } 154 | a:visited { 155 | color: gold; 156 | } 157 | 158 | strong { 159 | color: $grey-lighter; 160 | } 161 | 162 | code { 163 | background: $grey-dark; 164 | color: gold; 165 | } 166 | 167 | blockquote { 168 | position: relative; 169 | padding: 2rem 1rem 1rem 1rem; 170 | margin: 2rem 0rem; 171 | box-sizing: border-box; 172 | font-style: italic; 173 | background: $grey-dark; 174 | border-left: 0.2rem solid chocolate; 175 | 176 | :before { 177 | display: inline-block; 178 | position: absolute; 179 | top: 0.5rem; 180 | left: 0.3rem; 181 | content: "“"; 182 | font-family: sans-serif; 183 | color: chocolate; 184 | font-size: 5rem; 185 | line-height: 1; 186 | } 187 | 188 | p { 189 | padding: 0rem; 190 | margin: 1rem 0rem; 191 | line-height: 1.7; 192 | color: $grey-lighter; 193 | } 194 | 195 | cite { 196 | display: block; 197 | text-align: right; 198 | color: $grey-lighter; 199 | font-size: 0.9rem; 200 | } 201 | } 202 | 203 | // ==================== 204 | // code shortcode 205 | // ==================== 206 | .highlight { 207 | margin-top: 2rem; 208 | margin-bottom: 2rem !important; 209 | } 210 | .code-block { 211 | margin-top: 1rem; 212 | margin-bottom: 2rem; 213 | } 214 | .code-block-title { 215 | display: inline-block; 216 | color: gray; 217 | position: relative; 218 | bottom: -1rem; 219 | left: 0.5rem; 220 | } 221 | .code-block-body pre { 222 | overflow: auto; 223 | // overflow: scroll; 224 | } 225 | .code-block pre.chroma { 226 | margin-top: 0.3rem; 227 | } 228 | .code-block-lang { 229 | float: right; 230 | color: gray; 231 | position: relative; 232 | bottom: -1rem; 233 | right: 0.5rem; 234 | } 235 | -------------------------------------------------------------------------------- /assets/theme/scss/style.scss: -------------------------------------------------------------------------------- 1 | // custom style 2 | -------------------------------------------------------------------------------- /deps/go.mod: -------------------------------------------------------------------------------- 1 | module theme 2 | 3 | go 1.18 4 | 5 | require github.com/gohugoio/hugo v0.124.1 6 | 7 | require ( 8 | github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c // indirect 9 | github.com/bep/clock v0.3.0 // indirect 10 | github.com/bep/clocks v0.5.0 // indirect 11 | github.com/bep/godartsass v1.2.0 // indirect 12 | github.com/bep/godartsass/v2 v2.0.0 // indirect 13 | github.com/bep/golibsass v1.1.1 // indirect 14 | github.com/bep/logg v0.4.0 // indirect 15 | github.com/bep/overlayfs v0.9.2 // indirect 16 | github.com/clbanning/mxj/v2 v2.7.0 // indirect 17 | github.com/cli/safeexec v1.0.1 // indirect 18 | github.com/fatih/color v1.16.0 // indirect 19 | github.com/gobwas/glob v0.2.3 // indirect 20 | github.com/gohugoio/locales v0.14.0 // indirect 21 | github.com/gohugoio/localescompressed v1.0.1 // indirect 22 | github.com/mattn/go-colorable v0.1.13 // indirect 23 | github.com/mattn/go-isatty v0.0.20 // indirect 24 | github.com/mitchellh/hashstructure v1.1.0 // indirect 25 | github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect 26 | github.com/niklasfasching/go-org v1.7.0 // indirect 27 | github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect 28 | github.com/pelletier/go-toml/v2 v2.1.1 // indirect 29 | github.com/pkg/errors v0.9.1 // indirect 30 | github.com/spf13/afero v1.11.0 // indirect 31 | github.com/spf13/cast v1.6.0 // indirect 32 | github.com/spf13/jwalterweatherman v1.1.0 // indirect 33 | github.com/tdewolff/parse/v2 v2.7.12 // indirect 34 | golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect 35 | golang.org/x/net v0.22.0 // indirect 36 | golang.org/x/sys v0.18.0 // indirect 37 | golang.org/x/text v0.14.0 // indirect 38 | google.golang.org/protobuf v1.31.0 // indirect 39 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect 40 | gopkg.in/yaml.v2 v2.4.0 // indirect 41 | ) 42 | -------------------------------------------------------------------------------- /deps/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/gohugoio/hugo/common/hugo" 7 | ) 8 | 9 | func main() { 10 | fmt.Println(hugo.CurrentVersion) 11 | } 12 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | hugo: 5 | container_name: hugo_theme_iris 6 | image: ghcr.io/peaceiris/hugo:${HUGO_VERSION}-mod 7 | ports: 8 | - 1313:1313 9 | volumes: 10 | - ${PWD}:/src/hugo-theme-iris 11 | - ${HUGO_CACHEDIR}:/root/.cache/hugo 12 | environment: 13 | - HUGO_CACHEDIR=/root/.cache/hugo 14 | stdin_open: true 15 | tty: true 16 | working_dir: /src/hugo-theme-iris/exampleSite 17 | entrypoint: bash 18 | -------------------------------------------------------------------------------- /exampleSite/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | 4 | public 5 | resources 6 | hugo_stats.json 7 | 8 | node_modules 9 | 10 | *.woff 11 | -------------------------------------------------------------------------------- /exampleSite/.hugo_build.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/.hugo_build.lock -------------------------------------------------------------------------------- /exampleSite/assets/images/.gitignore: -------------------------------------------------------------------------------- 1 | ????????????????????????????????????????????????????????????????.jpg 2 | ????????????????????????????????????????????????????????????????.png 3 | -------------------------------------------------------------------------------- /exampleSite/assets/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/logo.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/screenshot.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/shortcode_button.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/shortcode_button.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/shortcode_circle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/shortcode_circle.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/shortcode_github-sponsors-list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/shortcode_github-sponsors-list.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/shortcode_mermaid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/shortcode_mermaid.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/shortcode_repo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/shortcode_repo.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/shortcode_table_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/shortcode_table_1.jpg -------------------------------------------------------------------------------- /exampleSite/assets/images/shortcode_table_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/assets/images/shortcode_table_2.jpg -------------------------------------------------------------------------------- /exampleSite/config/_default/config.yaml: -------------------------------------------------------------------------------- 1 | baseURL: "https://hugothemeiris.peaceiris.com" 2 | 3 | module: 4 | imports: 5 | - path: github.com/peaceiris/hugo-theme-iris 6 | mounts: 7 | - source: assets 8 | target: assets 9 | - source: static 10 | target: static 11 | - source: node_modules/reveal.js 12 | target: assets/reveal.js 13 | - source: node_modules/hotkeys-js 14 | target: assets/hotkeys-js 15 | - source: node_modules/mermaid 16 | target: assets/mermaid 17 | - source: node_modules/mathjax 18 | target: assets/mathjax 19 | - source: node_modules/mathjax/es5/output/chtml/fonts/woff-v2 20 | target: static/mathjax/es5/output/chtml/fonts/woff-v2 21 | 22 | # googleAnalytics: UA-123-45 23 | disqusShortname: hugothemeiris 24 | 25 | paginate: 3 26 | canonifyURLs: true 27 | enableRobotsTXT: true 28 | pluralizeListTitles: false 29 | 30 | # hugo syntax highlighting 31 | pygmentsUseClasses: true 32 | pygmentsCodefences: true 33 | 34 | enableEmoji: true 35 | enableGitInfo: true 36 | enableInlineShortcodes: true 37 | 38 | taxonomies: {} 39 | # - tag: tags 40 | 41 | imaging: 42 | quality: 75 43 | 44 | markup: 45 | goldmark: 46 | renderer: 47 | unsafe: true 48 | 49 | minify: 50 | tdewolff: 51 | xml: 52 | keepWhitespace: true 53 | 54 | build: 55 | noJSConfigInAssets: false 56 | useResourceCacheWhen: fallback 57 | writeStats: true 58 | 59 | # Configure Languages 60 | DefaultContentLanguage: en 61 | languages: 62 | en: 63 | contentDir: content/en 64 | languageName: English 65 | languageCode: en-us 66 | params: 67 | author: peaceiris 68 | description: Hugo IRIS Theme Demo Site 69 | publishdate: '2020-01-01' 70 | twitter: 71 | username: piris314 72 | ogp: 73 | siteName: Hugo Theme Iris 74 | image: images/ogp.jpg 75 | locale: en-US 76 | title: Hugo IRIS Theme 77 | weight: 1 78 | ja: 79 | contentDir: content/ja 80 | languageName: 日本語 81 | languageCode: ja-jp 82 | params: 83 | author: peaceiris 84 | description: Hugo IRIS テーマデモサイト 85 | publishdate: '2020-01-01' 86 | twitter: 87 | username: piris314 88 | ogp: 89 | siteName: Hugo Theme Iris 90 | image: images/ogp.jpg 91 | locale: ja-JP 92 | title: Hugo IRIS テーマ 93 | weight: 2 94 | -------------------------------------------------------------------------------- /exampleSite/config/_default/menus/menus.en.yaml: -------------------------------------------------------------------------------- 1 | # menu 2 | main: 3 | - identifier: posts 4 | name: Posts 5 | pre: "" 6 | url: "/posts/" 7 | weight: 1 8 | - identifier: repository 9 | name: Repository 10 | pre: "" 11 | url: "https://github.com/peaceiris/hugo-theme-iris" 12 | weight: 2 13 | params: 14 | target: "_blank" 15 | rel: "noopener noreferrer" 16 | - identifier: author 17 | name: Author 18 | pre: "" 19 | url: "https://peaceiris.com" 20 | weight: 3 21 | params: 22 | target: "_blank" 23 | rel: "noopener noreferrer" 24 | - identifier: hugo-site 25 | name: Hugo 26 | pre: "" 27 | url: "https://gohugo.io/" 28 | weight: 4 29 | params: 30 | target: "_blank" 31 | rel: "noopener noreferrer" 32 | - identifier: rss 33 | name: RSS 34 | pre: "" 35 | url: "/index.xml" 36 | weight: 5 37 | -------------------------------------------------------------------------------- /exampleSite/config/_default/menus/menus.ja.yaml: -------------------------------------------------------------------------------- 1 | # menu 2 | main: 3 | - identifier: posts 4 | name: 記事一覧 5 | pre: "" 6 | url: "/posts/" 7 | weight: 1 8 | - identifier: repository 9 | name: リポジトリ 10 | pre: "" 11 | url: "https://github.com/peaceiris/hugo-theme-iris" 12 | weight: 2 13 | params: 14 | target: "_blank" 15 | rel: "noopener noreferrer" 16 | - identifier: author 17 | name: 作者 18 | pre: "" 19 | url: "https://peaceiris.com" 20 | weight: 3 21 | params: 22 | target: "_blank" 23 | rel: "noopener noreferrer" 24 | - identifier: hugo-site 25 | name: Hugo 26 | pre: "" 27 | url: "https://gohugo.io/" 28 | weight: 4 29 | params: 30 | target: "_blank" 31 | rel: "noopener noreferrer" 32 | - identifier: rss 33 | name: RSS 34 | pre: "" 35 | url: "/index.xml" 36 | weight: 5 37 | -------------------------------------------------------------------------------- /exampleSite/config/_default/params.yaml: -------------------------------------------------------------------------------- 1 | repo: 2 | URL: "https://github.com/peaceiris/hugo-theme-iris" 3 | branch: main 4 | contentDir: exampleSite/content 5 | 6 | themeColor: "#ffffff" # smart phone's browser tab color 7 | 8 | footer: 9 | copyright: 10 | name: peaceiris 11 | link: "https://peaceiris.com/" 12 | year: 2019 13 | 14 | icon: 15 | favicon: /favicon/favicon64.ico 16 | x180: /favicon/apple-icon-180x180.jpg 17 | mstile: /favicon/ms-icon-150x150.jpg 18 | 19 | enableBreadcrumbNavigation: true 20 | enableRandomRecommendedPosts: true 21 | 22 | shareButtons: 23 | twitter: true 24 | facebook: true 25 | pocket: true 26 | feedly: true 27 | hatenaBookmark: true 28 | reddit: true 29 | -------------------------------------------------------------------------------- /exampleSite/config/development/params.yaml: -------------------------------------------------------------------------------- 1 | # Params for development (server mode) 2 | productionBaseURL: "https://hugothemeiris.peaceiris.com" 3 | -------------------------------------------------------------------------------- /exampleSite/config/production/config.yaml: -------------------------------------------------------------------------------- 1 | # Config for production 2 | -------------------------------------------------------------------------------- /exampleSite/config/production/params.yaml: -------------------------------------------------------------------------------- 1 | # Params for production (build mode) 2 | -------------------------------------------------------------------------------- /exampleSite/config/staging/config.yaml: -------------------------------------------------------------------------------- 1 | # Config for production 2 | baseURL: "/" 3 | -------------------------------------------------------------------------------- /exampleSite/config/staging/params.yaml: -------------------------------------------------------------------------------- 1 | # Params for production (build mode) 2 | -------------------------------------------------------------------------------- /exampleSite/content/en/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Home 3 | description: Hugo Theme IRIS homepage 4 | date: 2020-09-03T23:00:00.000Z 5 | publishdate: 2020-01-01T23:00:00.000Z 6 | --- 7 | 8 | 9 | ## About Hugo IRIS Theme 10 | 11 | {{< circle src="images/logo.jpg" alt="hugo-theme-iris logo" >}} 12 | 13 | View source code on GitHub. 14 | 15 |
16 | 17 | {{< repo id="peaceiris" name="hugo-theme-iris" >}} 18 | 19 | ### Profile 20 | 21 | {{< table >}} 22 | | Key | Value | 23 | |---|---| 24 | | Static Site Generator | Hugo | 25 | | Language | Go | 26 | {{< /table >}} 27 | 28 | ### Keywords 29 | 30 | - Hugo 31 | - Golang 32 | - Static Site Generators 33 | 34 | 1. Hugo 35 | 2. Golang 36 | 3. Static Site Generators 37 | 38 | 39 | 40 | ## Links 41 | 42 | ### Internal 43 | 44 |
45 | {{< button href="./posts/" txt="All Posts" >}} 46 |
47 | 48 | ### External 49 | 50 |
51 | {{< button href="https://gohugo.io/" txt="Hugo Homepage" >}} 52 | {{< button href="https://github.com/gohugoio/" txt="Hugo GitHub" >}} 53 | {{< button href="https://discourse.gohugo.io/" txt="Hugo Forum" >}} 54 | {{< button href="https://twitter.com/GoHugoIO" txt="Hugo Twitter" >}} 55 |
56 | 57 | 58 | 59 | ## Shortcodes 60 | 61 | ### repo 62 | 63 | {{< repo id="peaceiris" name="actions-gh-pages" >}} 64 | 65 | {{< repo id="peaceiris" name="actions-hugo" >}} 66 | 67 | {{< repo id="peaceiris" name="hugo-extended-docker" >}} 68 | 69 | ### GitHub Sponsors List 70 | 71 | {{< github-sponsors-list id="peaceiris" >}} 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Posts 3 | description: peaceiris's posts list 4 | publishdate: 2019-09-29T08:00:00.000Z 5 | date: 2019-09-30T08:00:00.000Z 6 | --- 7 | 8 | All my posts 9 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/emoji-support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Emoji Support 3 | date: 2019-09-30T08:00:00.000Z 4 | description: Guide to emoji usage in Hugo 5 | draft: false 6 | eyecatch: "https://user-images.githubusercontent.com/30958501/123906010-63648100-d9ae-11eb-9456-c2b9178a91af.jpg" 7 | toc: true 8 | math: false 9 | --- 10 | 11 | 12 | 13 | Emoji can be enabled in a Hugo project in a number of ways. 14 | 15 | 16 | 17 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). 18 | 19 | To enable emoji globally, set `enableEmoji` to `true` in your site’s [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. 20 | 21 |

🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:

22 |
23 | 24 | The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. 25 | 26 | *** 27 | 28 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. 29 | 30 | ```css 31 | .emoji { 32 | font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols; 33 | } 34 | ``` 35 | 36 | {{< css.inline >}} 37 | 50 | {{< /css.inline >}} 51 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/github-pages-and-github-actions.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GitHub Pages and GitHub Actions 3 | description: Deploy your static site to GitHub Pages using GitHub Actions 4 | publishdate: 2019-11-01T01:00:00.000Z 5 | draft: false 6 | eyecatch: 'https://user-images.githubusercontent.com/30958501/121798925-0c4b7600-cc64-11eb-89eb-92d2e8f746db.jpg' 7 | toc: true 8 | math: false 9 | canonicalURL: https://github.com/peaceiris/actions-gh-pages 10 | --- 11 | 12 | 13 | 14 | ## GitHub Actions for GitHub Pages 15 | 16 | > GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site with Static Site Generators 17 | > [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) 18 | 19 | This is a **GitHub Action** to deploy your static files to **GitHub Pages**. 20 | This deploy action can be combined simply and freely with [Static Site Generators](https://www.staticgen.com/ "StaticGen") 21 | (Hugo, mdBook, MkDocs, Gatsby, GitBook, etc.). 22 | 23 | ```yaml 24 | - name: Deploy 25 | uses: peaceiris/actions-gh-pages@v3 26 | with: 27 | deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} 28 | publish_dir: ./public 29 | ``` 30 | 31 | The above example step will deploy `./public` directory to `gh-pages` branch. 32 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/markdown-syntax.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown Syntax Guide 3 | date: 2019-09-25T23:00:00.000Z 4 | description: Sample article showcasing basic Markdown syntax and formatting for HTML elements. 5 | draft: false 6 | eyecatch: "https://user-images.githubusercontent.com/30958501/123906102-8b53e480-d9ae-11eb-8639-d4eb09dafa7e.jpg" 7 | toc: true 8 | math: false 9 | --- 10 | 11 | 12 | 13 | This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. 14 | 15 | 16 | 17 | 18 | 19 | ## Headings 20 | 21 | The following HTML `

` to `

` elements represent six levels of section headings. 22 | `

` is the highest section level while `

` is the lowest. 23 | 24 | ### H3 25 | 26 | #### H4 27 | 28 | ##### H5 29 | 30 | ###### H6 31 | 32 | 33 | 34 | ## Paragraph 35 | 36 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. 37 | 38 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. 39 | 40 | 41 | 42 | ## Images 43 | 44 | ### Markdown 45 | 46 | ```md 47 | ![Hugo IRIS Theme](images/screenshot.jpg) 48 | 49 | ![Hugo IRIS Theme](images/screenshot.jpg "This is the screenshot") 50 | 51 | {{}} 52 | ![Hugo IRIS Theme](images/screenshot.jpg) 53 | {{}} 54 | ``` 55 | 56 | ### Output 57 | 58 | ![Hugo IRIS Theme](images/screenshot.jpg) 59 | 60 | ![Hugo IRIS Theme](images/screenshot.jpg "This is the screenshot") 61 | 62 | {{< centered >}} 63 | ![Hugo IRIS Theme](images/screenshot.jpg) 64 | {{< /centered >}} 65 | 66 | 67 | 68 | ## Blockquotes 69 | 70 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. 71 | 72 |
73 | 74 | ### Blockquote without attribution 75 | 76 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 77 | > Note that you can use *Markdown syntax* within a blockquote. 78 | 79 | ### Blockquote with attribution 80 | 81 | > Don't communicate by sharing memory, share memory by communicating. 82 | > — Rob Pike[^1] 83 | 84 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. 85 | 86 | 87 | 88 | ## Tables 89 | 90 | Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. 91 | 92 |
93 | 94 | {{< table >}} 95 | | Name | Age | 96 | |---|---| 97 | | Bob | 27 | 98 | | Alice | 23 | 99 | {{< /table >}} 100 | 101 | ### Inline Markdown within tables 102 | 103 | {{< table >}} 104 | | Inline | Markdown | In | Table | 105 | |---|---|---|---| 106 | | *italics* | **bold** | ~~strikethrough~~ | `code` | 107 | {{< /table >}} 108 | 109 | 110 | 111 | ## Code Blocks 112 | 113 | ### Code block with backticks 114 | 115 | ```html 116 | 117 | 118 | 119 | 120 | Example HTML5 Document 121 | 122 | 123 |

Test

124 | 125 | 126 | ``` 127 | 128 | ### Code block with Hugo's internal highlight shortcode 129 | 130 | {{< highlight html >}} 131 | 132 | 133 | 134 | 135 | Example HTML5 Document 136 | 137 | 138 |

Test

139 | 140 | 141 | {{< /highlight >}} 142 | 143 | 144 | 145 | ## List Types 146 | 147 | ### Ordered List 148 | 149 | 1. First item 150 | 2. Second item 151 | 3. Third item 152 | 153 | ### Unordered List 154 | 155 | * List item 156 | * Another item 157 | * And another item 158 | 159 | ### Nested list 160 | 161 | * Item 162 | 1. First Sub-item 163 | 2. Second Sub-item 164 | 165 | 166 | 167 | ## Other Elements — abbr, sub, sup, kbd, mark 168 | 169 | GIF is a bitmap image format. 170 | 171 | H2O 172 | 173 | Xn + Yn: Zn 174 | 175 | Press CTRL+ALT+Delete to end the session. 176 | 177 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 178 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/math.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: MathJax Support $E=mc^2$ 3 | description: Beautiful math in all browsers $E=mc^2$ 4 | publishdate: 2020-01-01T01:00:00.000Z 5 | draft: false 6 | eyecatch: "https://user-images.githubusercontent.com/30958501/121796747-647b7b80-cc56-11eb-8490-52d5899e561c.jpg" 7 | toc: true 8 | math: true 9 | --- 10 | 11 | 12 | 13 | ## MathJax 14 | 15 | [mathjax/MathJax: Beautiful math in all browsers](https://github.com/mathjax/MathJax) 16 | 17 | 18 | 19 | ## Inline Example 20 | 21 | ### Input 22 | 23 | ```tex 24 | Inline $E = mc^2$ 25 | ``` 26 | 27 | ### Output 28 | 29 | Inline $E = mc^2$ 30 | 31 | 32 | 33 | ## Basic Example 34 | 35 | ### Input 36 | 37 | ```tex 38 | $$ 39 | \sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6} 40 | $$ 41 | ``` 42 | 43 | ### Output 44 | 45 | $$ 46 | \sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6} 47 | $$ 48 | 49 | 50 | 51 | ## Math Shortcode 52 | 53 | See also [this thread](https://discourse.gohugo.io/t/use-goldmark-mathjax-extension/25721). 54 | 55 | ### Input 56 | 57 | ```md 58 | {{}} 59 | \begin{vmatrix}a & b\\ 60 | c & d 61 | \end{vmatrix} 62 | {{}} 63 | ``` 64 | 65 | ### Output 66 | 67 | {{< math >}} 68 | \begin{vmatrix}a & b\\ 69 | c & d 70 | \end{vmatrix} 71 | {{< /math >}} 72 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/mermaid.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: mermaid Graph Support 3 | description: Generation of diagram and flowchart from text in a similar manner as markdown 4 | publishdate: 2020-01-02T01:00:00.000Z 5 | draft: false 6 | eyecatch: "https://user-images.githubusercontent.com/30958501/123906097-8858f400-d9ae-11eb-9db0-f2e8fe5a17a0.png" 7 | toc: true 8 | math: false 9 | --- 10 | 11 | 12 | 13 | ## mermaid 14 | 15 | [mermaid-js/mermaid: Generation of diagram and flowchart from text in a similar manner as markdown](https://github.com/mermaid-js/mermaid) 16 | 17 | 18 | 19 | ## Example 20 | 21 | ### Input 22 | 23 | Use `mermaid` shortcode. 24 | 25 | ```md 26 | {{}} 27 | sequenceDiagram 28 | participant Alice 29 | participant Bob 30 | Alice->>John: Hello John, how are you? 31 | loop Healthcheck 32 | John->>John: Fight against hypochondria 33 | end 34 | Note right of John: Rational thoughts
prevail! 35 | John-->>Alice: Great! 36 | John->>Bob: How about you? 37 | Bob-->>John: Jolly good! 38 | {{}} 39 | ``` 40 | 41 | ### Output 42 | 43 | ``` 44 | {{< mermaid >}} 45 | sequenceDiagram 46 | participant Alice 47 | participant Bob 48 | Alice->>John: Hello John, how are you? 49 | loop Healthcheck 50 | John->>John: Fight against hypochondria 51 | end 52 | Note right of John: Rational thoughts
prevail! 53 | John-->>Alice: Great! 54 | John->>Bob: How about you? 55 | Bob-->>John: Jolly good! 56 | {{< /mermaid >}} 57 | ``` 58 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/revealjs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reveal.js Support 3 | description: Easily creating beautiful presentations using Markdown 4 | publishdate: 2020-01-03T01:00:00.000Z 5 | draft: false 6 | eyecatch: "https://user-images.githubusercontent.com/30958501/123906100-8a22b780-d9ae-11eb-849c-3bbb54581611.png" 7 | slide: true 8 | --- 9 | 10 | # Reveal.js 11 | 12 | ### The Html Presentation Framework 13 | 14 | Created by [Hakim El Hattab](https://hakim.se/) and contributors. 15 | 16 | --- 17 | 18 | ## Hello There 19 | 20 | reveal.js enables you to create beautiful interactive slide decks using HTML. 21 | This presentation will show you examples of what it can do. 22 | 23 | --- 24 | 25 | ## Vertical Slides 26 | 27 | To be developed. 28 | 29 | --- 30 | 31 | ## Slide Overview 32 | 33 | Press ESC to enter the slide overview. 34 | 35 | --- 36 | 37 | ## Point Of View 38 | 39 | Hold down the alt key (ctrl in Linux) and click on any element to zoom towards it using [zoom.js](https://lab.hakim.se/zoom-js/). 40 | Click again to zoom back out. 41 | 42 | --- 43 | 44 | ## Touch Optimized 45 | 46 | Presentations look great on touch devices, like mobile phones and tablets. Simply swipe through your slides. 47 | 48 | --- 49 | 50 | ## Fragments 51 | 52 | To be developed. 53 | 54 | --- 55 | 56 | ## Transition Styles 57 | 58 | To be developed. 59 | 60 | --- 61 | 62 | ## Themes 63 | 64 | To be developed. 65 | 66 | --- 67 | 68 | ## Slide Backgrounds 69 | 70 | To be developed. 71 | 72 | --- 73 | 74 | ## Background Transitions 75 | 76 | To be developed. 77 | 78 | --- 79 | 80 | ## Iframe Backgrounds 81 | 82 | To be developed. 83 | 84 | --- 85 | 86 | ## PRETTY CODE 87 | 88 | ```go 89 | package main 90 | 91 | import "fmt" 92 | 93 | func main() { 94 | fmt.Printf("Hello World\n") 95 | } 96 | ``` 97 | 98 | --- 99 | 100 | ## Marvelous List 101 | 102 | - No order here 103 | - Or here 104 | - Or here 105 | - Or here 106 | 107 | --- 108 | 109 | ## Fantastic Ordered List 110 | 111 | 1. One is smaller than... 112 | 1. Two is smaller than... 113 | 1. Three! 114 | 115 | --- 116 | 117 | ## Tabular Tables 118 | 119 | | Item | Value | Quantity | 120 | |---|---|---| 121 | | Apples | $1 | 7 | 122 | | Lemonade | $2 | 18 | 123 | | Bread | $3 | 2 | 124 | 125 | --- 126 | 127 | ## Clever Quotes 128 | 129 | To be developed. 130 | 131 | --- 132 | 133 | ## Intergalactic Interconnections 134 | 135 | You can link between slides internally. 136 | 137 | [Go to slide page 2](/posts/revealjs/#/1) 138 | 139 | --- 140 | 141 | ## Speaker View 142 | 143 | There's a speaker view. It includes a timer, preview of the upcoming slide as well as your speaker notes. 144 | 145 | Press the S key to try it out. 146 | 147 | --- 148 | 149 | ## Export To Pdf 150 | 151 | To be developed. 152 | 153 | --- 154 | 155 | ## Take A Moment 156 | 157 | Press B or . on your keyboard to pause the presentation. 158 | This is helpful when you're on stage and want to take distracting slides off the screen. 159 | 160 | --- 161 | 162 | ## Show Help 163 | 164 | Press `?` to show keyboard bindings. 165 | 166 | --- 167 | 168 | ## Math 169 | 170 | Inline $E = mc^2$ 171 | 172 | $$ 173 | \sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6} 174 | $$ 175 | 176 | --- 177 | 178 | ## The End 179 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/rich-content.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rich Content 3 | date: 2019-09-29T08:00:00.000Z 4 | description: A brief description of Hugo Shortcodes 5 | draft: false 6 | eyecatch: "https://user-images.githubusercontent.com/30958501/123906104-8c851180-d9ae-11eb-90fb-067e2344c7b0.jpg" 7 | toc: true 8 | math: false 9 | --- 10 | 11 | ## Shortcodes 12 | 13 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. 14 | 15 | 16 | 17 | 18 | 19 | ## YouTube Privacy Enhanced Shortcode 20 | 21 | ### Usage 22 | 23 | ```md 24 | {{}} 25 | ``` 26 | 27 | ### Example 28 | 29 | {{< youtube ZJthWmvUzzc >}} 30 | 31 | 32 | 33 | ## Twitter Shortcode 34 | 35 | ### Usage 36 | 37 | ```md 38 | {{}} 39 | ``` 40 | 41 | ### Example 42 | 43 | {{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} 44 | 45 | 46 | 47 | ## Vimeo Simple Shortcode 48 | 49 | ### Usage 50 | 51 | ```md 52 | {{}} 53 | ``` 54 | 55 | ### Example 56 | 57 | {{< vimeo_simple 48912912 >}} 58 | -------------------------------------------------------------------------------- /exampleSite/content/ja/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ホーム 3 | description: Hugo Theme IRIS ホームページ 4 | date: 2020-01-25T23:00:00.000Z 5 | --- 6 | 7 | 8 | 9 | ## Hugo IRIS Theme について 10 | 11 | {{< circle src="images/logo.jpg" alt="hugo-theme-iris logo" >}} 12 | 13 | ポートフォリオ・ブログ用の Hugo Theme です。 14 | ソースコードは GitHub にて管理されています。 15 | 16 |
17 | 18 | {{< repo id="peaceiris" name="hugo-theme-iris" >}} 19 | 20 | ### プロファイル 21 | 22 | {{< table >}} 23 | | Key | Value | 24 | |---|---| 25 | | 静的サイトジェネレーター | Hugo | 26 | | 言語 | Go | 27 | {{< /table >}} 28 | 29 | ### キーワード 30 | 31 | - Golang, Go 言語 32 | - Static Site Generators 33 | 34 | 35 | 36 | ## リンク 37 | 38 | ### サイト内 39 | 40 | ブログを言語ごとに管理することができます。 41 | 42 |
43 | {{< button href="./posts/" txt="All Posts" >}} 44 |
45 | 46 | ### サイト外 47 | 48 | このようにボタン形式のリンクを一覧表示することができます。 49 | 50 |
51 | {{< button href="https://gohugo.io/" txt="Hugo Homepage" >}} 52 | {{< button href="https://github.com/gohugoio/" txt="Hugo GitHub" >}} 53 | {{< button href="https://discourse.gohugo.io/" txt="Hugo Forum" >}} 54 | {{< button href="https://twitter.com/GoHugoIO" txt="Hugo Twitter" >}} 55 |
56 | 57 | 58 | 59 | ## プロジェクト 60 | 61 | ### オープンソースソフトウェア 62 | 63 | {{< repo id="peaceiris" name="actions-gh-pages" >}} 64 | 65 | {{< repo id="peaceiris" name="actions-hugo" >}} 66 | 67 | {{< repo id="peaceiris" name="hugo-extended-docker" >}} 68 | 69 | ### GitHub Sponsors List 70 | 71 | {{< github-sponsors-list id="peaceiris" >}} 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /exampleSite/content/ja/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 記事一覧 3 | description: Hugo Theme Iris の記事一覧 4 | publishdate: 2019-09-29T08:00:00.000Z 5 | date: 2019-09-30T08:00:00.000Z 6 | --- 7 | 8 | 記事一覧を出力するページです。 9 | -------------------------------------------------------------------------------- /exampleSite/content/ja/posts/github-pages-and-github-actions.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GitHub Pages and GitHub Actions 3 | description: GitHub Actions による GitHub Pages へのデプロイ 4 | publishdate: 2019-11-01T01:00:00.000Z 5 | # draft: true 6 | eyecatch: 'https://user-images.githubusercontent.com/30958501/121798925-0c4b7600-cc64-11eb-89eb-92d2e8f746db.jpg' 7 | # tags: ["GitHub Actions"] 8 | toc: true 9 | # math: true 10 | # weight: 1 11 | canonicalURL: https://github.com/peaceiris/actions-gh-pages 12 | --- 13 | 14 | 15 | 16 | ## GitHub Actions for GitHub Pages 17 | 18 | > GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site with Static Site Generators 19 | > [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) 20 | 21 | This is a **GitHub Action** to deploy your static files to **GitHub Pages**. 22 | This deploy action can be combined simply and freely with [Static Site Generators](https://www.staticgen.com/ "StaticGen") 23 | (Hugo, mdBook, MkDocs, Gatsby, GitBook, etc.). 24 | 25 | ```yaml 26 | - name: Deploy 27 | uses: peaceiris/actions-gh-pages@v3 28 | with: 29 | deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} 30 | publish_dir: ./public 31 | ``` 32 | 33 | The above example step will deploy `./public` directory to `gh-pages` branch. 34 | 35 | 36 | 37 | ## Example workflow 38 | 39 | Here is an example workflow for Hugo project. 40 | Creat YAML file `.github/workflows/gh-pages.yml` and push to your remote default branch. 41 | 42 | ```yaml 43 | - name: Deploy 44 | uses: peaceiris/actions-gh-pages@v3 45 | with: 46 | deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} 47 | publish_dir: ./public 48 | ``` 49 | -------------------------------------------------------------------------------- /exampleSite/data/github/.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/data/github/.json -------------------------------------------------------------------------------- /exampleSite/data/github/peaceiris.json: -------------------------------------------------------------------------------- 1 | {"data":{"user":{"login":"peaceiris","sponsorshipsAsMaintainer":{"nodes":[{"sponsor":{"login":"otiai10"}},{"sponsor":{"login":"danmindru"}},{"sponsor":{"login":"jambonrose"}},{"sponsor":{"login":"tinhb92"}},{"sponsor":{"login":"niki"}},{"sponsor":{"login":"say3no"}},{"sponsor":{"login":"ny-a"}}]},"repositories":{"nodes":[{"nameWithOwner":"peaceiris/actions-gh-pages","owner":{"login":"peaceiris"},"name":"actions-gh-pages","description":"GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.","url":"https://github.com/peaceiris/actions-gh-pages","primaryLanguage":{"name":"TypeScript"},"forkCount":342,"stargazers":{"totalCount":4404}},{"nameWithOwner":"peaceiris/actions-hugo","owner":{"login":"peaceiris"},"name":"actions-hugo","description":"GitHub Actions for Hugo ⚡️ Setup Hugo quickly and build your site fast. Hugo extended, Hugo Modules, Linux (Ubuntu), macOS, and Windows are supported.","url":"https://github.com/peaceiris/actions-hugo","primaryLanguage":{"name":"TypeScript"},"forkCount":79,"stargazers":{"totalCount":1340}},{"nameWithOwner":"peaceiris/emoji-ime-dictionary","owner":{"login":"peaceiris"},"name":"emoji-ime-dictionary","description":"日本語で絵文字入力をするための IME 追加辞書 📙 Google 日本語入力などで日本語から絵文字への変換を可能にする IME 拡張辞書","url":"https://github.com/peaceiris/emoji-ime-dictionary","primaryLanguage":{"name":"Python"},"forkCount":18,"stargazers":{"totalCount":328}},{"nameWithOwner":"peaceiris/actions-mdbook","owner":{"login":"peaceiris"},"name":"actions-mdbook","description":"GitHub Actions for mdBook (rust-lang/mdBook) ⚡️ Setup mdBook quickly and build your site fast. Linux (Ubuntu), macOS, and Windows are supported.","url":"https://github.com/peaceiris/actions-mdbook","primaryLanguage":{"name":"TypeScript"},"forkCount":20,"stargazers":{"totalCount":276}},{"nameWithOwner":"peaceiris/mkdocs-material-boilerplate","owner":{"login":"peaceiris"},"name":"mkdocs-material-boilerplate","description":"MkDocs Material Boilerplate (Starter Kit) - Deploy documentation to hosting platforms (Netlify, GitHub Pages, GitLab Pages, and AWS Amplify Console) with Docker, pipenv, and GitHub Actions.","url":"https://github.com/peaceiris/mkdocs-material-boilerplate","primaryLanguage":{"name":"Python"},"forkCount":52,"stargazers":{"totalCount":116}},{"nameWithOwner":"peaceiris/actions-label-commenter","owner":{"login":"peaceiris"},"name":"actions-label-commenter","description":"Label Commenter Action: Label triggered GitHub Action for posting a template comment, and automatically open/close/lock/unlock issues, pull-requests, and discussions.","url":"https://github.com/peaceiris/actions-label-commenter","primaryLanguage":{"name":"TypeScript"},"forkCount":16,"stargazers":{"totalCount":80}},{"nameWithOwner":"peaceiris/google-ime-dictionary","owner":{"login":"peaceiris"},"name":"google-ime-dictionary","description":"日英変換・英語略語展開のための IME 追加辞書 📙 日本語から英語への和英変換や英語略語の展開を Google 日本語入力や ATOK などで可能にする IME 拡張辞書","url":"https://github.com/peaceiris/google-ime-dictionary","primaryLanguage":{"name":"Shell"},"forkCount":5,"stargazers":{"totalCount":74}},{"nameWithOwner":"peaceiris/hugo-theme-iris","owner":{"login":"peaceiris"},"name":"hugo-theme-iris","description":"Hugo IRIS Theme - Portfolio and Blog","url":"https://github.com/peaceiris/hugo-theme-iris","primaryLanguage":{"name":"HTML"},"forkCount":18,"stargazers":{"totalCount":66}},{"nameWithOwner":"peaceiris/hugo-extended-docker","owner":{"login":"peaceiris"},"name":"hugo-extended-docker","description":"Debian Based Docker Image for Hugo (Hugo extended and Hugo Modules)","url":"https://github.com/peaceiris/hugo-extended-docker","primaryLanguage":{"name":"Makefile"},"forkCount":9,"stargazers":{"totalCount":56}},{"nameWithOwner":"peaceiris/docker-mdbook","owner":{"login":"peaceiris"},"name":"docker-mdbook","description":"mdBook Alpine Base Docker Image.","url":"https://github.com/peaceiris/docker-mdbook","primaryLanguage":{"name":"Dockerfile"},"forkCount":11,"stargazers":{"totalCount":41}},{"nameWithOwner":"peaceiris/actions-suggest-related-links","owner":{"login":"peaceiris"},"name":"actions-suggest-related-links","description":"A GitHub Action to suggest related or similar issues, documents, and links. Based on the power of NLP and fastText.","url":"https://github.com/peaceiris/actions-suggest-related-links","primaryLanguage":{"name":"TypeScript"},"forkCount":2,"stargazers":{"totalCount":29}},{"nameWithOwner":"peaceiris/actions-self-hosted-runners","owner":{"login":"peaceiris"},"name":"actions-self-hosted-runners","description":"GitHub Actions self-hosted runner on VirtualBox with Vagrant.","url":"https://github.com/peaceiris/actions-self-hosted-runners","primaryLanguage":{"name":"Shell"},"forkCount":7,"stargazers":{"totalCount":13}},{"nameWithOwner":"peaceiris/actions-github-pages","owner":{"login":"peaceiris"},"name":"actions-github-pages","description":"The v3 implementation of GitHub Actions for GitHub Pages.","url":"https://github.com/peaceiris/actions-github-pages","primaryLanguage":{"name":"TypeScript"},"forkCount":0,"stargazers":{"totalCount":12}},{"nameWithOwner":"peaceiris/actions-pixela","owner":{"login":"peaceiris"},"name":"actions-pixela","description":"GitHub Actions for Pixela (a-know/pi) - a-know/pi Setup Action. Linux (Ubuntu), macOS, and Windows are supported.","url":"https://github.com/peaceiris/actions-pixela","primaryLanguage":{"name":"TypeScript"},"forkCount":2,"stargazers":{"totalCount":12}},{"nameWithOwner":"peaceiris/actions-broken-link-checker","owner":{"login":"peaceiris"},"name":"actions-broken-link-checker","description":"GitHub Actions for broken-link-checker (Find broken links, missing images, etc in your HTML)","url":"https://github.com/peaceiris/actions-broken-link-checker","primaryLanguage":{"name":"Dockerfile"},"forkCount":0,"stargazers":{"totalCount":8}},{"nameWithOwner":"abema/github-actions-merger","owner":{"login":"abema"},"name":"github-actions-merger","description":"Github actions that merge pull requests with custom ways","url":"https://github.com/abema/github-actions-merger","primaryLanguage":{"name":"Go"},"forkCount":2,"stargazers":{"totalCount":7}},{"nameWithOwner":"peaceiris/actions-pipenv","owner":{"login":"peaceiris"},"name":"actions-pipenv","description":"GitHub Actions for Python project with pipenv","url":"https://github.com/peaceiris/actions-pipenv","primaryLanguage":{"name":"Dockerfile"},"forkCount":1,"stargazers":{"totalCount":6}},{"nameWithOwner":"peaceiris/hugo-mod-bulma","owner":{"login":"peaceiris"},"name":"hugo-mod-bulma","description":"Bulma packaged as a Hugo Module.","url":"https://github.com/peaceiris/hugo-mod-bulma","primaryLanguage":null,"forkCount":1,"stargazers":{"totalCount":5}},{"nameWithOwner":"peaceiris/actions-hugo-link-check","owner":{"login":"peaceiris"},"name":"actions-hugo-link-check","description":"GitHub Actions to check broken links for Hugo","url":"https://github.com/peaceiris/actions-hugo-link-check","primaryLanguage":{"name":"Dockerfile"},"forkCount":0,"stargazers":{"totalCount":5}},{"nameWithOwner":"peaceiris/hugo-mod-mathjax","owner":{"login":"peaceiris"},"name":"hugo-mod-mathjax","description":"MathJax packaged as a Hugo Module.","url":"https://github.com/peaceiris/hugo-mod-mathjax","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":4}},{"nameWithOwner":"peaceiris/hugo-mod-mermaidjs","owner":{"login":"peaceiris"},"name":"hugo-mod-mermaidjs","description":"mermaid-js/mermaid packaged as a Hugo Module.","url":"https://github.com/peaceiris/hugo-mod-mermaidjs","primaryLanguage":null,"forkCount":1,"stargazers":{"totalCount":4}},{"nameWithOwner":"peaceiris/workflows","owner":{"login":"peaceiris"},"name":"workflows","description":"GitHub Actions Composite/Reusable Workflows","url":"https://github.com/peaceiris/workflows","primaryLanguage":null,"forkCount":1,"stargazers":{"totalCount":4}},{"nameWithOwner":"peaceiris/hugo-mod-revealjs","owner":{"login":"peaceiris"},"name":"hugo-mod-revealjs","description":"reveal.js packaged as a Hugo Module.","url":"https://github.com/peaceiris/hugo-mod-revealjs","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":3}},{"nameWithOwner":"peaceiris/docker-latex","owner":{"login":"peaceiris"},"name":"docker-latex","description":"Docker image for LaTeX","url":"https://github.com/peaceiris/docker-latex","primaryLanguage":{"name":"Dockerfile"},"forkCount":0,"stargazers":{"totalCount":3}},{"nameWithOwner":"peaceiris/actions-liche","owner":{"login":"peaceiris"},"name":"actions-liche","description":"GitHub Actions for liche (Fast Link Checker for Markdown and HTML in Go)","url":"https://github.com/peaceiris/actions-liche","primaryLanguage":{"name":"Dockerfile"},"forkCount":0,"stargazers":{"totalCount":3}},{"nameWithOwner":"peaceiris/actions-muffet","owner":{"login":"peaceiris"},"name":"actions-muffet","description":"GitHub Actions for muffet (Fast website link checker in Go)","url":"https://github.com/peaceiris/actions-muffet","primaryLanguage":{"name":"Dockerfile"},"forkCount":4,"stargazers":{"totalCount":3}},{"nameWithOwner":"peaceiris/actions-mkdocs-gh-pages","owner":{"login":"peaceiris"},"name":"actions-mkdocs-gh-pages","description":"GitHub Actions for MkDocs and GitHub Pages - Build markdown documentation with Material for MkDocs and deploy to GitHub Pages automatically","url":"https://github.com/peaceiris/actions-mkdocs-gh-pages","primaryLanguage":{"name":"Shell"},"forkCount":1,"stargazers":{"totalCount":3}},{"nameWithOwner":"peaceiris/actions-export-envs","owner":{"login":"peaceiris"},"name":"actions-export-envs","description":"Exporting ACTIONS_RUNTIME_TOKEN and ACTIONS_CACHE_URL to enable the Docker layer caching on GitHub Actions.","url":"https://github.com/peaceiris/actions-export-envs","primaryLanguage":{"name":"Shell"},"forkCount":0,"stargazers":{"totalCount":2}},{"nameWithOwner":"dionomusuko/gh-release-with-wf-dispatch","owner":{"login":"dionomusuko"},"name":"gh-release-with-wf-dispatch","description":null,"url":"https://github.com/dionomusuko/gh-release-with-wf-dispatch","primaryLanguage":{"name":"Go"},"forkCount":3,"stargazers":{"totalCount":2}},{"nameWithOwner":"peaceiris/mlops","owner":{"login":"peaceiris"},"name":"mlops","description":"MLOps and DevOps Playground","url":"https://github.com/peaceiris/mlops","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":2}},{"nameWithOwner":"peaceiris/peaceiris","owner":{"login":"peaceiris"},"name":"peaceiris","description":"About peaceiris","url":"https://github.com/peaceiris/peaceiris","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":2}},{"nameWithOwner":"peaceiris/actions-github-app-token","owner":{"login":"peaceiris"},"name":"actions-github-app-token","description":"A GitHub Action to generate a token for GitHub Apps","url":"https://github.com/peaceiris/actions-github-app-token","primaryLanguage":{"name":"TypeScript"},"forkCount":0,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/test-sphinx","owner":{"login":"peaceiris"},"name":"test-sphinx","description":null,"url":"https://github.com/peaceiris/test-sphinx","primaryLanguage":{"name":"Python"},"forkCount":0,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/investigate-hugo-hanging","owner":{"login":"peaceiris"},"name":"investigate-hugo-hanging","description":"A repository to investigate a hanging of Hugo on GitHub Actions","url":"https://github.com/peaceiris/investigate-hugo-hanging","primaryLanguage":{"name":"HTML"},"forkCount":1,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/tss","owner":{"login":"peaceiris"},"name":"tss","description":"Annotate stdin with timestamps per line. A Go port of moreutils/ts and fork of kevinburke/tss.","url":"https://github.com/peaceiris/tss","primaryLanguage":{"name":"Go"},"forkCount":0,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/Hatena-Intern-2020","owner":{"login":"peaceiris"},"name":"Hatena-Intern-2020","description":null,"url":"https://github.com/peaceiris/Hatena-Intern-2020","primaryLanguage":{"name":"Go"},"forkCount":0,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/test-docusaurus","owner":{"login":"peaceiris"},"name":"test-docusaurus","description":"GitHub Pages and GitHub Actions example for facebook/docusaurus https://test-docusaurus.peaceiris.com/","url":"https://github.com/peaceiris/test-docusaurus","primaryLanguage":{"name":"JavaScript"},"forkCount":4,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/actions-utils","owner":{"login":"peaceiris"},"name":"actions-utils","description":"Utilities for the GitHub Actions.","url":"https://github.com/peaceiris/actions-utils","primaryLanguage":{"name":"JavaScript"},"forkCount":0,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/test-hugo-external-repo","owner":{"login":"peaceiris"},"name":"test-hugo-external-repo","description":"Test repo: Deploy from https://github.com/peaceiris/hugo-test-project","url":"https://github.com/peaceiris/test-hugo-external-repo","primaryLanguage":{"name":"HTML"},"forkCount":0,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/gatsby-test","owner":{"login":"peaceiris"},"name":"gatsby-test","description":"Log: https://github.com/peaceiris/gatsby-test/commits/gh-pages","url":"https://github.com/peaceiris/gatsby-test","primaryLanguage":{"name":"JavaScript"},"forkCount":1,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/contents","owner":{"login":"peaceiris"},"name":"contents","description":"Blog contents","url":"https://github.com/peaceiris/contents","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/netlify-search-function","owner":{"login":"peaceiris"},"name":"netlify-search-function","description":null,"url":"https://github.com/peaceiris/netlify-search-function","primaryLanguage":{"name":"Go"},"forkCount":1,"stargazers":{"totalCount":1}},{"nameWithOwner":"peaceiris/test-mdbook","owner":{"login":"peaceiris"},"name":"test-mdbook","description":null,"url":"https://github.com/peaceiris/test-mdbook","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":0}},{"nameWithOwner":"peaceiris/renovate-config","owner":{"login":"peaceiris"},"name":"renovate-config","description":"peaceiris renovate-config","url":"https://github.com/peaceiris/renovate-config","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":0}},{"nameWithOwner":"peaceiris/actions-go-sdk","owner":{"login":"peaceiris"},"name":"actions-go-sdk","description":null,"url":"https://github.com/peaceiris/actions-go-sdk","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":0}},{"nameWithOwner":"peaceiris/test-monorepo-release-action","owner":{"login":"peaceiris"},"name":"test-monorepo-release-action","description":null,"url":"https://github.com/peaceiris/test-monorepo-release-action","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":0}},{"nameWithOwner":"peaceiris/docker-images","owner":{"login":"peaceiris"},"name":"docker-images","description":"A collection of Docker images","url":"https://github.com/peaceiris/docker-images","primaryLanguage":{"name":"Dockerfile"},"forkCount":0,"stargazers":{"totalCount":0}},{"nameWithOwner":"peaceiris/docker-action","owner":{"login":"peaceiris"},"name":"docker-action","description":"A template to build a Docker action","url":"https://github.com/peaceiris/docker-action","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":0}},{"nameWithOwner":"peaceiris/actions-esa","owner":{"login":"peaceiris"},"name":"actions-esa","description":null,"url":"https://github.com/peaceiris/actions-esa","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":0}},{"nameWithOwner":"peaceiris/playground-actions","owner":{"login":"peaceiris"},"name":"playground-actions","description":null,"url":"https://github.com/peaceiris/playground-actions","primaryLanguage":null,"forkCount":0,"stargazers":{"totalCount":0}}]}}}} -------------------------------------------------------------------------------- /exampleSite/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/peaceiris/hugo-theme-iris/exampleSite 2 | 3 | go 1.18 4 | 5 | replace github.com/peaceiris/hugo-theme-iris => ../ 6 | 7 | require github.com/peaceiris/hugo-theme-iris v0.42.1 // indirect 8 | -------------------------------------------------------------------------------- /exampleSite/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/go.sum -------------------------------------------------------------------------------- /exampleSite/i18n/en.yaml: -------------------------------------------------------------------------------- 1 | toc: 2 | other: Table of Contents 3 | lastmod: 4 | other: Lastmod 5 | posts: 6 | other: Posts 7 | edit: 8 | other: Edit 9 | view_on_github: 10 | other: View Source 11 | canonical_link: 12 | other: Originally published at 13 | random_recommended_posts: 14 | other: Random Recommended Posts 15 | -------------------------------------------------------------------------------- /exampleSite/i18n/ja.yaml: -------------------------------------------------------------------------------- 1 | toc: 2 | other: 目次 3 | lastmod: 4 | other: 最終更新 5 | posts: 6 | other: 記事一覧 7 | edit: 8 | other: 編集 9 | view_on_github: 10 | other: ソースを表示 11 | canonical_link: 12 | other: 元記事は 13 | random_recommended_posts: 14 | other: こちらもいかが? 15 | -------------------------------------------------------------------------------- /exampleSite/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "", 3 | "comments": { 4 | "dependencies": { 5 | "bulma": "project" 6 | }, 7 | "devDependencies": {} 8 | }, 9 | "dependencies": { 10 | "bulma": "^0.9.4", 11 | "hotkeys-js": "^3.10.1", 12 | "mathjax": "^3.2.2", 13 | "mermaid": "^10.0.0", 14 | "reveal.js": "^5.0.0" 15 | }, 16 | "description": "", 17 | "license": "MIT", 18 | "main": "index.js", 19 | "name": "examplesite", 20 | "scripts": { 21 | "test": "echo \"Error: no test specified\" && exit 1" 22 | }, 23 | "version": "0.0.0" 24 | } 25 | -------------------------------------------------------------------------------- /exampleSite/scripts/fetch_data.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # fail on unset variables and command errors 4 | set -eu -o pipefail # -x: is for debugging 5 | 6 | gh api graphql -F owner="$1" -f query=' 7 | query($owner: String!) { 8 | user(login: $owner) { 9 | login 10 | sponsorshipsAsMaintainer(first: 99) { 11 | nodes { 12 | sponsor { 13 | login 14 | } 15 | } 16 | } 17 | repositories(orderBy: {field: STARGAZERS, direction: DESC}, first: 50, affiliations: OWNER, privacy: PUBLIC, isFork: false) { 18 | nodes { 19 | nameWithOwner 20 | owner { 21 | login 22 | } 23 | name 24 | description 25 | url 26 | primaryLanguage { 27 | name 28 | } 29 | forkCount 30 | stargazers { 31 | totalCount 32 | } 33 | } 34 | } 35 | } 36 | } 37 | ' 38 | -------------------------------------------------------------------------------- /exampleSite/scripts/fetch_images.ts: -------------------------------------------------------------------------------- 1 | import { expandGlobSync } from "https://deno.land/std@0.98.0/fs/mod.ts"; 2 | import { 3 | createHash, 4 | SupportedAlgorithm, 5 | } from "https://deno.land/std@0.98.0/hash/mod.ts"; 6 | import { 7 | Destination, 8 | download, 9 | DownlodedFile, 10 | } from "https://deno.land/x/download@v1.0.1/mod.ts"; 11 | import { exists } from "https://deno.land/std@0.98.0/fs/mod.ts"; 12 | 13 | class Image { 14 | remoteUrl: string; 15 | remoteUrlHashed: string; 16 | saveDir: string; 17 | extension: string; 18 | 19 | constructor(remoteUrl: string, saveDir: string) { 20 | this.remoteUrl = remoteUrl; 21 | this.remoteUrlHashed = this.hash("sha256", remoteUrl); 22 | this.saveDir = saveDir; 23 | this.extension = this.getExtension(this.remoteUrl); 24 | } 25 | 26 | hash(algorithm: SupportedAlgorithm, str: string): string { 27 | const hash = createHash(`${algorithm}`); 28 | hash.update(str); 29 | return hash.toString(); 30 | } 31 | 32 | getExtension(filename: string) { 33 | return filename.split(".").pop() || ""; 34 | } 35 | 36 | async download() { 37 | const dst: Destination = { 38 | file: `${this.remoteUrlHashed}.${this.extension}`, 39 | dir: this.saveDir, 40 | }; 41 | 42 | if (await exists(`${dst.dir}/${dst.file}`)) { 43 | console.log(`info: skip ${this.remoteUrl}`); 44 | return; 45 | } 46 | 47 | try { 48 | const fileObj: DownlodedFile = await download(this.remoteUrl, dst); 49 | console.log(`info: donwload ${this.remoteUrl} to ${fileObj.fullPath}`); 50 | } catch (err) { 51 | console.log(err); 52 | } 53 | } 54 | } 55 | 56 | class Post { 57 | path: string; 58 | images: Array; 59 | imageSaveDir: string; 60 | 61 | constructor(path: string, imageSaveDir: string) { 62 | this.path = path; 63 | this.images = []; 64 | this.imageSaveDir = imageSaveDir; 65 | } 66 | 67 | async getImageUrls() { 68 | const markdownContent = await Deno.readTextFile(this.path); 69 | // https://docs.github.com/en/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests 70 | const regexMarkdownImageLinks = 71 | /https:\/\/user-images.githubusercontent.com\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+\.(png|jpg|jpeg)/gm; 72 | const matches = markdownContent.match(regexMarkdownImageLinks); 73 | if (matches === null) return; 74 | for (const remoteUrl of matches) { 75 | const image = new Image(remoteUrl, this.imageSaveDir); 76 | this.images.push(image); 77 | } 78 | } 79 | } 80 | 81 | class Blog { 82 | domain: string; 83 | posts: Array; 84 | imageSaveDir: string; 85 | 86 | constructor(domain: string, imageSaveDir: string) { 87 | this.domain = domain; 88 | this.posts = []; 89 | this.imageSaveDir = imageSaveDir; 90 | } 91 | 92 | getPosts(glob: string) { 93 | for (const file of expandGlobSync(glob)) { 94 | const post = new Post(file.path, this.imageSaveDir); 95 | this.posts.push(post); 96 | } 97 | } 98 | } 99 | 100 | const blog = new Blog("peaceiris.com", "./assets/images"); 101 | await blog.getPosts("./content/**/*.md"); 102 | 103 | for await (const post of blog.posts) { 104 | await post.getImageUrls(); 105 | for await (const image of post.images) { 106 | image.download(); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /exampleSite/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/static/.nojekyll -------------------------------------------------------------------------------- /exampleSite/static/CNAME: -------------------------------------------------------------------------------- 1 | hugothemeiris.peaceiris.com 2 | -------------------------------------------------------------------------------- /exampleSite/static/_redirects: -------------------------------------------------------------------------------- 1 | # These rules will change if you change your site’s custom domains or HTTPS settings 2 | 3 | # Redirect default Netlify subdomain to primary domain 4 | #https://hugothemeiris.netlify.com/* https://hugothemeiris.peaceiris.com/:splat 301! 5 | -------------------------------------------------------------------------------- /exampleSite/static/admin/config.yml: -------------------------------------------------------------------------------- 1 | backend: 2 | name: github 3 | repo: peaceiris/hugo-theme-iris 4 | branch: main 5 | # squash_merges: true 6 | 7 | media_folder: "assets/images" 8 | # media_folder_relative: true 9 | public_folder: "images/" 10 | editor: 11 | preview: true 12 | # publish_mode: editorial_workflow 13 | 14 | site_url: https://hugothemeiris.peaceiris.com 15 | display_url: https://github.com/peaceiris/hugo-theme-iris 16 | logo_url: https://hugothemeiris.peaceiris.com/favicon/favicon64.ico 17 | 18 | collections: 19 | - label: "Home en" 20 | name: "home-en" 21 | folder: "content/en" 22 | create: false 23 | slug: "_index" 24 | fields: 25 | - { label: "Title", name: "title", widget: "string" } 26 | - { label: "Description", name: "description", widget: "string" } 27 | - { label: "Date", name: "date", widget: "datetime" } 28 | - { label: "Body", name: "body", widget: "markdown" } 29 | - label: "Home ja" 30 | name: "home-ja" 31 | folder: "content/ja" 32 | create: false 33 | slug: "_index" 34 | fields: 35 | - { label: "Title", name: "title", widget: "string" } 36 | - { label: "Description", name: "description", widget: "string" } 37 | - { label: "Date", name: "date", widget: "datetime" } 38 | - { label: "Body", name: "body", widget: "markdown" } 39 | - label: "Post en" 40 | name: "post-en" 41 | folder: "content/en/posts" 42 | create: true 43 | slug: "{{slug}}" 44 | fields: 45 | - { label: "Title", name: "title", widget: "string" } 46 | - { label: "Description", name: "description", widget: "string" } 47 | - { label: "Date", name: "date", widget: "datetime" } 48 | - { label: "Draft", name: "draft", widget: "boolean", default: true } 49 | - { 50 | label: "Eyecatch", 51 | name: "eyecatch", 52 | widget: "image", 53 | required: false, 54 | } 55 | - { 56 | label: "Canonical URL", 57 | name: "canonicalURL", 58 | widget: "string", 59 | required: false, 60 | } 61 | - { label: "ToC", name: "toc", widget: "boolean", default: false } 62 | - { label: "Math", name: "math", widget: "boolean", default: false } 63 | - { label: "Body", name: "body", widget: "markdown" } 64 | - label: "Post ja" 65 | name: "post-ja" 66 | folder: "content/ja/posts" 67 | create: true 68 | slug: "{{slug}}" 69 | fields: 70 | - { label: "Title", name: "title", widget: "string" } 71 | - { label: "Description", name: "description", widget: "string" } 72 | - { label: "Date", name: "date", widget: "datetime" } 73 | - { label: "Draft", name: "draft", widget: "boolean", default: true } 74 | - { 75 | label: "Eyecatch", 76 | name: "eyecatch", 77 | widget: "image", 78 | required: false, 79 | } 80 | - { 81 | label: "Canonical URL", 82 | name: "canonicalURL", 83 | widget: "string", 84 | required: false, 85 | } 86 | - { label: "ToC", name: "toc", widget: "boolean", default: false } 87 | - { label: "Math", name: "math", widget: "boolean", default: false } 88 | - { label: "Body", name: "body", widget: "markdown" } 89 | -------------------------------------------------------------------------------- /exampleSite/static/admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Content Manager 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exampleSite/static/favicon/apple-icon-180x180.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/static/favicon/apple-icon-180x180.jpg -------------------------------------------------------------------------------- /exampleSite/static/favicon/favicon64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/static/favicon/favicon64.ico -------------------------------------------------------------------------------- /exampleSite/static/favicon/ms-icon-150x150.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/static/favicon/ms-icon-150x150.jpg -------------------------------------------------------------------------------- /exampleSite/static/images/brand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /exampleSite/static/images/ogp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/exampleSite/static/images/ogp.jpg -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/peaceiris/hugo-theme-iris 2 | 3 | go 1.18 4 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/go.sum -------------------------------------------------------------------------------- /hugo.yaml: -------------------------------------------------------------------------------- 1 | module: 2 | hugoVersion: 3 | extended: true 4 | min: "0.110.0" 5 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/da8871f41e05751052d996e65e15bf756d019aa9/layouts/404.html -------------------------------------------------------------------------------- /layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | {{ .Text | safeHTML }} 2 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{ $caption := "" }} 2 | {{ with $.Text }} 3 | {{ $caption = . | safeHTMLAttr }} 4 | {{ end }} 5 | 6 | {{ $imageSrc := $.Destination }} 7 | {{ $hashedDestination := sha256 $imageSrc }} 8 | {{ $extension := path.Ext $imageSrc }} 9 | {{ $localPath := delimit (slice "images/" $hashedDestination $extension) "" }} 10 | {{ $assetPath := delimit (slice "assets/" $localPath) "" }} 11 | {{ $imagePath := $imageSrc }} 12 | {{ if (fileExists $assetPath) }} 13 | {{ $imagePath = $localPath }} 14 | {{ end }} 15 | 16 | {{ with resources.Get $imagePath }} 17 | {{ with .Err }} 18 | {{ warnf "%s" . }} 19 | {{ else }} 20 | {{ $image := . }} 21 | 22 | {{ $smallJPG := $image }} 23 | {{ $mediumJPG := $image }} 24 | {{ $largeJPG := $image }} 25 | 26 | {{ $smallWebP := $image }} 27 | {{ $mediumWebP := $image }} 28 | {{ $largeWebP := $image }} 29 | 30 | {{ $smallJPG = $image.Resize "480x jpg" }} 31 | {{ $mediumJPG = $image.Resize "768x jpg" }} 32 | {{ $largeJPG = $image.Resize "1024x jpg" }} 33 | 34 | {{ if hugo.IsExtended }} 35 | {{ $smallWebP = $image.Resize "480x webp" }} 36 | {{ $mediumWebP = $image.Resize "768x webp" }} 37 | {{ $largeWebP = $image.Resize "1024x webp" }} 38 | {{ end }} 39 | 40 |
41 | 42 | {{ if hugo.IsExtended }} 43 | 44 | 45 | 46 | {{ end }} 47 | 48 | 49 | 50 | 51 | {{ $caption }} 57 | 58 | {{ with $caption }} 59 |
{{ . }}
60 | {{ end }} 61 |
62 | {{ end }} 63 | {{ else }} 64 |
65 | {{ $caption }} 71 | {{ with $caption }} 72 |
{{ . }}
73 | {{ end }} 74 |
75 | {{ end }} 76 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-link.html: -------------------------------------------------------------------------------- 1 | 5 | {{ .Text | safeHTML }} 6 | 7 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ partial "head" . }} 4 | 5 | {{ if $.Params.slide }} 6 |
7 |
8 | {{- range (split $.RawContent "---\n") -}} 9 |
10 | 13 |
14 | {{- end -}} 15 |
16 |
17 | {{ partialCached "revealjs/js" . }} 18 | {{ else }} 19 | {{ partial "header.html" . }} 20 |
21 |
22 |
23 | {{ block "main" . }}{{ end }} 24 |
25 |
26 |
27 | {{ partial "footer" . }} 28 | {{ if $.Params.math }} 29 | {{ partialCached "mathjax" . }} 30 | {{ end }} 31 | {{ if .HasShortcode "mermaid" }} 32 | {{ partialCached "mermaid" . }} 33 | {{ end }} 34 | {{ partial "keyboard-shortcut" . }} 35 | {{ end }} 36 | 37 | 38 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | 3 | {{ $math := false }} 4 | {{ $hasDollar := false }} 5 | 6 |
7 |
8 |
9 | {{ partial "content" . }} 10 |
11 |
12 | 13 | {{ $paginator := .Paginate .Pages }} 14 | 15 |
" .Content 1 }} 27 | {{ range first 1 $firstH1 }} 28 | {{ $title = . | plainify }} 29 | {{ end }} 30 | {{ end }} 31 |

{{ $title }}

32 | {{ if (findRE "$$" $title) }} 33 | {{ $hasDollar = true }} 34 | {{ end }} 35 |

{{ .Description }}

36 | {{ if (findRE "$$" .Description) }} 37 | {{ $hasDollar = true }} 38 | {{ end }} 39 | {{ if .Params.math }} 40 | {{ $math = true }} 41 | {{ end }} 42 |

43 | {{ .Date.Format "2006-01-02" }} 44 | {{ partial "badges/badges" . }} 45 |

46 | 47 | 48 |
49 | 50 | {{ end }} 51 | 52 | 53 |
54 | 77 |
78 | 79 | 80 | {{ if and $math $hasDollar }} 81 | {{ partialCached "mathjax" . }} 82 | {{ end }} 83 | 84 | {{ end }} 85 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ if $.Params.eyecatch }} 3 |
4 | {{ partial "eyecatch" . }} 5 |
6 | {{ end }} 7 | 8 |
9 | {{ partial "content" . }} 10 |
11 | 12 |
13 | 14 | {{ if $.Site.Params.shareButtons }} 15 |
16 | {{ partial "share-buttons" . }} 17 |
18 | {{ end }} 19 | 20 | {{ if $.Site.DisqusShortname }} 21 |
22 | {{ template "_internal/disqus.html" . }} 23 |
24 | {{ end }} 25 | 26 | {{ if $.Site.Params.enableRandomRecommendedPosts }} 27 |
28 |

{{ i18n "random_recommended_posts" . }}

29 | {{ partial "random-post-list" . }} 30 |
31 | {{ end }} 32 | {{ end }} 33 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 | {{ partial "content" . }} 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /layouts/partials/badges/badges.html: -------------------------------------------------------------------------------- 1 | {{ $url := urls.Parse $.Page.Params.canonicalURL }} 2 | 3 | {{ if or $.Params.slide $.Params.slide $url.Host }} 4 |
5 | {{ end }} 6 | {{ partial "badges/draft" . }} 7 | {{ partial "badges/slide" . }} 8 | {{ partial "badges/canonical" . }} 9 | {{ if or $.Params.slide $.Params.slide $url.Host }} 10 |
11 | {{ end }} 12 | -------------------------------------------------------------------------------- /layouts/partials/badges/canonical.html: -------------------------------------------------------------------------------- 1 | {{ $url := urls.Parse $.Page.Params.canonicalURL }} 2 | {{ if $url.Host }} 3 | canonical | {{ $url.Host }} 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /layouts/partials/badges/draft.html: -------------------------------------------------------------------------------- 1 | {{ if $.Params.draft }} 2 | Draft 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /layouts/partials/badges/slide.html: -------------------------------------------------------------------------------- 1 | {{ if $.Params.slide }} 2 | Slide 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /layouts/partials/breadcrumb.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | {{- define "breadcrumb" -}} 8 | {{- if .node.Parent -}} 9 | {{- template "breadcrumb" (dict "node" .node.Parent "start" .start) -}} 10 | {{- else if not .node.IsHome -}} 11 | {{- template "breadcrumb" (dict "node" .node.Site.Home "start" .start) -}} 12 | {{- end -}} 13 | 14 | {{- if eq .node .start -}} 15 |
  • 16 | {{- .node.LinkTitle | truncate 20 -}} 17 |
  • 18 | {{- else -}} 19 |
  • 20 | {{- .node.LinkTitle -}} 21 |
  • 22 | {{- end -}} 23 | {{- end -}} 24 | -------------------------------------------------------------------------------- /layouts/partials/canonical-link.html: -------------------------------------------------------------------------------- 1 | {{ $url := urls.Parse $.Page.Params.canonicalURL }} 2 | {{ if $url.Host }} 3 | {{ i18n "canonical_link" . }} 4 | {{ $url.Host }} 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /layouts/partials/check-tools.html: -------------------------------------------------------------------------------- 1 | {{ if ne hugo.Environment "production" }} 2 | {{ block "checkTools" . }} 3 | {{ end }} 4 | {{ end }} 5 | 6 | {{ define "checkTools" }} 7 | 40 | 41 | 63 | {{ end }} 64 | -------------------------------------------------------------------------------- /layouts/partials/console-log.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /layouts/partials/content.html: -------------------------------------------------------------------------------- 1 | {{ $content := .Content }} 2 | 3 | {{ $content := replaceRE "(.|\n)*?" "" $.Content }} 4 | 5 | {{ $hasH2 := findRE "" $content }} 6 | {{ if $hasH2 }} 7 | {{ $content = $content | replaceRE "

    \n
  • " "
    • " }} 11 | {{ $content = $content | replaceRE "
    • \n
    " "
  • " }} 12 | {{ $content = $content | replaceRE "
      \n
    1. " "
      1. " }} 13 | {{ $content = $content | replaceRE "$.*
      2. \n
      " "
    " }} 14 | 15 | {{ partial "toc" . }} 16 | {{ $content | safeHTML }} 17 | -------------------------------------------------------------------------------- /layouts/partials/edit-button.html: -------------------------------------------------------------------------------- 1 | {{ with $.Site.Params.repo }} 2 | 3 | {{ i18n "edit" }} 4 | 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /layouts/partials/eyecatch.html: -------------------------------------------------------------------------------- 1 | {{ with $.Params.eyecatch }} 2 | 3 | {{ $imageSrc := $.Params.eyecatch }} 4 | {{ $hashedDestination := sha256 $imageSrc }} 5 | {{ $extension := path.Ext $imageSrc }} 6 | {{ $localPath := delimit (slice "images/" $hashedDestination $extension) "" }} 7 | {{ $assetPath := delimit (slice "assets/" $localPath) "" }} 8 | {{ $imagePath := $imageSrc }} 9 | {{ if (fileExists $assetPath) }} 10 | {{ $imagePath = $localPath }} 11 | {{ end }} 12 | 13 | {{ with resources.Get $imagePath }} 14 | {{ with .Err }} 15 | {{ warnf "%s" . }} 16 | {{ else }} 17 | {{ $image := . }} 18 | 19 | {{ $smallJPG := $image }} 20 | {{ $mediumJPG := $image }} 21 | {{ $largeJPG := $image }} 22 | 23 | {{ $smallWebP := $image }} 24 | {{ $mediumWebP := $image }} 25 | {{ $largeWebP := $image }} 26 | 27 | {{ $smallJPG = $image.Resize "480x jpg" }} 28 | {{ $mediumJPG = $image.Resize "768x jpg" }} 29 | {{ $largeJPG = $image.Resize "1024x jpg" }} 30 | 31 | {{ if hugo.IsExtended }} 32 | {{ $smallWebP = $image.Resize "480x webp" }} 33 | {{ $mediumWebP = $image.Resize "768x webp" }} 34 | {{ $largeWebP = $image.Resize "1024x webp" }} 35 | {{ end }} 36 | 37 |
    38 | 39 | {{ if hugo.IsExtended }} 40 | 41 | 42 | 43 | {{ end }} 44 | 45 | 46 | 47 | 48 | {{ $.Params.Description }} 54 | 55 |
    56 | {{ end }} 57 | {{ else }} 58 |
    59 | {{ $.Params.Description }} 65 |
    66 | {{ end }} 67 | {{ end }} 68 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | {{ partial "head/general" . }} 3 | {{ partial "head/json-ld" . }} 4 | 5 | {{ if $.Params.slide }} 6 | 12 | {{ else }} 13 | 24 | {{ end }} 25 | 26 | -------------------------------------------------------------------------------- /layouts/partials/head/favicon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ with .Site.Params.themeColor }} 5 | 6 | 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /layouts/partials/head/general.html: -------------------------------------------------------------------------------- 1 | {{ hugo.Generator }} 2 | 3 | 4 | {{ if hugo.IsProduction }} 5 | {{ template "_internal/google_analytics_async.html" . }} 6 | {{ end }} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | {{ partial "head/favicon" . }} 36 | 37 | 38 | {{ with .OutputFormats.Get "rss" }} 39 | {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} 40 | {{ end }} 41 | 42 | {{ $title := "" }} 43 | {{ with $.Title }} 44 | {{ $title = . }} 45 | {{ else }} 46 | {{ $firstH1 := findRE "(.|\n)*?

    " $.Content 1 }} 47 | {{ range first 1 $firstH1 }} 48 | {{ $title = . | plainify }} 49 | {{ end }} 50 | {{ end }} 51 | 52 | {{ if $.IsHome }} 53 | {{ $title = $.Site.Params.Title | safeHTML }} 54 | {{ end }} 55 | {{ $title }} 56 | 57 | 58 | 59 | 60 | {{ partial "head/ogp" . }} 61 | 62 | {{ $canonicalURL := urls.Parse $.Page.Params.canonicalURL }} 63 | {{ if $canonicalURL.Host }} 64 | 65 | {{ end }} 66 | -------------------------------------------------------------------------------- /layouts/partials/head/json-ld.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ $OGPImage := "" }} 4 | {{ if .IsHome }} 5 | {{ $OGPImage = $.Site.Params.ogp.image | absURL }} 6 | {{ else }} 7 | {{ with .Params.eyecatch }} 8 | {{ $OGPImage = . | absURL }} 9 | {{ else }} 10 | {{ $OGPImage = $.Site.Params.ogp.image | absURL }} 11 | {{ end }} 12 | {{ end }} 13 | 14 | {{ $h1 := "" }} 15 | {{ with $.Title }} 16 | {{ $h1 = . }} 17 | {{ else }} 18 | {{ $firstH1 := findRE "(.|\n)*?

    " $.Content 1 }} 19 | {{ range first 1 $firstH1 }} 20 | {{ $h1 = . | plainify }} 21 | {{ end }} 22 | {{ end }} 23 | 24 | 57 | -------------------------------------------------------------------------------- /layouts/partials/head/ogp.html: -------------------------------------------------------------------------------- 1 | {{ $imagePath := "" }} 2 | {{ if $.Params.eyecatch }} 3 | {{ with resources.Get $.Params.eyecatch }} 4 | {{ with .Err }} 5 | {{ warnf "%s" . }} 6 | {{ else }} 7 | {{ $image := . }} 8 | {{ $imagePath = ($image | resources.Fingerprint "sha512").Permalink }} 9 | {{ end }} 10 | {{ else }} 11 | {{ $imagePath = $.Params.eyecatch }} 12 | {{ end }} 13 | {{ else }} 14 | {{ $imagePath = $.Site.Params.ogp.image | absURL }} 15 | {{ end }} 16 | 17 | {{ $description := "" }} 18 | {{ if $.IsHome }} 19 | {{ $description = $.Site.Params.description | safeHTMLAttr }} 20 | {{ else }} 21 | {{ $description = $.Description | safeHTMLAttr }} 22 | {{ end }} 23 | 24 | {{ $title := "" }} 25 | {{ with $.Title }} 26 | {{ $title = . }} 27 | {{ else }} 28 | {{ $firstH1 := findRE "(.|\n)*?" $.Content 1 }} 29 | {{ range first 1 $firstH1 }} 30 | {{ $title = . | plainify }} 31 | {{ end }} 32 | {{ end }} 33 | 34 | {{ if $.IsHome }} 35 | {{ $title = $.Site.Params.Title | safeHTMLAttr }} 36 | {{ else }} 37 | {{ $title = $title | safeHTMLAttr }} 38 | {{ end }} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | {{ with $.Site.Params.twitter.username }} 53 | 54 | 55 | {{ else }} 56 | 57 | {{ end }} 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | {{ $title := "" }} 2 | {{ with $.Page.Title }} 3 | {{ $title = . }} 4 | {{ else }} 5 | {{ $firstH1 := findRE "(.|\n)*?" $.Content 1 }} 6 | {{ range first 1 $firstH1 }} 7 | {{ $title = . | plainify }} 8 | {{ end }} 9 | {{ end }} 10 | 11 |
    12 |
    13 | 14 |
    15 | 43 |
    44 | 45 | 46 |
    47 |
    48 |

    49 | {{ if .IsHome }} 50 | {{ .Site.Title }} 51 | {{ else }} 52 | {{ $title }} 53 | {{ end }} 54 |

    55 |

    56 | {{ if .IsHome }} 57 | {{ .Site.Params.description }} 58 | {{ else }} 59 | {{ .Description }} 60 | {{ end }} 61 |

    62 | {{ if $.Site.Params.enableBreadcrumbNavigation }} 63 | {{ partial "breadcrumb" . }} 64 | {{ end }} 65 |

    {{ partial "canonical-link" . }}

    66 | {{ if .Params.draft }} 67 |

    68 |

    69 | {{ partial "badges/draft" . }} 70 |
    71 |

    72 | {{ end }} 73 | {{ with .GitInfo }} 74 |

    75 | {{ i18n "lastmod" . }}: {{ $.Lastmod.Format "2006-01-02" }} 79 |

    80 | {{ end }} 81 |
    82 |
    83 | 84 | 85 |
    86 |
    87 | {{ partial "lang-button" . }} 88 | {{ partial "view-on-github-button" . }} 89 | {{ partial "edit-button" . }} 90 | {{ partial "check-tools" . }} 91 |
    92 |
    93 |
    94 |
    95 | 96 | 123 | -------------------------------------------------------------------------------- /layouts/partials/keyboard-shortcut.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51 | 52 | {{ $js := resources.Get "hotkeys-js/dist/hotkeys.min.js" }} 53 | {{ $secureJS := $js | resources.Fingerprint "sha512" }} 54 | 55 | 91 | -------------------------------------------------------------------------------- /layouts/partials/lang-button.html: -------------------------------------------------------------------------------- 1 | {{ define "button" }} 2 | 3 | 20 | 26 | 27 | {{ end }} 28 | 29 | {{ if gt (len .Translations) 0 }} 30 | {{ block "button" . }} 31 | {{ end }} 32 | {{ end }} 33 | -------------------------------------------------------------------------------- /layouts/partials/mathjax.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | {{ $js := resources.Get "mathjax/es5/tex-mml-chtml.js" }} 10 | {{ $secureJS := $js | resources.Fingerprint "sha512" }} 11 | 12 | -------------------------------------------------------------------------------- /layouts/partials/mermaid.html: -------------------------------------------------------------------------------- 1 | {{ $js := resources.Get "mermaid/dist/mermaid.min.js" }} 2 | {{ $secureJS := $js | resources.Fingerprint "sha512" }} 3 | 4 | 18 | -------------------------------------------------------------------------------- /layouts/partials/random-post-list.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /layouts/partials/revealjs/js.html: -------------------------------------------------------------------------------- 1 | {{ $revealjs := resources.Get "reveal.js/dist/reveal.js" }} 2 | {{ $revealjsHash := $revealjs | resources.Fingerprint "sha512" }} 3 | 4 | 5 | {{ $markdown := resources.Get "reveal.js/plugin/markdown/markdown.js" }} 6 | {{ $markdownHash := $markdown | resources.Fingerprint "sha512" }} 7 | 8 | 9 | {{ $highlight := resources.Get "reveal.js/plugin/highlight/highlight.js" }} 10 | {{ $highlightHash := $highlight | resources.Fingerprint "sha512" }} 11 | 12 | 13 | {{ $zoom := resources.Get "reveal.js/plugin/zoom/zoom.js" }} 14 | {{ $zoomHash := $zoom | resources.Fingerprint "sha512" }} 15 | 16 | 17 | {{ $notes := resources.Get "reveal.js/plugin/notes/notes.js" }} 18 | {{ $notesHash := $notes | resources.Fingerprint "sha512" }} 19 | 20 | 21 | {{ $math := resources.Get "reveal.js/plugin/math/math.js" }} 22 | {{ $mathHash := $math | resources.Fingerprint "sha512" }} 23 | 24 | 25 | 30 | -------------------------------------------------------------------------------- /layouts/partials/share-buttons.html: -------------------------------------------------------------------------------- 1 |
    2 | {{ if $.Site.Params.shareButtons.twitter }} 3 | Twitter 9 | {{ end }} 10 | 11 | {{ if $.Site.Params.shareButtons.facebook }} 12 | Facebook 18 | {{ end }} 19 | 20 | {{ if $.Site.Params.shareButtons.pocket }} 21 | Pocket 27 | {{ end }} 28 | 29 | {{ if $.Site.Params.shareButtons.feedly }} 30 | Feedly 36 | {{ end }} 37 | 38 | {{ if $.Site.Params.shareButtons.hatenaBookmark }} 39 | Hatena Bookmark 45 | {{ end }} 46 | 47 | {{ if $.Site.Params.shareButtons.reddit }} 48 | Reddit 54 | {{ end }} 55 |
    56 | -------------------------------------------------------------------------------- /layouts/partials/toc.html: -------------------------------------------------------------------------------- 1 | {{ $toc := .TableOfContents }} 2 | 3 | {{ with $.Page.Params.toc }} 4 |

    {{ i18n "toc" . }}

    5 |
    6 | {{ $toc }} 7 |
    8 | {{ end }} 9 | -------------------------------------------------------------------------------- /layouts/partials/view-on-github-button.html: -------------------------------------------------------------------------------- 1 | {{ with $.Site.Params.repo }} 2 | 3 | {{ i18n "view_on_github" }} 4 | 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | 3 | Sitemap: {{ strings.TrimRight "/" .Site.BaseURL }}/sitemap.xml 4 | -------------------------------------------------------------------------------- /layouts/shortcodes/button.html: -------------------------------------------------------------------------------- 1 | {{ $href := .Get "href" }} 2 | {{ $txt := .Get "txt" }} 3 | {{ $txt }} 4 | -------------------------------------------------------------------------------- /layouts/shortcodes/centered.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {{ .Inner | .Page.RenderString }} 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /layouts/shortcodes/circle.html: -------------------------------------------------------------------------------- 1 | {{ $src := .Get "src" }} 2 | {{ $alt := .Get "alt" }} 3 | 4 | {{ $imageSrc := $src }} 5 | {{ $hashedDestination := sha256 $imageSrc }} 6 | {{ $extension := path.Ext $imageSrc }} 7 | {{ $localPath := delimit (slice "images/" $hashedDestination $extension) "" }} 8 | {{ $assetPath := delimit (slice "assets/" $localPath) "" }} 9 | {{ $imagePath := $imageSrc }} 10 | {{ if (fileExists $assetPath) }} 11 | {{ $imagePath = $localPath }} 12 | {{ end }} 13 | 14 | {{ with resources.Get $imagePath }} 15 | {{ with .Err }} 16 | {{ warnf "%s" . }} 17 | {{ else }} 18 | {{ $image := . }} 19 | 20 | {{ $smallJPG := $image }} 21 | {{ $mediumJPG := $image }} 22 | {{ $largeJPG := $image }} 23 | 24 | {{ $smallWebP := $image }} 25 | {{ $mediumWebP := $image }} 26 | {{ $largeWebP := $image }} 27 | 28 | {{ $smallJPG = $image.Resize "480x jpg" }} 29 | {{ $mediumJPG = $image.Resize "768x jpg" }} 30 | {{ $largeJPG = $image.Resize "1024x jpg" }} 31 | 32 | {{ if hugo.IsExtended }} 33 | {{ $smallWebP = $image.Resize "480x webp" }} 34 | {{ $mediumWebP = $image.Resize "768x webp" }} 35 | {{ $largeWebP = $image.Resize "1024x webp" }} 36 | {{ end }} 37 | 38 |
    39 |
    40 | 41 | {{ if hugo.IsExtended }} 42 | 43 | 44 | 45 | {{ end }} 46 | 47 | 48 | 49 | 50 | {{ $alt | safeHTMLAttr }} 57 | 58 |
    59 |
    60 | {{ end }} 61 | {{ else }} 62 |
    63 |
    64 | {{ $alt | safeHTMLAttr }} 71 |
    72 |
    73 | {{ end }} 74 | -------------------------------------------------------------------------------- /layouts/shortcodes/code.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ $title := .Get "title" }} 5 | {{ $lang := or (.Get "lang") "" }} 6 |
    7 | {{ with $title }} 8 |
    {{ . }}
    9 | {{ $lang }} 10 | {{ end }} 11 |
    12 | {{ highlight (trim .Inner "\r\n") $lang "" }} 13 |
    14 |
    15 | -------------------------------------------------------------------------------- /layouts/shortcodes/github-sponsors-list.html: -------------------------------------------------------------------------------- 1 | {{ $id := .Get "id" }} 2 | {{ $JSONdata := .Page.Site.Data }} 3 | {{ $githubData := (index $JSONdata "github") }} 4 | {{ $userData := (index $githubData $id) }} 5 |
    6 | {{ range $userData.data.user.sponsorshipsAsMaintainer.nodes }} 7 | {{ if .sponsor }} 8 | {{ $sponsorID := .sponsor.login }} 9 | {{ $sponsorURL := delimit (slice "https://github.com/" $sponsorID) "" | safeURL }} 10 |
    11 |
    12 | 13 | {{ $sponsorID }} | GitHub 20 | 21 |
    {{ print $sponsorID }}
    22 |
    23 |
    24 | {{ end }} 25 | {{ end }} 26 |
    27 | -------------------------------------------------------------------------------- /layouts/shortcodes/math.html: -------------------------------------------------------------------------------- 1 | $$ 2 | {{ .Inner }} 3 | $$ 4 | -------------------------------------------------------------------------------- /layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 |
    2 | {{- safeHTML .Inner -}} 3 |
    4 | -------------------------------------------------------------------------------- /layouts/shortcodes/repo.html: -------------------------------------------------------------------------------- 1 | {{ $name := "" }} 2 | {{ $fullname := "" }} 3 | {{ $url := "" }} 4 | {{ $description := "" }} 5 | {{ $stars := "" }} 6 | {{ $forks := "" }} 7 | {{ $lang := "" }} 8 | 9 | {{ $id := .Get "id" }} 10 | {{ $repoName := .Get "name" }} 11 | {{ $JSONdata := .Page.Site.Data }} 12 | {{ $githubData := (index $JSONdata "github") }} 13 | {{ $userData := (index $githubData $id) }} 14 | {{ range $userData.data.user.repositories.nodes }} 15 | {{ if eq .name $repoName }} 16 | {{ $name = .name }} 17 | {{ $fullname = .nameWithOwner }} 18 | {{ $url = .url }} 19 | {{ $description = .description }} 20 | {{ $stars = .stargazers.totalCount }} 21 | {{ $forks = .forkCount }} 22 | {{ $lang = .primaryLanguage.name }} 23 | {{ end }} 24 | {{ end }} 25 | 26 | {{ with .Get "fullname" }} 27 | {{ $fullname = . }} 28 | {{ end }} 29 | {{ with .Get "url" }} 30 | {{ $url = . }} 31 | {{ end }} 32 | {{ with .Get "description" }} 33 | {{ $description = . }} 34 | {{ end }} 35 | {{ with .Get "lang" }} 36 | {{ $lang = . }} 37 | {{ end }} 38 | 39 | 64 | -------------------------------------------------------------------------------- /layouts/shortcodes/table.html: -------------------------------------------------------------------------------- 1 | {{ $table := .Inner | markdownify | safeHTML }} 2 | {{ $tableBulma := $table | replaceRE "" "
    " }} 3 | {{ $tableBulma | safeHTML }} 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hugo-theme-iris", 3 | "version": "0.43.2", 4 | "private": true, 5 | "description": "Hugo IRIS Theme - Portfolio and Blog", 6 | "homepage": "https://github.com/peaceiris/hugo-theme-iris#readme", 7 | "bugs": { 8 | "url": "https://github.com/peaceiris/hugo-theme-iris/issues" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://peaceiris@github.com/peaceiris/hugo-theme-iris.git" 13 | }, 14 | "license": "MIT", 15 | "author": "peaceiris", 16 | "scripts": { 17 | "postinstall": "npx husky install", 18 | "start": "run-p client server", 19 | "server": "make dev", 20 | "client": "wait-on http://localhost:1313 && open http://localhost:1313", 21 | "dev": "make dev", 22 | "build": "make build-prod", 23 | "test": "make test", 24 | "test:renovate": "renovate-config-validator" 25 | }, 26 | "lint-staged": { 27 | "**/*": [ 28 | "npm test" 29 | ], 30 | "{README,CONTRIBUTING}.md": [ 31 | "npx doctoc@2.1.0 --github" 32 | ] 33 | }, 34 | "devDependencies": { 35 | "husky": "^9.0.0", 36 | "lint-staged": "^15.0.0", 37 | "npm-run-all2": "^6.0.0", 38 | "open": "^10.0.0", 39 | "renovate": "^37.0.0", 40 | "wait-on": "^7.0.1" 41 | }, 42 | "engines": { 43 | "node": ">=v16.19.0", 44 | "npm": ">=9.3.1" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>peaceiris/renovate-config" 5 | ], 6 | "enabledManagers": [ 7 | "docker-compose", 8 | "gomod", 9 | "npm", 10 | "nvm" 11 | ], 12 | "packageRules": [ 13 | { 14 | "automerge": true, 15 | "matchUpdateTypes": ["minor", "patch"], 16 | "automergeStrategy": "squash" 17 | }, 18 | { 19 | "groupName": "renovate", 20 | "matchPackageNames": ["renovate"], 21 | "minimumReleaseAge": "30 days" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /scripts/setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # fail on unset variables and command errors 4 | set -eu -o pipefail # -x: is for debugging 5 | 6 | cd $1 7 | git init 8 | wget https://github.com/peaceiris/hugo-theme-iris/archive/main.zip 9 | unzip main.zip 10 | rm main.zip 11 | hugo mod init "github.com/$2/$1" 12 | cp -r ./hugo-theme-iris-main/exampleSite/{.gitignore,assets,config,content,data,i18n,package-lock.json,package.json,scripts,static} . 13 | rm ./assets/images/.gitignore 14 | rm -rf hugo-theme-iris-main 15 | hugo mod get -u github.com/peaceiris/hugo-theme-iris 16 | git add . 17 | git commit -m "Add hugo-theme-iris" 18 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "Iris" 2 | license = "MIT" 3 | licenselink = "https://github.com/peaceiris/hugo-theme-iris/blob/main/LICENSE" 4 | description = "Hugo Iris Theme - Portfolio and Blog" 5 | homepage = "https://github.com/peaceiris/hugo-theme-iris" 6 | demosite = "https://hugothemeiris.peaceiris.com/" 7 | min_version = "0.110.0" 8 | tags = [ 9 | "blog", 10 | "responsive", 11 | "personal", 12 | "google-analytics", 13 | "portfolio", 14 | "dark", 15 | "disqus", 16 | "multilingual", 17 | "fast", 18 | "mobile", 19 | "syntax-highlighting", 20 | # "font-awesome", 21 | "flexbox", 22 | # "search", 23 | "presentation", 24 | "bulma", 25 | # "fontawesome", 26 | "netlify", 27 | "slide" 28 | ] 29 | features = [ 30 | "mathjax", 31 | "mermaid", 32 | "reveal.js", 33 | # "netlify-cms" 34 | ] 35 | 36 | [author] 37 | name = "peaceiris" 38 | homepage = "https://peaceiris.com" 39 | --------------------------------------------------------------------------------