Skip to content

Commit fba85fb

Browse files
pawelprosfitzthum
authored andcommitted
hugo: updated to newest version
- Updated hugo/docsy version - Replaced outdated docker version with official image Signed-off-by: Pawel Proskurnicki <pawel.proskurnicki@intel.com>
1 parent 8d869a4 commit fba85fb

File tree

8 files changed

+74
-25
lines changed

8 files changed

+74
-25
lines changed

CONTRIBUTING.md

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,67 @@ This repository follows the usual Github workflow of pull request to make change
44

55
## Local Development
66

7-
### Using Hugo
7+
### Prerequisites
88

99
- Make sure You have installed:
1010
- GO [here](https://go.dev/doc/install) and include it in PATH
1111
- NodeJS [here](https://nodejs.org/en/download/package-manager) and include it in PATH
1212
- PostCSS plugin [here](https://gohugo.io/functions/css/postcss/#setup)
1313
- Install Hugo by following the instructions [here](https://gohugo.io/installation/).
1414

15-
- Start a local server from the root of this repository:
16-
```bash
17-
hugo server
18-
```
19-
20-
### Using Docker Compose
15+
> [!NOTE]
16+
> Currently recommended versions are:
17+
> - hugo: **0.155.0+**
18+
> - docsy: **0.13.0+**
2119
22-
- Install docker-compose by following the instructions [here](https://docs.docker.com/compose/install/).
20+
### Using Hugo
2321

24-
- Start a local server from the root of this repository:
22+
Start a local server from the root of this repository:
2523

2624
```bash
27-
docker-compose up -d
25+
hugo server
2826
```
2927

30-
Now go to [http://localhost:1313](http://localhost:1313) on your browser. Once you make any changes to the code the changes are compiled in real-time and you can see those in the browser.
28+
### Using Docker
29+
30+
1. Create a cache directory for Hugo:
31+
```bash
32+
mkdir -p $HOME/.cache/hugo_cache
33+
```
34+
35+
2. Start a local server from the root of this repository:
36+
```bash
37+
docker run --rm -v .:/site -v $HOME/.cache/hugo_cache:/cache -u $(id -u):$(id -g) -w /site -p 1313:1313 ghcr.io/gohugoio/hugo:latest server --bind="0.0.0.0"
38+
```
39+
40+
### Using Docker Compose
41+
42+
1. Install docker-compose by following the instructions [here](https://docs.docker.com/compose/install/).
43+
44+
2. Export variables for user and group id:
45+
46+
```bash
47+
export UID=$(id -u)
48+
export GID=$(id -g)
49+
```
50+
51+
3. Create a cache directory for Hugo:
52+
53+
To prevent ownership and permission problems, create the Hugo cache directory and ignore the error if the directory
54+
already exists:
55+
56+
```bash
57+
mkdir -p $HOME/.cache/hugo_cache
58+
```
59+
60+
4. Start a local server from the root of this repository:
61+
62+
```bash
63+
docker-compose up -d
64+
```
65+
66+
Now go to [http://localhost:1313](http://localhost:1313) on your browser. Once you make any changes to the code the
67+
changes are compiled in real-time and you can see those in the browser.
3168

3269
## Writing a blog
3370

Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
version: "3.3"
2-
31
services:
4-
52
site:
6-
image: docsy/docsy-example
3+
image: ghcr.io/gohugoio/hugo:v0.155.0
74
build:
85
context: .
9-
command: server
6+
command: server --bind=0.0.0.0
7+
environment:
8+
HTTP_PROXY: "${HTTP_PROXY}"
9+
HTTPS_PROXY: "${HTTPS_PROXY}"
10+
NO_PROXY: "${NO_PROXY}"
11+
user: "${UID}:${GID}"
1012
ports:
1113
- "1313:1313"
1214
volumes:
1315
- .:/src
16+
- ${HOME}/.cache/hugo_cache:/cache
17+
working_dir: /src

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/confidential-containers/confidentialcontainers.org
33
go 1.21
44

55
require (
6-
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7 // indirect
7-
github.com/google/docsy v0.10.0 // indirect
6+
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3 // indirect
7+
github.com/google/docsy v0.13.0 // indirect
88
github.com/google/docsy/dependencies v0.7.2 // indirect
9-
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
9+
github.com/twbs/bootstrap v5.3.8+incompatible // indirect
1010
)

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536 h1:LFS9Lp
33
github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
44
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7 h1:2aWEKCRLqQ9nPyXaz4/IYtRrDr3PzEiX0DUSUr2/EDs=
55
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
6+
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3 h1:/iluJkJiyTAdnqrw3Yi9rH2HNHhrrtCmj8VJe7I6o3w=
7+
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
68
github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY=
79
github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc=
810
github.com/google/docsy v0.8.0 h1:RgHyKRTo8YwScMThrf01Ky2yCGpUS1hpkspwNv6szT4=
@@ -11,9 +13,13 @@ github.com/google/docsy v0.9.1 h1:+jqges1YCd+yHeuZ1BUvD8V8mEGVtPxULg5j/vaJ984=
1113
github.com/google/docsy v0.9.1/go.mod h1:saOqKEUOn07Bc0orM/JdIF3VkOanHta9LU5Y53bwN2U=
1214
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
1315
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
16+
github.com/google/docsy v0.13.0 h1:Y1oy5SmQ0ikJJsvkuefEVZMj0MTXLmVfpXbt7Ytc7rc=
17+
github.com/google/docsy v0.13.0/go.mod h1:1Fj1W1O3esZh7IBQ8XAYtxtg10udBXuGI89+LUQc1AU=
1418
github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
1519
github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=
1620
github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
1721
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
1822
github.com/twbs/bootstrap v5.3.3+incompatible h1:goFoqinzdHfkeegpFP7pvhbd0g+A3O2hbU3XCjuNrEQ=
1923
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
24+
github.com/twbs/bootstrap v5.3.8+incompatible h1:eK1fsXP7R/FWFt+sSNmmvUH9usPocf240nWVw7Dh02o=
25+
github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=

hugo.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ module:
3535
- path: github.com/google/docsy
3636
- path: github.com/google/docsy/dependencies
3737

38+
mediaTypes:
39+
font/woff:
40+
suffixes: [woff]
41+
font/woff2:
42+
suffixes: [woff2]
43+
3844
services:
3945
googleAnalytics:
4046
# Comment out the next line to disable GA tracking. Also disables the feature described in params.ui.feedback
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ template "_default/_markup/td-render-heading.html" . }}
1+
{{ partial "td/render-heading.html" . -}}

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ command = "hugo"
33
publish = "public"
44

55
[build.environment]
6-
HUGO_VERSION = "0.135.0"
6+
HUGO_VERSION = "0.146.7"

0 commit comments

Comments
 (0)