Compare commits

...

4 commits

Author SHA1 Message Date
vimux
f3196ea0aa
CI: Upgrade GitHub Actions
Some checks failed
Test / lint (20.x) (push) Failing after 1m30s
Test / test-hugo (0.54.0) (push) Failing after 4s
Test / test-hugo (0.58.2) (push) Failing after 4s
Test / test-hugo (0.59.1) (push) Failing after 3s
Test / test-hugo (0.60.1) (push) Failing after 3s
Test / test-hugo (0.76.5) (push) Failing after 3s
Test / test-hugo (0.86.1) (push) Failing after 4s
Test / test-hugo (0.93.3) (push) Failing after 3s
Test / test-hugo (latest) (push) Failing after 3s
* Bump actions/checkout@v3 to v4
* Bump actions/setup-node@v3 to v4
* Bump peaceiris/actions-hugo@v2 to v3
2024-09-06 09:07:57 -04:00
Vimux
e9959c2118
Update README.md: fix demo URL (#98)
Redirection from *.netlify.com to *.netlify.app no longer works, time to change the URL.
2024-08-27 10:45:43 -04:00
Vimux
fc5680d3df
Fix .Site.IsServer error in Hugo >= 0.132.0 [2] (#97)
The second part of the fix, fixes the comments.html. The `.Site.IsServer` no longer works since Hugo v0.132.0. Use `hugo.IsServer` since Hugo v0.120.0.

Related 8b4c646cb0
See #94
2024-08-19 09:38:09 -04:00
Vimux
8b4c646cb0
Fix .Site.IsServer error in Hugo >= 0.132.0 (#96)
The `.Site.IsServer` no longer works since Hugo v0.132.0. Use `hugo.IsServer` since Hugo v0.120.0

Fixes #94
2024-08-15 14:29:44 -04:00
4 changed files with 20 additions and 8 deletions

View file

@ -19,8 +19,8 @@ jobs:
- '20.x' - '20.x'
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
@ -47,11 +47,11 @@ jobs:
fail-fast: true fail-fast: true
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
# https://github.com/peaceiris/actions-hugo (community action) # https://github.com/peaceiris/actions-hugo (community action)
- name: Run Hugo ${{ matrix.hugo }} - name: Run Hugo ${{ matrix.hugo }}
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v3
with: with:
hugo-version: ${{ matrix.hugo }} hugo-version: ${{ matrix.hugo }}
# extended: true # extended: true

View file

@ -2,7 +2,7 @@
**Binario** is a responsive card-based & code-light Hugo theme. **Binario** is a responsive card-based & code-light Hugo theme.
**[Demo](https://binario.netlify.com/)** **[Demo](https://binario.netlify.app/)**
![Binario theme screenshot](https://raw.githubusercontent.com/vimux/binario/master/images/tn.png) ![Binario theme screenshot](https://raw.githubusercontent.com/vimux/binario/master/images/tn.png)

View file

@ -35,7 +35,13 @@
{{- with ((.Site.GetPage "home").OutputFormats.Get "manifest") }} {{- with ((.Site.GetPage "home").OutputFormats.Get "manifest") }}
<link rel="manifest" href="{{ "manifest.json" | relURL }}"> <link rel="manifest" href="{{ "manifest.json" | relURL }}">
{{- end }} {{- end }}
{{- if not .Site.IsServer }} {{- $server := "" }}
{{- if ge (int (index (split hugo.Version ".") 1)) "120" }}
{{- $server = hugo.IsServer }}
{{- else }}
{{- $server = .Site.IsServer }}
{{- end }}
{{- if not $server -}}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{- end }} {{- end }}
</head> </head>

View file

@ -1,5 +1,11 @@
{{ if and (.Site.Config.Services.Disqus.Shortname) (.Param "comments") (not .Site.IsServer) }} {{- $server := "" }}
{{- if ge (int (index (split hugo.Version ".") 1)) "120" }}
{{- $server = hugo.IsServer }}
{{- else }}
{{- $server = .Site.IsServer }}
{{- end }}
{{- if and (.Site.Config.Services.Disqus.Shortname) (.Param "comments") (not $server) }}
<section class="comments block"> <section class="comments block">
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}
</section> </section>
{{ end }} {{- end }}