Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/mod-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Update Hugo dependencies
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *' # run daily at 03:00 AM

permissions:
contents: write
pull-requests: write

jobs:
update-mod:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

# [26/AUG/23] Adjusted from npm ci to prevent EBADPLATFORM error due to fsevents
- name: Install npm
run: npm i

- name: Update Hugo module dependencies
id: mod-updates
run: |
MOD_OUTPUT=$(npm run mod:update 2>&1)
echo "$MOD_OUTPUT"
MOD_UPDATES=$(echo "$MOD_OUTPUT" | grep '^go: upgraded' | sed 's/go: / - /' | sort -u)
echo 'MOD_UPDATES<<EOF' >> $GITHUB_OUTPUT
echo "$MOD_UPDATES" >> "$GITHUB_OUTPUT"
echo 'EOF' >> $GITHUB_OUTPUT

- name: Create Pull Request
uses: gethinode-actions/create-pull-request@v7
with:
token: ${{ secrets.HUGO_MOD_PR }}
commit-message: 'fix: update Hugo module dependencies'
committer: GitHub <noreply@github.com>
branch: hugo-mod-dependencies
delete-branch: true
title: 'Update Hugo module dependencies'
body: |
This PR is auto-generated by [create-pull-request][1].

Changes to go.mod:

${{ steps.mod-updates.outputs.MOD_UPDATES }}

[1]: https://github.com/peter-evans/create-pull-request
labels: dependencies
add-paths: |
go.mod
go.sum
**/go.mod
**/go.sum
3 changes: 2 additions & 1 deletion assets/js/modules/flexsearch/flexsearch.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Source:
function initIndex() {
// https://discourse.gohugo.io/t/range-length-or-last-element/3803/2
// Note: pages without a title (such as browserconfig.xml) are excluded
{{ $list := where site.RegularPages "Title" "!=" "" }}
{{ $sections := where site.Sections "Title" "!=" "" }}
{{ $list := where site.RegularPages "Title" "!=" "" | append $sections }}
{{ $list = where $list ".Params.searchExclude" "!=" true }}
{{ $len := (len $list) -}}

Expand Down
2 changes: 0 additions & 2 deletions exampleSite/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
github.com/gethinode/mod-utils/v5 v5.10.0 h1:NlofAfa1YILV9pwS8vMkEwVUdrnKCoIlVwJPm3+UVGs=
github.com/gethinode/mod-utils/v5 v5.10.0/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU=
github.com/gethinode/mod-utils/v5 v5.13.0 h1:ztkE1REey94x36UdlZ7yeitpIQid/BcZQh+wtxBTSQ8=
github.com/gethinode/mod-utils/v5 v5.13.0/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU=
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/gethinode/mod-flexsearch/v4
go 1.19

require (
github.com/gethinode/mod-utils/v5 v5.13.0 // indirect
github.com/gethinode/mod-utils/v5 v5.20.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20250907103239-defb38b083f0 // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/gethinode/mod-utils/v5 v5.10.0 h1:NlofAfa1YILV9pwS8vMkEwVUdrnKCoIlVwJ
github.com/gethinode/mod-utils/v5 v5.10.0/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU=
github.com/gethinode/mod-utils/v5 v5.13.0 h1:ztkE1REey94x36UdlZ7yeitpIQid/BcZQh+wtxBTSQ8=
github.com/gethinode/mod-utils/v5 v5.13.0/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU=
github.com/gethinode/mod-utils/v5 v5.20.0 h1:K+oBv8kJ4pVj4m1HlxgJiC+DYNX4oumqS6Cvcp2C8Ho=
github.com/gethinode/mod-utils/v5 v5.20.0/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU=
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
Expand Down
2 changes: 2 additions & 0 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
translation: "Durchsuche diese Seite"
- id: ui_no_results
translation: "Keine Ergebnisse für"
- id: close
translation: "Schließen"
2 changes: 2 additions & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
translation: "Search this site"
- id: ui_no_results
translation: "No results for"
- id: close
translation: "Close"
2 changes: 2 additions & 0 deletions i18n/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
translation: "Rechercher"
- id: ui_no_results
translation: "Aucun résultat pour"
- id: close
translation: "Fermer"
2 changes: 2 additions & 0 deletions i18n/nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
translation: "Zoeken op deze site"
- id: ui_no_results
translation: "Geen resultaten voor"
- id: close
translation: "Sluiten"
2 changes: 2 additions & 0 deletions i18n/pl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
translation: "Przeszukaj tę stronę"
- id: ui_no_results
translation: "Brak wyników dla"
- id: close
translation: "Zamknij"
2 changes: 2 additions & 0 deletions i18n/zh-hans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
translation: "搜索本站"
- id: ui_no_results
translation: "没有结果"
- id: close
translation: "关闭"
2 changes: 2 additions & 0 deletions i18n/zh-hant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
translation: "搜尋本站"
- id: ui_no_results
translation: "沒有結果"
- id: close
translation: "關閉"