From c13f35738af9fa2ff4a17fb11917e5d9c1224425 Mon Sep 17 00:00:00 2001 From: "Darren J. de Lima" Date: Fri, 1 Jul 2022 11:46:18 +0100 Subject: Add more to default templates --- archetypes/default.md | 8 ++++++++ archetypes/post.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 archetypes/post.md diff --git a/archetypes/default.md b/archetypes/default.md index dd9dc12..4eb707b 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -9,6 +9,8 @@ tags: [] categories: [] author: "" +# Uncomment to pin article to front page +# weight: 1 # You can also close(false) or open(true) something for this content. # P.S. comment can only be closed comment: false @@ -18,6 +20,12 @@ autoCollapseToc: false contentCopyright: false reward: false mathjax: false + +# Uncomment to add to the homepage's dropdown menu; weight = order of article +# menu: +# main: +# parent: "docs" +# weight: 1 --- diff --git a/archetypes/post.md b/archetypes/post.md new file mode 100644 index 0000000..4eb707b --- /dev/null +++ b/archetypes/post.md @@ -0,0 +1,31 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +lastmod: {{ .Date }} +draft: true +keywords: [] +description: "" +tags: [] +categories: [] +author: "" + +# Uncomment to pin article to front page +# weight: 1 +# You can also close(false) or open(true) something for this content. +# P.S. comment can only be closed +comment: false +toc: false +autoCollapseToc: false +# You can also define another contentCopyright. e.g. contentCopyright: "This is another copyright." +contentCopyright: false +reward: false +mathjax: false + +# Uncomment to add to the homepage's dropdown menu; weight = order of article +# menu: +# main: +# parent: "docs" +# weight: 1 +--- + + -- cgit v1.2.3 From e9b01ab225e1f686704a5d566b1c57d86c48885b Mon Sep 17 00:00:00 2001 From: "Darren J. de Lima" Date: Wed, 20 Jul 2022 16:08:02 +0100 Subject: [Feature] Add custom wallpaper param (not yet adaptive) Custom wallpaper does not change with site switching to dark mode... but then, the theme does not support dark/light mode switching yet. --- exampleSite/config.toml | 3 +++ layouts/_default/baseof.html | 2 +- layouts/partials/head.html | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3986643..be318e6 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -73,6 +73,9 @@ defaultContentLanguage = "en" # Default language to use photoswipe = true # see https://github.com/dimsemenov/PhotoSwipe # 是否启用PhotoSwipe(图片可点击) contentCopyright = 'CC BY-NC-ND 4.0' + # Optional custom wallpaper image URL. Can be a remote image or local /static/img/wallpaper.jpg (make sure it has a small filesize for quick site painting) + wallpaper = "https://followingmyfeet.com/wp-content/uploads/2018/02/825_2229-HDR.jpg" + # Link custom CSS and JS assets # (relative to /static/css and /static/js respectively) customCSS = [] # if ['custom.css'], load '/static/css/custom.css' file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a3df1dc..9efa8bf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -45,7 +45,7 @@
-
+
{{ block "content" . }}{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3728b97..41fc462 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -78,6 +78,18 @@ + +{{- if .Site.Params.wallpaper }} + +{{- end }} + {{ range .Site.Params.customCSS }} -- cgit v1.2.3 From ed5e77b93fda61d1891cd5fcad48f9d67aeb46bf Mon Sep 17 00:00:00 2001 From: "Darren J. de Lima" Date: Wed, 20 Jul 2022 17:09:05 +0100 Subject: Add wiki as submodule Allows people to download the documentation... --- .gitmodules | 3 +++ docs | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 docs diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..24f4942 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs"] + path = docs + url = https://github.com/xianmin/hugo-theme-jane.wiki diff --git a/docs b/docs new file mode 160000 index 0000000..b2d398e --- /dev/null +++ b/docs @@ -0,0 +1 @@ +Subproject commit b2d398ed95c1c1d53aede725f451d50c75b1d848 -- cgit v1.2.3 From 2f74c212cc032a591fbb9abdb4cb75156d2aea08 Mon Sep 17 00:00:00 2001 From: "Darren J. de Lima" Date: Fri, 29 Jul 2022 21:57:57 +0100 Subject: Implement suggestions https://github.com/xianmin/hugo-theme-jane/pull/339 --- .gitmodules | 3 --- docs | 1 - exampleSite/config.toml | 3 --- exampleSite/full-config.toml | 3 +++ 4 files changed, 3 insertions(+), 7 deletions(-) delete mode 160000 docs diff --git a/.gitmodules b/.gitmodules index 24f4942..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "docs"] - path = docs - url = https://github.com/xianmin/hugo-theme-jane.wiki diff --git a/docs b/docs deleted file mode 160000 index b2d398e..0000000 --- a/docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b2d398ed95c1c1d53aede725f451d50c75b1d848 diff --git a/exampleSite/config.toml b/exampleSite/config.toml index be318e6..11b08fe 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -72,9 +72,6 @@ defaultContentLanguage = "en" # Default language to use toc = true # 是否开启目录 photoswipe = true # see https://github.com/dimsemenov/PhotoSwipe # 是否启用PhotoSwipe(图片可点击) contentCopyright = 'CC BY-NC-ND 4.0' - - # Optional custom wallpaper image URL. Can be a remote image or local /static/img/wallpaper.jpg (make sure it has a small filesize for quick site painting) - wallpaper = "https://followingmyfeet.com/wp-content/uploads/2018/02/825_2229-HDR.jpg" # Link custom CSS and JS assets # (relative to /static/css and /static/js respectively) diff --git a/exampleSite/full-config.toml b/exampleSite/full-config.toml index 28a9e01..d2a81ae 100644 --- a/exampleSite/full-config.toml +++ b/exampleSite/full-config.toml @@ -94,6 +94,9 @@ defaultContentLanguage = "en" # Default language to use showMenuLanguageChooser = true showAuthorInfo = true # show author info below the article + + # Optional custom wallpaper image URL. Can be a remote image or local /static/img/wallpaper.jpg (make sure it has a small filesize for quick site painting) + wallpaper = "https://followingmyfeet.com/wp-content/uploads/2018/02/825_2229-HDR.jpg" # 一些全局开关,你也可以在每一篇内容的 front matter 中针对单篇内容关闭或开启某些功能,在 archetypes/default.md 查看更多信息。 # Some global options, you can also close or open something in front matter for a single post, see more information from `archetypes/default.md`. -- cgit v1.2.3 From c5b222d0eb00f29be75744f8fdd5c0ebe64ae30a Mon Sep 17 00:00:00 2001 From: "Darren J. de Lima" Date: Fri, 29 Jul 2022 22:19:15 +0100 Subject: Add local photo example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Almost added a photo to exampleSite, but I don't know the licensing for the example URL, and have a feeling Unsplash shouldn't be used as a CDN. Also uncertain what sort of wallpaper would best fit the brand you're wanting for the theme. So I won't add unnecessary filesize. (c) 24/02/2018 Jeff Bevan, Bishops Palace – Wells, Somerset, UK. ID 825_2229 (https://followingmyfeet.com/?p=8931, "Wells Snowdrops") --- exampleSite/full-config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/full-config.toml b/exampleSite/full-config.toml index d2a81ae..2f847de 100644 --- a/exampleSite/full-config.toml +++ b/exampleSite/full-config.toml @@ -96,6 +96,7 @@ defaultContentLanguage = "en" # Default language to use showAuthorInfo = true # show author info below the article # Optional custom wallpaper image URL. Can be a remote image or local /static/img/wallpaper.jpg (make sure it has a small filesize for quick site painting) + # wallpaper = "/static/img/wallpaper.jpg" wallpaper = "https://followingmyfeet.com/wp-content/uploads/2018/02/825_2229-HDR.jpg" # 一些全局开关,你也可以在每一篇内容的 front matter 中针对单篇内容关闭或开启某些功能,在 archetypes/default.md 查看更多信息。 -- cgit v1.2.3