Skip to content

Commit

Permalink
ERROR deprecated: .Site.IsServer was deprecated in Hugo v0.120.0 and …
Browse files Browse the repository at this point in the history
…will be removed in Hugo 0.135.0. Use hugo.IsServer instead.
  • Loading branch information
bkleinen committed Sep 14, 2024
1 parent 2384fb9 commit 217e1e7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hugo/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h4>Thesis</h4>
</div>


{{ if (and false (or (.Site.IsServer) (not (eq hugo.Environment "production")))) }}
{{ if (and false (or (hugo.IsServer) (not (eq hugo.Environment "production")))) }}
<h3>Complete Sitemap:</h3>
<ul>
{{- partial "sitemap.html" .Site.Home -}}
Expand Down
4 changes: 2 additions & 2 deletions hugo/themes/greenpage/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</div>

</small>
{{ if (or (.Site.IsServer) (in (slice "staging" "development" "debug") hugo.Environment )) }}
{{ if (or (hugo.IsServer) (in (slice "staging" "development" "debug") hugo.Environment )) }}
<div><hr><small> <h7>Debug Information</h7><ul>
{{ partial "debug.html" . }}
</ul></small><hr></div>
Expand All @@ -136,7 +136,7 @@
{{ $tableSorter := resources.Get "js/sorttables.js" }}
{{ $js_resources := slice $tableSorter $bootstrap }}

{{ if .Site.IsServer }}
{{ if hugo.IsServer }}
{{ range $js_resources }}
<script type="text/javascript" src="{{ .Permalink }}"></script>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion hugo/themes/greenpage/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="theme-color" content="#1A94D2" />


{{ if .Site.IsServer }}
{{ if hugo.IsServer }}
{{ $options := (dict "targetPath" "css/styles-dev.css" "outputStyle" "expanded") }}
{{ $style := resources.Get "scss/main.scss" | toCSS $options }}
<link rel="stylesheet" href="{{ $style.Permalink }}" media="screen">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</div>

{{ else }}
{{ $showNavItem := (or $.Site.IsServer (not (eq .Identifier "debug" ) ) ) }}
{{ $showNavItem := (or hugo.IsServer (not (eq .Identifier "debug" ) ) ) }}
{{ if $showNavItem }}
<a class="nav-link {{if or ($currentPage.IsMenuCurrent "main" . ) ($currentPage.HasMenuCurrent "main" . ) }}active{{ end }}" href="{{ .URL }}">
{{ if (eq .Identifier "debug" ) }}<div class="alert alert-warning" role="alert">
Expand Down

0 comments on commit 217e1e7

Please sign in to comment.