Skip to content

Commit

Permalink
Upgrade to Hugo 0.101.0 + Docsy 0.3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Vicente J. Jiménez Miras <vjjmiras@gmail.com>
  • Loading branch information
vjjmiras authored and poiana committed Aug 29, 2022
1 parent 51820d3 commit 39c0bb6
Show file tree
Hide file tree
Showing 42 changed files with 98 additions and 61 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/google/docsy
branch = 9f55cf34808d720bcfff9398c9f9bb7fd8fce4ec
8 changes: 4 additions & 4 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ sidebar_menu_compact = false
# Set to true to disable breadcrumb navigation.
breadcrumb_disable = false
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
sidebar_search_disable = false
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

Expand Down Expand Up @@ -296,15 +296,15 @@ languageName ="English"
weight = 1
languagedirection = "ltr"

[languages.zh]
[languages.zh-cn]
title = "Falco"
description = "运行时安全"
languageName = "中文 Chinese"
weight = 2
contentDir = "content/zh"
contentDir = "content/zh-cn"
languagedirection = "ltr"

[languages.zh.params]
[languages.zh-cn.params]
time_format_blog = "2006.01.02"
language_alternatives = ["en"]

Expand Down
5 changes: 5 additions & 0 deletions content/ja/training/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Falco Training
description: Learn about Falco with free training
weight: 1
---
5 changes: 5 additions & 0 deletions content/ko/training/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Falco Training
description: Learn about Falco with free training
weight: 1
---
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions content/ml/training/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Falco Training
description: Learn about Falco with free training
weight: 1
---
File renamed without changes.
2 changes: 2 additions & 0 deletions content/zh/_index.md → content/zh-cn/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Falco
ailases:
- /zh/
---

{{< blocks/section >}}
Expand Down
3 changes: 3 additions & 0 deletions content/zh-cn/blog/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: The Falco blog
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions content/zh-cn/community/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: The Falco Community
---
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions content/zh-cn/training/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Falco Training
description: Learn about Falco with free training
weight: 1
---
5 changes: 5 additions & 0 deletions content/zh-cn/videos/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Videos
description:
weight: 9
---
File renamed without changes.
4 changes: 2 additions & 2 deletions layouts/blog/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
{{ partial "sidebar.html" . }}
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "toc.html" . }}
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
Expand All @@ -31,4 +31,4 @@
</div>
{{ partial "scripts.html" . }}
</body>
</html>
</html>
54 changes: 27 additions & 27 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@
{{ end }}

