Skip to content

Commit

Permalink
Update build, hugo and nginx. (#48)
Browse files Browse the repository at this point in the history
* build: Update GitHub actions.

* docker: Use nginx 1.26 (latest stable)

* build: Update to hugo 0.134.0

- Add a trailing slash to baseURL as expected by the new hugo version.
- Use the newer css.Sass instead of deprecated resources.ToCSS
- Use pagination.pagerSize instead of deprecated paginate
  • Loading branch information
jholdstock authored Sep 5, 2024
1 parent 35b78ef commit 3a2cd0e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build
run: docker build -t decred/dcrblog:$(date +%s) .
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# builder image
FROM alpine:latest

ENV HUGO_VERSION 0.110.0
ENV HUGO_VERSION 0.134.0

LABEL description="gohugo build"
LABEL version="1.0"
Expand All @@ -25,7 +25,7 @@ RUN rm -rf public resources
RUN hugo --buildFuture

# Serve image (stable nginx version)
FROM nginx:1.22
FROM nginx:1.26

LABEL description="dcrblog server"
LABEL version="1.0"
Expand Down
2 changes: 1 addition & 1 deletion bin/watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ hugo server \
--buildFuture \
--buildDrafts \
--disableFastRender \
--baseURL http://localhost:1313
--baseURL http://localhost:1313/
5 changes: 3 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ languageCode = "en-us"
title = "Decred Blog"
theme = "decred-blog"

paginate = 5

copyright = "[DECRED BLOG](https://blog.decred.org/) ALL RIGHTS RESERVED."

# disablePathToLower is necessary to maintain backwards compatability with old blog links
disablePathToLower = true

[pagination]
pagerSize = 5

[taxonomies]
author = "authors"
tag = "tags"
Expand Down
2 changes: 1 addition & 1 deletion themes/decred-blog/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>

{{ "<!-- combined, minified CSS -->" | safeHTML }}
{{ $style := resources.Get "sass/main.scss" | toCSS }}
{{ $style := resources.Get "sass/main.scss" | css.Sass }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">

{{ $fonts := resources.Get "css/fonts.css" }}
Expand Down

0 comments on commit 3a2cd0e

Please sign in to comment.