Skip to content

Commit

Permalink
Bump GitHub action workflows
Browse files Browse the repository at this point in the history
Fix npm dependencies, update outdated npm lockfile
Use docsy theme as hugo module
  • Loading branch information
deining committed Apr 28, 2024
1 parent 0f5df43 commit ad928d6
Show file tree
Hide file tree
Showing 11 changed files with 867 additions and 2,760 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12' ]
node: [ '20' ]
name: Node ${{ matrix.node }} Setup
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install node module
Expand All @@ -28,22 +28,18 @@ jobs:
npm audit fix
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.75.1'
hugo-version: '0.125.4'
extended: true

- name: Download Hugo Theme
run: |
git clone --recurse-submodules --depth 1 https://github.com/google/docsy.git themes/docsy
- name: Build
run: |
hugo --minify
echo 'gin-gonic.com' > public/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
public
resources
node_modules
.hugo_build.lock
9 changes: 9 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/gin-gonic/website

go 1.22.2

require (
github.com/google/docsy v0.9.2-0.20240426161215-e9eca0fcb3b5 // indirect
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7 // indirect
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7 h1:2aWEKCRLqQ9nPyXaz4/IYtRrDr3PzEiX0DUSUr2/EDs=
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v4.7.0+incompatible h1:3trjm7NtX5NXlju1AxSWSzedDMq2hsfH78Qtqrc8EgY=
github.com/FortAwesome/Font-Awesome v4.7.0+incompatible/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.9.1 h1:+jqges1YCd+yHeuZ1BUvD8V8mEGVtPxULg5j/vaJ984=
github.com/google/docsy v0.9.1/go.mod h1:saOqKEUOn07Bc0orM/JdIF3VkOanHta9LU5Y53bwN2U=
github.com/google/docsy v0.9.2-0.20240426161215-e9eca0fcb3b5 h1:EDs9FRTZ75agHdnMeO3HjfqJV10jKpdsM6XEARy/FsM=
github.com/google/docsy v0.9.2-0.20240426161215-e9eca0fcb3b5/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.3+incompatible h1:goFoqinzdHfkeegpFP7pvhbd0g+A3O2hbU3XCjuNrEQ=
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
58 changes: 34 additions & 24 deletions config.toml → hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ title = "Gin Web Framework"

enableRobotsTXT = true

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = "docsy"

# Will give values to .Lastmod etc.
enableGitInfo = true

Expand All @@ -16,7 +13,7 @@ defaultContentLanguageInSubdir = false
# Useful when translating.
enableMissingTranslationPlaceholders = true

disableKinds = ["RSS", "taxonomy", "taxonomyTerm"]
disableKinds = ["RSS", "taxonomy"]

# Highlighting config
pygmentsCodeFences = true
Expand All @@ -32,8 +29,6 @@ pygmentsStyle = "tango"

#disqusShortname = "gin-gonic"

googleAnalytics = "UA-42425385-2"

# Configure how URLs look like per section.
[permalinks]
blog = "/:section/:year/:month/:day/:slug/"
Expand Down Expand Up @@ -61,84 +56,93 @@ id = "UA-42425385-2"
[languages]
[languages.en]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "English"
# Weight used for sorting.
weight = 1
[languages.en.params]
description = "Gin Web Framework"

[languages.zh-cn]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "简体中文"
contentDir = "content/zh-cn"
[languages.zh-cn.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.zh-tw]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "繁體中文"
contentDir = "content/zh-tw"
[languages.zh-tw.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.ja]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "日本語"
contentDir = "content/ja"
[languages.ja.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.ko-kr]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "한국어"
contentDir = "content/ko-kr"
[languages.ko-kr.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.es]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "Español"
contentDir = "content/es"
[languages.es.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.fa]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "Persian"
contentDir = "content/fa"
[languages.fa.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.tr]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "Turkish"
contentDir = "content/tr"
[languages.tr.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.pt]
title = "Gin Web Framework"
description = "A Abstração de Web Gin"
languageName = "Português"
contentDir = "content/pt"
[languages.pt.params]
description = "A Abstração de Web Gin"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.ru]
title = "Gin Web Framework"
description = "Gin Web Framework"
languageName = "Russian"
contentDir = "content/ru"
[languages.ru.params]
description = "Gin Web Framework"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"


[markup]
[markup.goldmark]
[markup.goldmark.renderer]
Expand Down Expand Up @@ -185,12 +189,6 @@ github_branch = "master"
# Google Custom Search Engine ID. Remove or comment out to disable search.
gcs_engine_id = "005538359705255204576:q0elqbxmlfs"

# Enable Algolia DocSearch
algolia_docsearch = false

# Enable Lunr.js offline search
offlineSearch = false

# User interface configuration
[params.ui]
# Enable to show the side bar menu in its compact state.
Expand All @@ -202,7 +200,7 @@ sidebar_search_disable = true
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
navbar_logo = true
# Set to true to disable the About link in the site footer
footer_about_disable = false
footer_about_enable = true

# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
Expand Down Expand Up @@ -248,3 +246,15 @@ no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY
# icon = "fa fa-envelope"
# desc = "Discuss development issues around the project"

[module]
# Uncomment the next line to build and serve using local docsy clone declared in the named Hugo workspace:
# workspace = "docsy.work"
[module.hugoVersion]
extended = true
min = "0.110.0"
[[module.mounts]]
source = "scss"
targets = "scss"
[[module.imports]]
path = "github.com/google/docsy"
disable = false
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
{{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
{{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}">{{ T "footer_privacy_policy" }}</a></small>{{ end }}
{{ if not .Site.Params.ui.footer_about_disable }}
{{ if .Site.Params.ui.footer_about_enable }}
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
{{ end }}
</div>
Expand Down
17 changes: 0 additions & 17 deletions layouts/partials/google-analytics.html

This file was deleted.

38 changes: 0 additions & 38 deletions layouts/partials/navbar.html

This file was deleted.

17 changes: 0 additions & 17 deletions layouts/partials/scripts.html

This file was deleted.

Loading

0 comments on commit ad928d6

Please sign in to comment.