<div class="row">
<div class="col-12">
{{- if .Pages -}}
{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006")}}
{{ range $pag.PageGroups }}
<h2>{{ T "post_posts_in" }} {{ .Key }}</h2>
<ul class="list-unstyled mt-4">
{{ range .Pages }}
<li class="media mb-4">
<div class="media-body">
<h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h5>
<p class="mb-2 mb-md-3"><small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "post_byline_by"}} {{ .Params.author }}</small></p>
{{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-left mr-3 pt-1 d-none d-md-block") }}
<p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p>
<p class="pt-0"><a href="{{ .RelPermalink }}">{{ T "ui_read_more"}}</a></p>
</div>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</div>
<div class="col-12">
{{- if .Pages -}}
{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006")}}
{{ range $pag.PageGroups }}
<h2>{{ T "post_posts_in" }} {{ .Key }}</h2>
<ul class="list-unstyled mt-4">
{{ range .Pages }}
<li class="media mb-4">
<div class="media-body">
<h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h5>
<p class="mb-2 mb-md-3"><small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "post_byline_by"}} {{ .Params.author }}</small></p>
{{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-left mr-3 pt-1 d-none d-md-block") }}
<p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p>
<p class="pt-0"><a href="{{ .RelPermalink }}">{{ T "ui_read_more"}}</a></p>
</div>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</div>
</div>
<div class="row pl-2 pt-2">
<div class="col">
{{ if .Pages }}
{{ template "_internal/pagination.html" . }}
{{ end }}
</div>
<div class="col">
{{ if .Pages }}
{{ template "_internal/pagination.html" . }}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
Empty file added layouts/index.headers
Empty file.
File renamed without changes.
55 changes: 29 additions & 26 deletions layouts/partials/page-meta-links.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
{{ if .Path }}
{{ $pathFormatted := replace .Path "\\" "/" }}
{{ $gh_repo := ($.Param "github_repo") }}
{{ $gh_subdir := ($.Param "github_subdir") }}
{{ $gh_project_repo := ($.Param "github_project_repo") }}
{{ $gh_branch := (default "master" ($.Param "github_branch")) }}
{{ if $gh_repo }}
{{ if .File }}
{{ $pathFormatted := replace .File.Path "\\" "/" -}}
{{ $gh_repo := ($.Param "github_repo") -}}
{{ $gh_subdir := ($.Param "github_subdir") -}}
{{ $gh_project_repo := ($.Param "github_project_repo") -}}
{{ $gh_branch := (default "master" ($.Param "github_branch")) -}}

{{ if $gh_repo -}}
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
{{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted }}
{{ if and ($gh_subdir) (.Site.Language.Lang) }}
{{ $gh_repo_path = printf "%s/%s/content/%s/%s" $gh_branch $gh_subdir ($.Site.Language.Lang) $pathFormatted }}
{{ else if .Site.Language.Lang }}
{{ $gh_repo_path = printf "%s/content/%s/%s" $gh_branch ($.Site.Language.Lang) $pathFormatted }}
{{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted -}}
{{ if and ($gh_subdir) (.Site.Language.Lang) -}}
{{ $gh_repo_path = printf "%s/%s/content/%s/%s" $gh_branch $gh_subdir ($.Site.Language.Lang) $pathFormatted -}}
{{ else if .Site.Language.Lang -}}
{{ $gh_repo_path = printf "%s/content/%s/%s" $gh_branch ($.Site.Language.Lang) $pathFormatted -}}
{{ else if $gh_subdir }}
{{ $gh_repo_path = printf "%s/%s/content/%s" $gh_branch $gh_subdir $pathFormatted }}
{{ end }}
{{ $editURL := printf "%s/edit/%s" $gh_repo $gh_repo_path }}
{{ $createURL := printf "%s/edit/%s" $gh_repo $gh_repo_path }}
{{ $issuesURL := printf "%s/issues/new?labels=%s&template=%s&title=%s" $gh_repo "kind/content" "content-request.md" (htmlEscape $.Title )}}
{{ $newPageStub := resources.Get "stubs/new-page-template.md" }}
{{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL }}
{{ $newPageURL := printf "%s/new/%s?%s" $gh_repo $gh_repo_path $newPageQS }}
{{ $gh_repo_path = printf "%s/%s/content/%s" $gh_branch $gh_subdir $pathFormatted -}}
{{ end -}}
{{ $editURL := printf "%s/edit/%s" $gh_repo $gh_repo_path -}}
{{ $createURL := printf "%s/edit/%s" $gh_repo $gh_repo_path -}}
{{ $issuesURL := printf "%s/issues/new?labels=%s&template=%s&title=%s" $gh_repo "kind/content" "content-request.md" (htmlEscape $.Title ) -}}
{{ $newPageStub := resources.Get "stubs/new-page-template.md" -}}
{{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
{{ $newPageURL := printf "%s/new/%s?%s" $gh_repo $gh_repo_path $newPageQS -}}

<a href="{{ $editURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
<a href="{{ $newPageURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_create_child_page" }}</a>
<a href="{{ $issuesURL }}" target="_blank"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
{{ if $gh_project_repo }}

{{ if $gh_project_repo -}}
{{ $project_issueURL := printf "%s/issues/new/choose" $gh_project_repo }}
<a href="{{ $project_issueURL }}" target="_blank"><i class="fas fa-tasks fa-fw"></i> {{ T "post_create_project_issue" }}</a>
{{ end }}
{{ end -}}

{{ with .CurrentSection.AlternativeOutputFormats.Get "print" }}
{{ with .CurrentSection.AlternativeOutputFormats.Get "print" -}}
<a id="print" href="{{ .Permalink | safeURL }}"><i class="fa fa-print fa-fw"></i> {{ T "print_entire_section" }}</a>
{{ end }}
{{ end -}}


</div>
{{ end }}
{{ end }}
{{ end -}}

{{ end -}}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish = "public"
command = "make production-build"

[build.environment]
HUGO_VERSION = "0.74.3"
HUGO_VERSION = "0.101.0"
NODE_VERSION = "10.20.0"

[context.production.environment]
Expand Down
2 changes: 1 addition & 1 deletion themes/docsy
Submodule docsy updated 173 files

0 comments on commit 39c0bb6

Please sign in to comment.