You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by ti...@apache.org on 2024/03/10 06:02:39 UTC
(comdev-site) 01/01: fix: defensively access filepath
This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch preview/fixup-hugo-nil
in repository https://gitbox.apache.org/repos/asf/comdev-site.git
commit c8e4c3be58f3d0854a7aa2fb57aef99839362b4e
Author: tison <wa...@gmail.com>
AuthorDate: Sun Mar 10 14:02:06 2024 +0800
fix: defensively access filepath
Signed-off-by: tison <wa...@gmail.com>
---
.editorconfig | 7 +++++++
hugo.toml | 2 +-
layouts/partials/website-source.html | 7 +++++--
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..5694b924
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,7 @@
+root = true
+
+[*]
+end_of_line = lf
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
diff --git a/hugo.toml b/hugo.toml
index 2fae7c62..1be1a905 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -9,7 +9,7 @@ disablePathToLower = true
uglyURLs = true
enableRobotsTXT = true
disableBrowserError = true
-timeout = 3000
+timeout = "30s"
ignoreFiles = [ ] # No files to ignore
diff --git a/layouts/partials/website-source.html b/layouts/partials/website-source.html
index 3c92acc2..a5605f1f 100644
--- a/layouts/partials/website-source.html
+++ b/layouts/partials/website-source.html
@@ -2,6 +2,9 @@
This website is generated from the <a href="{{ .Site.Params.repositoryUrl }}">comdev-site repository</a>
{{ if or .IsPage .IsSection .IsHome }}
<br/>
- Source of this page: <a href="{{ .Site.Params.repositoryContentBaseUrl }}/{{ .Page.File.Path }}" title="Source of this page">{{ .Page.File.Path }}</a>
+ Source of this page:
+ <a href="{{ .Site.Params.repositoryContentBaseUrl }}/{{ with .Page.File }}{{ .Path }}{{ end }}" title="Source of this page">
+ {{ with .Page.File }}{{ .Path }}{{ end }}
+ </a>
{{ end }}
-</p>
\ No newline at end of file
+</p>