Skip to content

Commit 961e2ea

Browse files
authored
Update docsy to support latest hugo versions (#1268)
1 parent 62b8667 commit 961e2ea

File tree

32 files changed

+76
-72
lines changed

32 files changed

+76
-72
lines changed

.github/workflows/github-pages.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
- name: Setup Hugo
2020
uses: peaceiris/actions-hugo@v3
2121
with:
22-
hugo-version: '0.101.0'
22+
hugo-version: '0.125.6'
2323
extended: true
2424

2525
- name: Setup Node
2626
uses: actions/setup-node@v4
2727
with:
28-
node-version: '16'
28+
node-version: '20'
2929

3030
- run: npm ci
3131
- run: hugo --gc --minify

.github/workflows/preview-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
- name: Setup Hugo
1919
uses: peaceiris/actions-hugo@v3
2020
with:
21-
hugo-version: '0.101.0'
21+
hugo-version: '0.125.6'
2222
extended: true
2323

2424
- name: Setup Node
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '16'
27+
node-version: '20'
2828

2929
- name: Install and Build
3030
run: |

assets/scss/_styles_project.scss

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ body > header {
2929

3030
& .td-navbar {
3131
background: linear-gradient(77.63deg, #12123E 23.04%, #12123E 23.05%, #3E3174 122.36%);
32+
padding: 0.5rem 1rem;
3233

3334
.td-navbar-nav-scroll {
3435
margin-top: 0 !important;
@@ -212,6 +213,9 @@ footer.footer-localstack {
212213
color: white;
213214
}
214215
}
216+
& a {
217+
color: $gray-500;
218+
}
215219

216220
& hr {
217221
margin-top: 0.5rem;
@@ -220,6 +224,7 @@ footer.footer-localstack {
220224
}
221225

222226
.taxonomy-terms-cloud {
227+
display: none;
223228

224229
.taxonomy-title {
225230
font-weight: 600;

config.toml

+14-14
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ category = "categories"
2323
persistence = "persistence"
2424

2525
[params.taxonomy]
26-
# set taxonomyCloud = [] to hide taxonomy clouds
27-
taxonomyCloud = []
28-
29-
# If used, must have same length as taxonomyCloud
30-
taxonomyCloudTitle = ["Tag Cloud", "Categories"]
31-
32-
# set taxonomyPageHeader = [] to hide taxonomies on the page headers
33-
taxonomyPageHeader = ["tags", "persistence"]
34-
26+
taxonomyCloud = [] # set taxonomyCloud = [] to hide taxonomy clouds
27+
taxonomyCloudTitle = [] # if used, must have same length as taxonomyCloud
28+
taxonomyPageHeader = ["tags", "categories", "persistence"] # set taxonomyPageHeader = [] to hide taxonomies on the page headers
3529

3630
# Highlighting config
3731
pygmentsCodeFences = true
@@ -62,10 +56,11 @@ id = "UA-101988473-1"
6256
[languages]
6357
[languages.en]
6458
title = "Docs"
65-
description = "LocalStack Documentation"
6659
languageName ="English"
6760
# Weight used for sorting.
6861
weight = 1
62+
[languages.en.params]
63+
description = "LocalStack Documentation"
6964

7065
[markup]
7166
[markup.goldmark]
@@ -126,15 +121,20 @@ github_branch= "main"
126121
# Google Custom Search Engine ID. Remove or comment out to disable search.
127122
# gcs_engine_id = "d72aa9b2712488cc3"
128123

129-
# Enable Algolia DocSearch
130-
algolia_docsearch = true
131-
132124
# Enable Lunr.js offline search
133125
offlineSearch = false
134126

135127
# Enable syntax highlighting and copy buttons on code blocks with Prism
136128
prism_syntax_highlighting = false
137129

130+
disable_click2copy_chroma = true
131+
132+
# Enable Algolia DocSearch
133+
[params.search.algolia]
134+
appId = "XBW1JU7CW5"
135+
apiKey = "6b0341e2f50196d328d088dbb5cd6166"
136+
indexName = "localstack"
137+
138138
# User interface configuration
139139
[params.ui]
140140
# Set the title of the Table of Contents on the right side of the article page
@@ -236,7 +236,7 @@ latest_version = "3.4.0"
236236
[module]
237237
[module.hugoVersion]
238238
extended = true
239-
min = "0.75.0"
239+
min = "0.125.4"
240240
[[module.imports]]
241241
path = "github.com/google/docsy"
242242
disable = false

content/en/getting-started/installation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ If you want to manually manage your Docker container, it's usually a good idea t
238238
You can start LocalStack with [Docker Compose](https://docs.docker.com/compose/) by configuring a `docker-compose.yml` file.
239239
Currently, `docker-compose` version 1.9.0+ is supported.
240240

241-
{{< tabpane >}}
241+
{{< tabpane lang="yml" >}}
242242
{{< tab header="Community" lang="yml" >}}
243243
version: "3.8"
244244

@@ -328,7 +328,7 @@ If it does not report an error (but shows information on your Docker system), yo
328328

329329
You can start the Docker container simply by executing the following `docker run` command:
330330

331-
{{< tabpane >}}
331+
{{< tabpane lang="shell" >}}
332332
{{< tab header="Community" lang="shell" >}}
333333
docker run \
334334
--rm -it \

content/en/getting-started/quickstart/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ $ awslocal lambda create-function-url-config \
186186

187187
#### Build the Image Resizer Lambda
188188

189-
{{< tabpane >}}
189+
{{< tabpane lang="shell" >}}
190190
{{< tab header="macOS" lang="shell" >}}
191191
cd lambdas/resize
192192
rm -rf libs lambda.zip

content/en/references/custom-tls-certificates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ If your certificate file ends with `.pem`, you can rename it to end in `.crt`.
6060

6161
LocalStack now needs to be configured to use this custom image. The workflow is different depending on how you start localstack.
6262

63-
{{< tabpane >}}
63+
{{< tabpane lang="bash">}}
6464
{{< tab header="CLI" lang="bash" >}}
6565
IMAGE_NAME=<image name> localstack start
6666
{{< /tab >}}

content/en/references/network-troubleshooting/endpoint-url/_index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To enable access to the LocalStack instance, it's advisable to start LocalStack
3535
This allows the code running inside the container to access the LocalStack instance using its hostname.
3636
For example:
3737

38-
{{<tabpane>}}
38+
{{<tabpane lang="bash">}}
3939
{{<tab header="CLI" lang="bash">}}
4040
# create the network
4141
docker network create my-network
@@ -87,7 +87,7 @@ To configure your application container:
8787
* either determine your LocalStack container IP, or configure your LocalStack container to have a fixed known IP address;
8888
* set the DNS server of your application container to the IP address of the LocalStack container.
8989

90-
{{% tabpane %}}
90+
{{% tabpane lang="bash" %}}
9191
{{< tab header="CLI" lang="bash" >}}
9292
# start localstack
9393
localstack start -d --network ls
@@ -162,7 +162,7 @@ To facilitate access to LocalStack from within the container, it's recommended t
162162
Doing so enables the containerized code to connect to the LocalStack instance using its hostname.
163163
For instance:
164164

165-
{{<tabpane>}}
165+
{{<tabpane lang="bash">}}
166166
{{<tab header="CLI" lang="bash">}}
167167
# create the network
168168
docker network create my-network
@@ -214,7 +214,7 @@ Please update your LocalStack container and see the [instructions]({{< ref "#fro
214214

215215
LocalStack must listen to the address of the host, or `0.0.0.0`.
216216

217-
{{<tabpane>}}
217+
{{<tabpane lang="bash">}}
218218
{{<tab header="CLI" lang="bash">}}
219219
GATEWAY_LISTEN="0.0.0.0" localstack start
220220
{{</tab>}}

content/en/user-guide/aws/athena/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ s3://mybucket/prefix/temp/
209209
You can configure the Athena service in LocalStack with various clients, such as [PyAthena](https://github.com/laughingman7743/PyAthena/), [awswrangler](https://github.com/aws/aws-sdk-pandas), among others!
210210
Here are small snippets to get you started:
211211

212-
{{< tabpane >}}
212+
{{< tabpane lang="python" >}}
213213
{{< tab header="PyAthena" lang="python" >}}
214214
from pyathena import connect
215215

content/en/user-guide/aws/lambda/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ In the old Lambda provider, you could create a function with any arbitrary strin
5959

6060
To invoke the Lambda function, you can use the [`Invoke` API](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html). Run the following command to invoke the function:
6161

62-
{{< tabpane text=true persistLang=false >}}
62+
{{< tabpane text=true persist=false >}}
6363
{{% tab header="AWS CLI v1" lang="shell" %}}
6464
{{< command >}}
6565
$ awslocal lambda invoke --function-name localstack-lambda-url-example \
@@ -266,7 +266,7 @@ In the old Lambda provider, Lambda functions were executed within the LocalStack
266266

267267
If you encounter the following error message, you may be using the local executor mode:
268268

269-
{{< tabpane >}}
269+
{{< tabpane lang="bash" >}}
270270
{{< tab header="LocalStack Logs" lang="shell" >}}
271271
Lambda 'arn:aws:lambda:us-east-1:000000000000:function:my-function:$LATEST' changed to failed. Reason: Docker not available
272272
...

content/en/user-guide/aws/s3/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ $ docker pull localstack/localstack:s3-latest
227227

228228
The S3 Docker image only supports the S3 APIs and does not include other services like Lambda, DynamoDB, etc. You can run the S3 Docker image using any of the following commands:
229229

230-
{{< tabpane >}}
230+
{{< tabpane lang="shell" >}}
231231
{{< tab header="LocalStack CLI" lang="shell" >}}
232232
IMAGE_NAME=localstack/localstack:s3-latest localstack start
233233
{{< /tab >}}

content/en/user-guide/integrations/copilot/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Using `copilotlocal` instead of `copilot` in your command line therefore ensures
1717

1818
### Download / Installation
1919

20-
{{< tabpane >}}
20+
{{< tabpane lang="bash" >}}
2121
{{< tab header="Linux AMD64" lang="bash">}}
2222
curl -Lo copilotlocal https://github.com/localstack/copilot-cli/raw/localstack-builds/build/linux-amd64/copilotlocal && chmod +x copilotlocal
2323
# if you want to have copilotlocal in your $PATH, move the executable e.g. to /usr/local/bin/

content/en/user-guide/integrations/sdks/go/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Go SDK has two major versions, each with their own way of specifying the Loc
2222
Here is an example of how to create an S3 Client from a Session with the endpoint set to LocalStack.
2323
Full examples for both SDK versions can be found [in our samples repository](https://github.com/localstack/localstack-aws-sdk-examples/tree/main/go).
2424

25-
{{< tabpane >}}
25+
{{< tabpane lang="golang" >}}
2626
{{< tab header="aws-go-sdk" lang="golang" >}}
2727
package main
2828

content/en/user-guide/integrations/sdks/java/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The client can be used to upload a file to an existing bucket and then retrieve
3636

3737
#### Configuring the S3 Client
3838

39-
{{< tabpane >}}
39+
{{< tabpane lang="java" >}}
4040
{{< tab header="v1" lang="java" >}}
4141

4242
// Credentials that can be replaced with real AWS values. (To be handled properly and not hardcoded.)
@@ -77,7 +77,7 @@ S3Client s3Client = S3Client.builder()
7777

7878
#### Interacting with S3
7979

80-
{{< tabpane >}}
80+
{{< tabpane lang="java" >}}
8181
{{< tab header="v1" lang="java" >}}
8282

8383
// Existing bucket name.
@@ -153,7 +153,7 @@ cater to the application's needs. The full list of supported converters can be f
153153

154154
#### Configuring the DynamoDB Client
155155

156-
{{< tabpane >}}
156+
{{< tabpane lang="java" >}}
157157
{{< tab header="v1" lang="java">}}
158158

159159
// Credentials that can be replaced with real AWS values. (To be handled properly and not hardcoded.)
@@ -207,7 +207,7 @@ DynamoDbEnhancedClient enhancedClient = DynamoDbEnhancedClient.builder()
207207

208208
#### Interacting with DynamoDB
209209

210-
{{< tabpane >}}
210+
{{< tabpane lang="java" >}}
211211

212212
{{< tab header="v1" lang="java">}}
213213

content/en/user-guide/integrations/sdks/javascript/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The JavaScript SDK has two major versions, each with their own way of specifying
2121

2222
Here is an example of how to create a Lambda client and an S3 client with the endpoint set to LocalStack.
2323

24-
{{< tabpane >}}
24+
{{< tabpane lang="javascript" >}}
2525
{{< tab header="aws-sdk-js" lang="javascript" >}}
2626

2727
const AWS = require('aws-sdk');

content/en/user-guide/lambda-tools/debugging/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ $ awslocal lambda create-function --function-name my-cool-local-function \
184184

185185
We can quickly verify that it works by invoking it with a simple payload:
186186

187-
{{< tabpane text=true persistLang=false >}}
187+
{{< tabpane text=true persist=false >}}
188188
{{% tab header="AWS CLI v1" lang="shell" %}}
189189
{{< command >}}
190190
$ awslocal lambda invoke --function-name my-cool-local-function \
@@ -394,7 +394,7 @@ Now to debug your lambda function, click on the `Debug` icon with
394394
`Attach to Remote Node.js` configuration selected, and then invoke your
395395
lambda function:
396396

397-
{{< tabpane text=true persistLang=false >}}
397+
{{< tabpane text=true persist=false >}}
398398
{{% tab header="AWS CLI v1" lang="shell" %}}
399399
{{< command >}}
400400
$ awslocal lambda invoke --function-name func1 \

content/en/user-guide/lambda-tools/hot-reloading/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ You can also check out some of our [Deployment Configuration Examples](#deployme
121121

122122
We can also quickly make sure that it works by invoking it with a simple payload:
123123

124-
{{< tabpane text=true persistLang=false >}}
124+
{{< tabpane text=true persist=false >}}
125125
{{% tab header="AWS CLI v1" lang="shell" %}}
126126
{{< command >}}
127127
$ awslocal lambda invoke --function-name my-cool-local-function \
@@ -308,7 +308,7 @@ $ awslocal lambda create-function \
308308

309309
You can quickly make sure that it works by invoking it with a simple payload:
310310

311-
{{< tabpane text=true persistLang=false >}}
311+
{{< tabpane text=true persist=false >}}
312312
{{% tab header="AWS CLI v1" lang="shell" %}}
313313
{{< command >}}
314314
$ awslocal lambda invoke \

content/en/user-guide/state-management/cloud-pods/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ To automatically load a Cloud Pod at startup, utilize the `AUTO_LOAD_POD` [confi
250250

251251
`AUTO_LOAD_POD` can accept multiple Cloud Pod names separated by commas. To autoload multiple Cloud Pods, such as `foo-pod` and `bar-pod`, use: `AUTO_LOAD_POD=foo-pod,bar-pod`. The order of Cloud Pods in `AUTO_LOAD_POD` dictates their loading sequence. When autoloading multiple Cloud Pods, later pods might overwrite the state of earlier ones if they share the same service, account, and region.
252252

253-
{{< tabpane >}}
253+
{{< tabpane lang="bash" >}}
254254
{{< tab header="LocalStack CLI" lang="bash" >}}
255255
AUTO_LOAD_POD=foo-pod localstack start
256256
{{< /tab >}}

content/en/user-guide/state-management/persistence/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LocalStack's Persistence mechanism enables the saving and restoration of the ent
1717

1818
To start snapshot-based persistence, launch LocalStack with the configuration option `PERSISTENCE=1`. This setting instructs LocalStack to save all AWS resources and their respective application states into the LocalStack Volume Directory. Upon restarting LocalStack, you'll be able to resume your activities exactly where you left off.
1919

20-
{{< tabpane >}}
20+
{{< tabpane lang="bash" >}}
2121
{{< tab header="LocalStack CLI" lang="bash" >}}
2222
LOCALSTACK_AUTH_TOKEN=... PERSISTENCE=1 localstack start
2323
{{< /tab >}}

go.mod

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module github.com/localstack/docs
22

3-
go 1.17
3+
go 1.21
44

5-
require github.com/google/docsy v0.6.0 // indirect
5+
require (
6+
github.com/google/docsy v0.10.0 // indirect
7+
github.com/google/docsy/dependencies v0.7.2 // indirect
8+
)

go.sum

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
2-
github.com/google/docsy v0.6.0 h1:43bVF18t2JihAamelQjjGzx1vO2ljCilVrBgetCA8oI=
3-
github.com/google/docsy v0.6.0/go.mod h1:VKKLqD8PQ7AglJc98yBorATfW7GrNVsn0kGXVYF6G+M=
4-
github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE=
5-
github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
1+
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
2+
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
3+
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
4+
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
5+
github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=
6+
github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
7+
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
8+
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=

layouts/academy/list.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{ partial "toc.html" . }}
1919
{{ partial "taxonomy_terms_clouds.html" . }}
2020
</aside>
21-
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
21+
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
2222
{{ partial "version-banner.html" . }}
2323
<div class="page-content">
2424
<h1 class="mt-2">{{ .Title }}</h1>

layouts/academy/single.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{ partial "toc.html" . }}
1919
{{ partial "taxonomy_terms_clouds.html" . }}
2020
</aside>
21-
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
21+
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
2222
{{ partial "version-banner.html" . }}
2323
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
2424
<div class="page-content">

layouts/applications/list.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
1717
{{ partial "developer-hub/filters-sidebar.html" . }}
1818
</aside>
19-
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
19+
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
2020
{{ partial "version-banner.html" . }}
2121
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
2222
<div class="td-content">

0 commit comments

Comments
 (0)