From a6e33da331b7f1896a33bd27aab34f1bfe901ef0 Mon Sep 17 00:00:00 2001 From: ming Date: Fri, 20 Jun 2025 20:13:45 +0800 Subject: [PATCH] compile --- config.yml | 3 +- content/article/西天取经持恒心.md | 27 + content/article/那一刻我长大了.md | 17 + content/note/KETwords.md | 2 +- content/note/KETwords.qmd | 2 +- content/note/KET集训1.md | 5 +- content/note/不规则动词时态.md | 137 ++- layouts/layouts/404.html | 3 + .../_default/_markup/render-image.html | 22 + layouts/layouts/_default/archives.html | 83 ++ layouts/layouts/_default/baseof.html | 27 + layouts/layouts/_default/index.json | 7 + layouts/layouts/_default/list.html | 121 +++ layouts/layouts/_default/rss.xml | 83 ++ layouts/layouts/_default/search.html | 29 + layouts/layouts/_default/single.html | 65 ++ layouts/layouts/_default/terms.html | 27 + .../layouts/partials/anchored_headings.html | 2 + layouts/layouts/partials/author.html | 9 + layouts/layouts/partials/breadcrumbs.html | 19 + layouts/layouts/partials/comments.html | 3 + layouts/layouts/partials/cover.html | 65 ++ layouts/layouts/partials/edit_post.html | 8 + layouts/layouts/partials/extend_footer.html | 3 + layouts/layouts/partials/extend_head.html | 4 + layouts/layouts/partials/footer.html | 144 +++ layouts/layouts/partials/head.html | 157 +++ layouts/layouts/partials/header.html | 149 +++ layouts/layouts/partials/home_info.html | 13 + layouts/layouts/partials/index_profile.html | 58 + layouts/layouts/partials/post_canonical.html | 9 + layouts/layouts/partials/post_meta.html | 23 + layouts/layouts/partials/post_nav_links.html | 19 + layouts/layouts/partials/share_icons.html | 95 ++ layouts/layouts/partials/social_icons.html | 8 + layouts/layouts/partials/svg.html | 988 ++++++++++++++++++ .../templates/_funcs/get-page-images.html | 47 + .../layouts/partials/templates/opengraph.html | 86 ++ .../partials/templates/schema_json.html | 128 +++ .../partials/templates/twitter_cards.html | 31 + layouts/layouts/partials/toc.html | 97 ++ .../layouts/partials/translation_list.html | 19 + layouts/layouts/robots.txt | 7 + layouts/layouts/shortcodes/collapse.html | 8 + layouts/layouts/shortcodes/figure.html | 31 + layouts/layouts/shortcodes/inTextImg.html | 5 + layouts/layouts/shortcodes/ltr.html | 15 + layouts/layouts/shortcodes/rawhtml.html | 2 + layouts/layouts/shortcodes/rtl.html | 15 + layouts/partials/templates/opengraph.html | 4 +- layouts/partials/templates/twitter_cards.html | 4 +- .../images/blackwolf_hu_b1f5413bfccaa29e.webp | Bin 0 -> 346 bytes 52 files changed, 2856 insertions(+), 79 deletions(-) create mode 100644 content/article/西天取经持恒心.md create mode 100644 content/article/那一刻我长大了.md create mode 100644 layouts/layouts/404.html create mode 100644 layouts/layouts/_default/_markup/render-image.html create mode 100644 layouts/layouts/_default/archives.html create mode 100644 layouts/layouts/_default/baseof.html create mode 100644 layouts/layouts/_default/index.json create mode 100644 layouts/layouts/_default/list.html create mode 100644 layouts/layouts/_default/rss.xml create mode 100644 layouts/layouts/_default/search.html create mode 100644 layouts/layouts/_default/single.html create mode 100644 layouts/layouts/_default/terms.html create mode 100644 layouts/layouts/partials/anchored_headings.html create mode 100644 layouts/layouts/partials/author.html create mode 100644 layouts/layouts/partials/breadcrumbs.html create mode 100644 layouts/layouts/partials/comments.html create mode 100644 layouts/layouts/partials/cover.html create mode 100644 layouts/layouts/partials/edit_post.html create mode 100644 layouts/layouts/partials/extend_footer.html create mode 100644 layouts/layouts/partials/extend_head.html create mode 100644 layouts/layouts/partials/footer.html create mode 100644 layouts/layouts/partials/head.html create mode 100644 layouts/layouts/partials/header.html create mode 100644 layouts/layouts/partials/home_info.html create mode 100644 layouts/layouts/partials/index_profile.html create mode 100644 layouts/layouts/partials/post_canonical.html create mode 100644 layouts/layouts/partials/post_meta.html create mode 100644 layouts/layouts/partials/post_nav_links.html create mode 100644 layouts/layouts/partials/share_icons.html create mode 100644 layouts/layouts/partials/social_icons.html create mode 100644 layouts/layouts/partials/svg.html create mode 100644 layouts/layouts/partials/templates/_funcs/get-page-images.html create mode 100644 layouts/layouts/partials/templates/opengraph.html create mode 100644 layouts/layouts/partials/templates/schema_json.html create mode 100644 layouts/layouts/partials/templates/twitter_cards.html create mode 100644 layouts/layouts/partials/toc.html create mode 100644 layouts/layouts/partials/translation_list.html create mode 100644 layouts/layouts/robots.txt create mode 100644 layouts/layouts/shortcodes/collapse.html create mode 100644 layouts/layouts/shortcodes/figure.html create mode 100644 layouts/layouts/shortcodes/inTextImg.html create mode 100644 layouts/layouts/shortcodes/ltr.html create mode 100644 layouts/layouts/shortcodes/rawhtml.html create mode 100644 layouts/layouts/shortcodes/rtl.html create mode 100644 resources/_gen/images/images/blackwolf_hu_b1f5413bfccaa29e.webp diff --git a/config.yml b/config.yml index ae6a482..b342748 100644 --- a/config.yml +++ b/config.yml @@ -3,8 +3,9 @@ baseURL: "https://blackwolf.drwater.net/" languageCode: zh-cn title: Black Wolf -paginate: 5 theme: [hugo-PaperMod] +pagination: + pagerSize: 5 enableInlineShortcodes: true enableRobotsTXT: true diff --git a/content/article/西天取经持恒心.md b/content/article/西天取经持恒心.md new file mode 100644 index 0000000..886afe1 --- /dev/null +++ b/content/article/西天取经持恒心.md @@ -0,0 +1,27 @@ +--- +title: 西天取经持恒心--读《西游记》有感 +author: Black Wolf +date: 2025-03-28 +--- + +吴承恩所著的《西游记》是一部经典神魔小说,书中细致描绘了唐僧师徒四人西天取经的艰辛历程。他们一路历经九九八十一难,最终成功抵达灵山,取得真经。这看似是一场神话冒险,实则蕴含着深刻的人生哲理——做事要持之以恒。 + +师徒四人的取经路闪烁着持之以恒的光芒。孙悟空本领高强,降妖除魔时面对实力强劲的对手,多次陷入困境,但他从不言弃,始终坚守着护送唐僧的使命,凭借不懈的努力一次次化险为夷。唐僧作为团队的核心,心怀普度众生的宏愿,哪怕前方妖魔鬼怪横行,哪怕被误解、被威胁,他对取经的信念也从未动摇,一步一个脚印坚定地向西天前行。沙僧默默挑着重担,在漫长的旅途中,他以沉稳和坚毅,持之以恒地守护着团队。相比之下,猪八戒虽偶尔偷懒,甚至多次想打退堂鼓,但在同伴的影响和支持下,也坚持走到最后。他们的经历告诉我们,无论遇到什么样的困难,只要持之以恒,就能跨越重重障碍和磨难。 + +这不禁让我想起了铁杵磨针的故事。唐代大诗人李白,年少时并不爱读书。一次逃课玩耍,他在山下河边看到一位老婆婆在努力地磨着一根铁杵,好奇之下询问,才得知老婆婆是要把铁杵磨成针。李白惊讶于这看似不可能的目标,而老婆婆那句“只要天天磨,铁杵就能越磨越细,还怕磨不成针吗!”令李白深感惭愧,从此发愤读书,将“只要功夫深,铁杵磨成针”的道理铭记于心,最终成为流芳千古的“诗仙”。 + +反观现实中的我们,生活在一个物质条件极为便利的时代,想做的事情似乎触手可得,但奇怪的是,我们经常在困难面前轻易退缩!学骑自行车,刚摔了几次就心生恐惧,放弃练习;尝试滑旱冰,觉得难以掌握平衡,便迅速选择放弃;就连跑步这样简单的运动,也会因些许劳累就不愿坚持。最终,让宝贵的时间在犹豫和放弃中白白流逝。 + +做事如同取经,没有一条路是平坦的,唯有持之以恒,才能跨越重重阻碍,抵达成功的彼岸。让我们以师徒四人为榜样,在人生的道路上,无论遇到多少艰难险阻,都能坚守信念,持之以恒地朝着目标前进,用坚持和毅力书写属于自己的辉煌。 + +夜,静谧。柔和的月光洒下一地银辉。微风带来凉爽的夜气,也带来鸣虫演奏的小夜曲。我趴在窗前,思绪不禁飘回了那个让我真正长大的瞬间。 + +以前,我吃饭总是毛毛躁躁,桌上和地上常常掉满饭粒,而且每次都会剩一些。爸爸虽看在眼里,却一直没有多说。 + +那天,我又慢吞吞地吃着米饭,像往常一样,才吃了一半多一点,就把碗一推,准备倒掉去看电视。这时,爸爸突然叫住我,温和地说:“你知道奶奶小时候过的是什么样的日子吗?”我一下子来了好奇心,放下碗筷,抬起头看向爸爸。只见他的眼神里满是耐心与温和,他拉过椅子,在我身旁缓缓坐下,微微眯起眼睛,仿佛陷入了回忆:“奶奶出生在1964年,大饥荒刚结束不久,那时家里一点粮食都没有,太爷爷太奶奶只能带着一家人去外面找野菜。在那场饥荒中,百姓生活困苦不堪。他们吃完家中的牲畜,便开始啃食树皮、野菜,甚至吃土充饥。很多人被迫卖儿卖女,沿路饿殍满地,惨状令人触目惊心。这也是为什么奶奶直到今天,一点粮食都不想浪费的原因。”爸爸说着,轻轻叹了口气,眼中流露出一丝沉痛。 + +在这一刻,眼泪顺着我的脸颊滑了下来,一种深刻的内疚与震撼交织在一起,涌进我身体里的每一根血管。我对过去浪费食物的行为感到强烈的羞愧! + +在这一瞬间,我感到我的内心发生了变化,我知道我真的长大了。我看着碗里剩下的米饭,仿佛看到了饥荒岁月里人们对食物的渴望眼神。我深吸一口气,拿起筷子,一口一口认真地吃起来,每一口都嚼得格外仔细,不再像以前一样狼吞虎咽,也不再嫌弃饭没有味道。那些原本准备倒掉的米饭,此刻在我眼中变得格外珍贵。吃完后,我又小心地把桌上掉的饭粒一颗颗捡起。看着干干净净的碗和桌面,我心里有一种前所未有的踏实感。 + +从那以后,我时刻铭记爸爸的话,珍惜每一粒粮食,积极践行“光盘行动”,因为我知道,每一份食物都来之不易,背后都承载着过去的苦难与记忆。 diff --git a/content/article/那一刻我长大了.md b/content/article/那一刻我长大了.md new file mode 100644 index 0000000..fd82862 --- /dev/null +++ b/content/article/那一刻我长大了.md @@ -0,0 +1,17 @@ +--- +title: 那一刻,我长大了 +author: Black Wolf +date: 2025-02-28 +--- + +夜,静谧。柔和的月光洒下一地银辉。微风带来凉爽的夜气,也带来鸣虫演奏的小夜曲。我趴在窗前,思绪不禁飘回了那个让我真正长大的瞬间。 + +以前,我吃饭总是毛毛躁躁,桌上和地上常常掉满饭粒,而且每次都会剩一些。爸爸虽看在眼里,却一直没有多说。 + +那天,我又慢吞吞地吃着米饭,像往常一样,才吃了一半多一点,就把碗一推,准备倒掉去看电视。这时,爸爸突然叫住我,温和地说:“你知道奶奶小时候过的是什么样的日子吗?”我一下子来了好奇心,放下碗筷,抬起头看向爸爸。只见他的眼神里满是耐心与温和,他拉过椅子,在我身旁缓缓坐下,微微眯起眼睛,仿佛陷入了回忆:“奶奶出生在1964年,大饥荒刚结束不久,那时家里一点粮食都没有,太爷爷太奶奶只能带着一家人去外面找野菜。在那场饥荒中,百姓生活困苦不堪。他们吃完家中的牲畜,便开始啃食树皮、野菜,甚至吃土充饥。很多人被迫卖儿卖女,沿路饿殍满地,惨状令人触目惊心。这也是为什么奶奶直到今天,一点粮食都不想浪费的原因。”爸爸说着,轻轻叹了口气,眼中流露出一丝沉痛。 + +在这一刻,眼泪顺着我的脸颊滑了下来,一种深刻的内疚与震撼交织在一起,涌进我身体里的每一根血管。我对过去浪费食物的行为感到强烈的羞愧! + +在这一瞬间,我感到我的内心发生了变化,我知道我真的长大了。我看着碗里剩下的米饭,仿佛看到了饥荒岁月里人们对食物的渴望眼神。我深吸一口气,拿起筷子,一口一口认真地吃起来,每一口都嚼得格外仔细,不再像以前一样狼吞虎咽,也不再嫌弃饭没有味道。那些原本准备倒掉的米饭,此刻在我眼中变得格外珍贵。吃完后,我又小心地把桌上掉的饭粒一颗颗捡起。看着干干净净的碗和桌面,我心里有一种前所未有的踏实感。 + +从那以后,我时刻铭记爸爸的话,珍惜每一粒粮食,积极践行“光盘行动”,因为我知道,每一份食物都来之不易,背后都承载着过去的苦难与记忆。 diff --git a/content/note/KETwords.md b/content/note/KETwords.md index 6176055..48e50c7 100644 --- a/content/note/KETwords.md +++ b/content/note/KETwords.md @@ -1,6 +1,6 @@ --- title: KET words -date: last-modifed +date: '2025-02-07' --- diff --git a/content/note/KETwords.qmd b/content/note/KETwords.qmd index f25b8ce..3ea9801 100644 --- a/content/note/KETwords.qmd +++ b/content/note/KETwords.qmd @@ -1,6 +1,6 @@ --- title: KET words -date: last-modifed +date: "2025-02-07" --- # Common words diff --git a/content/note/KET集训1.md b/content/note/KET集训1.md index d77d9bd..74bb07d 100644 --- a/content/note/KET集训1.md +++ b/content/note/KET集训1.md @@ -1,9 +1,8 @@ --- title: KET集训1 -date: 2024-1-11 +date: 2024-01-11 --- - # Part 1 ## Step 1 @@ -150,7 +149,7 @@ tell me something about ... (3-5句,多说) - When I travel by train, I can read something interesting. It's also got more space than on a plane. -### Internet 谈论互联网 +### Internet 谈论互联网 > What can you learn on the internet? diff --git a/content/note/不规则动词时态.md b/content/note/不规则动词时态.md index 32b69df..a4c7e0b 100644 --- a/content/note/不规则动词时态.md +++ b/content/note/不规则动词时态.md @@ -1,73 +1,72 @@ --- title: 不规则动词的时态 -date: 2024-1-8 +date: 2024-01-08 --- - -| 基本形式 | 过去式 | 过去分词 | -|---------------|-------------|--------------| -| be (是) | was/were | been | -| have (有) | had | had | -| do (做) | did | done | -| go (去) | went | gone | -| come (来) | came | come | -| see (看见) | saw | seen | -| take (拿) | took | taken | -| eat (吃) | ate | eaten | -| drink (喝) | drank | drunk | -| drive (驾驶) | drove | driven | -| write (写) | wrote | written | -| break (打破) | broke | broken | -| run (跑) | ran | run | -| speak (说) | spoke | spoken | -| buy (买) | bought | bought | -| sleep (睡觉) | slept | slept | -| think (思考) | thought | thought | -| bring (带来) | brought | brought | -| teach (教) | taught | taught | -| catch (捕捉) | caught | caught | -| swim (游泳) | swam | swum | -| sing (唱歌) | sang | sung | -| give (给予) | gave | given | -| see (看见) | saw | seen | -| fly (飞行) | flew | flown | -| run (管理) | ran | run | -| hold (持有) | held | held | -| choose (选择) | chose | chosen | -| forget (忘记) | forgot | forgotten | -| forgive (原谅) | forgave | forgiven | -| ride (骑) | rode | ridden | -| go (参加) | went | gone | -| begin (开始) | began | begun | -| keep (保持) | kept | kept | -| say (说) | said | said | -| tell (告诉) | told | told | -| make (制造) | made | made | -| read (读) | read | read | -| fall (掉落) | fell | fallen | -| see (看见) | saw | seen | -| hear (听见) | heard | heard | -| stand (站立) | stood | stood | -| lose (失去) | lost | lost | -| find (找到) | found | found | -| hear (听见) | heard | heard | -| think (认为) | thought | thought | -| mean (意味) | meant | meant | -| keep (保持) | kept | kept | -| let (让) | let | let | -| begin (开始) | began | begun | -| know (知道) | knew | known | -| cut (切) | cut | cut | -| build (建造) | built | built | -| hurt (伤害) | hurt | hurt | -| put (放置) | put | put | -| set (设置) | set | set | -| meet (遇见) | met | met | -| pay (支付) | paid | paid | -| run (运行) | ran | run | -| sit (坐) | sat | sat | -| speak (讲话) | spoke | spoken | -| sleep (睡觉) | slept | slept | -| spend (花费) | spent | spent | -| win (赢) | won | won | -| send (发送) | sent | sent | +| 基本形式 | 过去式 | 过去分词 | +| -------------- | -------- | --------- | +| be (是) | was/were | been | +| have (有) | had | had | +| do (做) | did | done | +| go (去) | went | gone | +| come (来) | came | come | +| see (看见) | saw | seen | +| take (拿) | took | taken | +| eat (吃) | ate | eaten | +| drink (喝) | drank | drunk | +| drive (驾驶) | drove | driven | +| write (写) | wrote | written | +| break (打破) | broke | broken | +| run (跑) | ran | run | +| speak (说) | spoke | spoken | +| buy (买) | bought | bought | +| sleep (睡觉) | slept | slept | +| think (思考) | thought | thought | +| bring (带来) | brought | brought | +| teach (教) | taught | taught | +| catch (捕捉) | caught | caught | +| swim (游泳) | swam | swum | +| sing (唱歌) | sang | sung | +| give (给予) | gave | given | +| see (看见) | saw | seen | +| fly (飞行) | flew | flown | +| run (管理) | ran | run | +| hold (持有) | held | held | +| choose (选择) | chose | chosen | +| forget (忘记) | forgot | forgotten | +| forgive (原谅) | forgave | forgiven | +| ride (骑) | rode | ridden | +| go (参加) | went | gone | +| begin (开始) | began | begun | +| keep (保持) | kept | kept | +| say (说) | said | said | +| tell (告诉) | told | told | +| make (制造) | made | made | +| read (读) | read | read | +| fall (掉落) | fell | fallen | +| see (看见) | saw | seen | +| hear (听见) | heard | heard | +| stand (站立) | stood | stood | +| lose (失去) | lost | lost | +| find (找到) | found | found | +| hear (听见) | heard | heard | +| think (认为) | thought | thought | +| mean (意味) | meant | meant | +| keep (保持) | kept | kept | +| let (让) | let | let | +| begin (开始) | began | begun | +| know (知道) | knew | known | +| cut (切) | cut | cut | +| build (建造) | built | built | +| hurt (伤害) | hurt | hurt | +| put (放置) | put | put | +| set (设置) | set | set | +| meet (遇见) | met | met | +| pay (支付) | paid | paid | +| run (运行) | ran | run | +| sit (坐) | sat | sat | +| speak (讲话) | spoke | spoken | +| sleep (睡觉) | slept | slept | +| spend (花费) | spent | spent | +| win (赢) | won | won | +| send (发送) | sent | sent | diff --git a/layouts/layouts/404.html b/layouts/layouts/404.html new file mode 100644 index 0000000..a405573 --- /dev/null +++ b/layouts/layouts/404.html @@ -0,0 +1,3 @@ +{{- define "main" }} +
404
+{{- end }}{{/* end main */ -}} diff --git a/layouts/layouts/_default/_markup/render-image.html b/layouts/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..f368ff8 --- /dev/null +++ b/layouts/layouts/_default/_markup/render-image.html @@ -0,0 +1,22 @@ +{{- $u := urls.Parse .Destination -}} +{{- $src := $u.String -}} +{{- if not $u.IsAbs -}} + {{- $path := strings.TrimPrefix "./" $u.Path }} + {{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}} + {{- $src = .RelPermalink -}} + {{- with $u.RawQuery -}} + {{- $src = printf "%s?%s" $src . -}} + {{- end -}} + {{- with $u.Fragment -}} + {{- $src = printf "%s#%s" $src . -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape) "loading" "lazy") -}} + +{{- /**/ -}} diff --git a/layouts/layouts/_default/archives.html b/layouts/layouts/_default/archives.html new file mode 100644 index 0000000..eea3fc8 --- /dev/null +++ b/layouts/layouts/_default/archives.html @@ -0,0 +1,83 @@ +{{- define "main" }} + + + +{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + +{{- if site.Params.ShowAllPagesInArchive }} +{{- $pages = site.RegularPages }} +{{- end }} + +{{- range $pages.GroupByPublishDate "2006" }} +{{- if ne .Key "0001" }} +
+ {{- $year := replace .Key "0001" "" }} +

+ + {{- $year -}} + +  {{ len .Pages }} +

+ {{- range .Pages.GroupByDate "January" }} +
+

+ + {{- .Key -}} + +  {{ len .Pages }} +

+
+ {{- range .Pages }} + {{- if eq .Kind "page" }} +
+

+ {{- .Title | markdownify }} + {{- if .Draft }} + + + + + + {{- end }} +

+
+ {{- partial "post_meta.html" . -}} +
+ +
+ {{- end }} + {{- end }} +
+
+ {{- end }} +
+{{- end }} +{{- end }} + +{{- end }}{{/* end main */}} diff --git a/layouts/layouts/_default/baseof.html b/layouts/layouts/_default/baseof.html new file mode 100644 index 0000000..db3a506 --- /dev/null +++ b/layouts/layouts/_default/baseof.html @@ -0,0 +1,27 @@ +{{- if lt hugo.Version "0.146.0" }} +{{- errorf "=> hugo v0.146.0 or greater is required for hugo-PaperMod to build " }} +{{- end -}} + + + + + + {{- partial "head.html" . }} + + + + {{- partialCached "header.html" . .Page -}} +
+ {{- block "main" . }}{{ end }} +
+ {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} + + + diff --git a/layouts/layouts/_default/index.json b/layouts/layouts/_default/index.json new file mode 100644 index 0000000..feeb437 --- /dev/null +++ b/layouts/layouts/_default/index.json @@ -0,0 +1,7 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range site.RegularPages -}} + {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} + {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} + {{- end }} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/layouts/_default/list.html b/layouts/layouts/_default/list.html new file mode 100644 index 0000000..81aea6e --- /dev/null +++ b/layouts/layouts/_default/list.html @@ -0,0 +1,121 @@ +{{- define "main" }} + +{{- if (and site.Params.profileMode.enabled .IsHome) }} +{{- partial "index_profile.html" . }} +{{- else }} {{/* if not profileMode */}} + +{{- if not .IsHome | and .Title }} + +{{- end }} + +{{- if .Content }} +
+ {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
+{{- end }} + +{{- $pages := union .RegularPages .Sections }} + +{{- if .IsHome }} +{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }} +{{- end }} + +{{- $paginator := .Paginate $pages }} + +{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} +{{- partial "home_info.html" . }} +{{- end }} + +{{- $term := .Data.Term }} +{{- range $index, $page := $paginator.Pages }} + +{{- $class := "post-entry" }} + +{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} +{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} +{{- $class = "first-entry" }} +{{- else if $term }} +{{- $class = "post-entry tag-entry" }} +{{- end }} + +
+ {{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} + {{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }} +
+

+ {{- .Title }} + {{- if .Draft }} + + + + + + {{- end }} +

+
+ {{- if (ne (.Param "hideSummary") true) }} +
+

{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

+
+ {{- end }} + {{- if not (.Param "hideMeta") }} +
+ {{- partial "post_meta.html" . -}} +
+ {{- end }} + +
+{{- end }} + +{{- if gt $paginator.TotalPages 1 }} + +{{- end }} + +{{- end }}{{/* end profileMode */}} + +{{- end }}{{- /* end main */ -}} diff --git a/layouts/layouts/_default/rss.xml b/layouts/layouts/_default/rss.xml new file mode 100644 index 0000000..fed8ae9 --- /dev/null +++ b/layouts/layouts/_default/rss.xml @@ -0,0 +1,83 @@ +{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- else }} + {{- with site.Author.email }} + {{- $authorEmail = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} + {{- end }} +{{- end }} + +{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- else }} + {{- with site.Author.name }} + {{- $authorName = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} + {{- end }} +{{- end }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = $pctx.RegularPages }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end }} +{{- printf "" | safeHTML }} + + + {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} + {{- with site.Params.images }} + + {{ site.Title }} + {{ index . 0 | absURL }} + {{ index . 0 | absURL }} + + {{- end }} + Hugo -- {{ hugo.Version }} + {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} + {{ . | markdownify | plainify | strings.TrimPrefix "© " }}{{ end }}{{ if not .Date.IsZero }} + {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} + + {{ .Title }} + {{ .Permalink }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} + {{- if and site.Params.ShowFullTextinRSS .Content }} + {{ (printf "" .Content) | safeHTML }} + {{- end }} + + {{- end }} + {{- end }} + + diff --git a/layouts/layouts/_default/search.html b/layouts/layouts/_default/search.html new file mode 100644 index 0000000..bb7d436 --- /dev/null +++ b/layouts/layouts/_default/search.html @@ -0,0 +1,29 @@ +{{- define "main" }} + + + + + +{{- end }}{{/* end main */}} diff --git a/layouts/layouts/_default/single.html b/layouts/layouts/_default/single.html new file mode 100644 index 0000000..19a624f --- /dev/null +++ b/layouts/layouts/_default/single.html @@ -0,0 +1,65 @@ +{{- define "main" }} + +
+
+ {{ partial "breadcrumbs.html" . }} +

+ {{ .Title }} + {{- if .Draft }} + + + + + + {{- end }} +

+ {{- if .Description }} +
+ {{ .Description }} +
+ {{- end }} + {{- if not (.Param "hideMeta") }} + + {{- end }} +
+ {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param "cover.hidden") | default false }} + {{- partial "cover.html" (dict "cxt" . "IsSingle" true "isHidden" $isHidden) }} + {{- if (.Param "ShowToc") }} + {{- partial "toc.html" . }} + {{- end }} + + {{- if .Content }} +
+ {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
+ {{- end }} + +
+ {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }} + + {{- if (.Param "ShowPostNavLinks") }} + {{- partial "post_nav_links.html" . }} + {{- end }} + {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} + {{- partial "share_icons.html" . -}} + {{- end }} +
+ + {{- if (.Param "comments") }} + {{- partial "comments.html" . }} + {{- end }} +
+ +{{- end }}{{/* end main */}} diff --git a/layouts/layouts/_default/terms.html b/layouts/layouts/_default/terms.html new file mode 100644 index 0000000..6fd2654 --- /dev/null +++ b/layouts/layouts/_default/terms.html @@ -0,0 +1,27 @@ +{{- define "main" }} + +{{- if .Title }} + +{{- end }} + + + +{{- end }}{{/* end main */ -}} diff --git a/layouts/layouts/partials/anchored_headings.html b/layouts/layouts/partials/anchored_headings.html new file mode 100644 index 0000000..377af89 --- /dev/null +++ b/layouts/layouts/partials/anchored_headings.html @@ -0,0 +1,2 @@ +{{- /* formats .Content headings by adding an anchor */ -}} +{{ . | replaceRE "()" "${1}${3}" | safeHTML }} diff --git a/layouts/layouts/partials/author.html b/layouts/layouts/partials/author.html new file mode 100644 index 0000000..8f2758f --- /dev/null +++ b/layouts/layouts/partials/author.html @@ -0,0 +1,9 @@ +{{- if or .Params.author site.Params.author }} +{{- $author := (.Params.author | default site.Params.author) }} +{{- $author_type := (printf "%T" $author) }} +{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }} +{{- (delimit $author ", " ) }} +{{- else }} +{{- $author }} +{{- end }} +{{- end -}} diff --git a/layouts/layouts/partials/breadcrumbs.html b/layouts/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..2686ca0 --- /dev/null +++ b/layouts/layouts/partials/breadcrumbs.html @@ -0,0 +1,19 @@ +{{- if (.Param "ShowBreadCrumbs") -}} + +{{- end -}} diff --git a/layouts/layouts/partials/comments.html b/layouts/layouts/partials/comments.html new file mode 100644 index 0000000..918451a --- /dev/null +++ b/layouts/layouts/partials/comments.html @@ -0,0 +1,3 @@ +{{- /* Comments area start */ -}} +{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} +{{- /* Comments area end */ -}} diff --git a/layouts/layouts/partials/cover.html b/layouts/layouts/partials/cover.html new file mode 100644 index 0000000..9c1f9ea --- /dev/null +++ b/layouts/layouts/partials/cover.html @@ -0,0 +1,65 @@ +{{- with .cxt}} {{/* Apply proper context from dict */}} +{{- if (and .Params.cover.image (not $.isHidden)) }} +
+ {{- $loading := cond $.IsSingle "eager" "lazy" }} + {{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }} + {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} + {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} + {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} + + {{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $cover := (or $pageBundleCover $globalResourcesCover)}} + {{- /* We are not using the .Param.cover.relative to decide the location of image */}} + {{- /* If we have the image in pageBundle or globalResources we can process the image */}} + + {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} + {{- if hugo.IsExtended -}} + {{- $processableFormats = $processableFormats | append "webp" -}} + {{- end -}} + + {{- $imgdl := (.Params.cover.image) | absURL }} + {{- if $cover -}} + {{- $imgdl = $cover.Permalink }} + {{- end -}} + + {{- if $addLink }} + + {{- end }} + + {{- if $cover -}} + {{/* i.e it is present in page bundle */}} + {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} + {{ $alt }} + {{- else }}{{/* Unprocessable image or responsive images disabled */}} + {{ $alt }} + {{- end }} + {{- else }} + {{- /* For absolute urls and external links, no img processing here */}} + {{ $alt }} + {{- end }} + + {{- if $addLink }} + + {{- end -}} + + {{- /* Display Caption */}} + {{- if $.IsSingle }} + {{ with .Params.cover.caption -}} +
{{ . | markdownify }}
+ {{- end }} + {{- end }} +
+{{- end }}{{/* End image */}} +{{- end -}}{{/* End context */ -}} diff --git a/layouts/layouts/partials/edit_post.html b/layouts/layouts/partials/edit_post.html new file mode 100644 index 0000000..8d355d7 --- /dev/null +++ b/layouts/layouts/partials/edit_post.html @@ -0,0 +1,8 @@ +{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}} +{{- $fileUrlPath := path.Join .File.Path }} + +{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}} + + {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}} + +{{- end }} diff --git a/layouts/layouts/partials/extend_footer.html b/layouts/layouts/partials/extend_footer.html new file mode 100644 index 0000000..0519748 --- /dev/null +++ b/layouts/layouts/partials/extend_footer.html @@ -0,0 +1,3 @@ +{{- /* Footer custom content area start */ -}} +{{- /* Insert any custom code web-analytics, resources, etc. here */ -}} +{{- /* Footer custom content area end */ -}} diff --git a/layouts/layouts/partials/extend_head.html b/layouts/layouts/partials/extend_head.html new file mode 100644 index 0000000..150cbef --- /dev/null +++ b/layouts/layouts/partials/extend_head.html @@ -0,0 +1,4 @@ +{{- /* Head custom content area start */ -}} +{{- /* Insert any custom code (web-analytics, resources, etc.) - it will appear in the section of every page. */ -}} +{{- /* Can be overwritten by partial with the same name in the global layouts. */ -}} +{{- /* Head custom content area end */ -}} diff --git a/layouts/layouts/partials/footer.html b/layouts/layouts/partials/footer.html new file mode 100644 index 0000000..832cdba --- /dev/null +++ b/layouts/layouts/partials/footer.html @@ -0,0 +1,144 @@ +{{- if not (.Param "hideFooter") }} +
+ {{- if not site.Params.footer.hideCopyright }} + {{- if site.Copyright }} + {{ site.Copyright | markdownify }} + {{- else }} + © {{ now.Year }} {{ site.Title }} + {{- end }} + {{- print " · "}} + {{- end }} + + {{- with site.Params.footer.text }} + {{ . | markdownify }} + {{- print " · "}} + {{- end }} + + + Powered by + Hugo & + PaperMod + +
+{{- end }} + +{{- if (not site.Params.disableScrollToTop) }} + + + + + +{{- end }} + +{{- partial "extend_footer.html" . }} + + + +{{- if (not site.Params.disableScrollToTop) }} + +{{- end }} + +{{- if (not site.Params.disableThemeToggle) }} + +{{- end }} + +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }} + +{{- end }} diff --git a/layouts/layouts/partials/head.html b/layouts/layouts/partials/head.html new file mode 100644 index 0000000..ae6450a --- /dev/null +++ b/layouts/layouts/partials/head.html @@ -0,0 +1,157 @@ + + + +{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }} + +{{- else }} + +{{- end }} + +{{- /* Title */}} +{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }} + +{{- /* Meta */}} +{{- if .IsHome }} +{{ with site.Params.keywords -}}{{ end }} +{{- else }} + +{{- end }} + + + +{{- if site.Params.analytics.google.SiteVerificationTag }} + +{{- end }} +{{- if site.Params.analytics.yandex.SiteVerificationTag }} + +{{- end }} +{{- if site.Params.analytics.bing.SiteVerificationTag }} + +{{- end }} +{{- if site.Params.analytics.naver.SiteVerificationTag }} + +{{- end }} + +{{- /* Styles */}} + +{{- /* includes */}} +{{- $includes := slice }} +{{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}} + +{{- if not (eq site.Params.assets.disableScrollBarStyle true) }} + {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }} + {{- $includes = (append $ScrollStyle $includes) }} +{{- end }} + +{{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }} + +{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} +{{- $reset := (resources.Get "css/core/reset.css") }} +{{- $media := (resources.Get "css/core/zmedia.css") }} +{{- $license_css := (resources.Get "css/core/license.css") }} +{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} + +{{- /* markup.highlight.noClasses should be set to `false` */}} +{{- $chroma_styles := (resources.Get "css/includes/chroma-styles.css") }} +{{- $chroma_mod := (resources.Get "css/includes/chroma-mod.css") }} + +{{- /* order is important */}} +{{- $core := (slice $theme_vars $reset $common $chroma_styles $chroma_mod $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} +{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} + +{{- /* bundle all required css */}} +{{- /* Add extended css after theme style */ -}} +{{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }} + +{{- if not site.Params.assets.disableFingerprinting }} +{{- $stylesheet := $stylesheet | fingerprint }} + +{{- else }} + +{{- end }} + +{{- /* Search */}} +{{- if (eq .Layout `search`) -}} + +{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }} +{{- $fusejs := resources.Get "js/fuse.basic.min.js" }} +{{- $license_js := resources.Get "js/license.js" }} +{{- if not site.Params.assets.disableFingerprinting }} +{{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} + +{{- else }} +{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }} + +{{- end }} +{{- end -}} + +{{- /* Favicons */}} + + + + + + + + +{{- /* RSS */}} +{{ range .AlternativeOutputFormats -}} + +{{ end -}} +{{- range .AllTranslations -}} + +{{ end -}} + + + +{{- partial "extend_head.html" . -}} + +{{- /* Misc */}} +{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +{{- partial "google_analytics.html" . }} +{{- partial "templates/opengraph.html" . }} +{{- partial "templates/twitter_cards.html" . }} +{{- partial "templates/schema_json.html" . }} +{{- end -}} diff --git a/layouts/layouts/partials/header.html b/layouts/layouts/partials/header.html new file mode 100644 index 0000000..82d025b --- /dev/null +++ b/layouts/layouts/partials/header.html @@ -0,0 +1,149 @@ +{{- /* theme-toggle is enabled */}} +{{- if (not site.Params.disableThemeToggle) }} +{{- /* theme is light */}} +{{- if (eq site.Params.defaultTheme "light") }} + +{{- /* theme is dark */}} +{{- else if (eq site.Params.defaultTheme "dark") }} + +{{- else }} +{{- /* theme is auto */}} + +{{- end }} +{{- /* theme-toggle is disabled and theme is auto */}} +{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}} + +{{- end }} + +
+ +
diff --git a/layouts/layouts/partials/home_info.html b/layouts/layouts/partials/home_info.html new file mode 100644 index 0000000..199dfb7 --- /dev/null +++ b/layouts/layouts/partials/home_info.html @@ -0,0 +1,13 @@ +{{- with site.Params.homeInfoParams }} +
+
+

{{ .Title | markdownify }}

+
+
+ {{ .Content | markdownify }} +
+
+ {{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }} +
+
+{{- end -}} diff --git a/layouts/layouts/partials/index_profile.html b/layouts/layouts/partials/index_profile.html new file mode 100644 index 0000000..6882f39 --- /dev/null +++ b/layouts/layouts/partials/index_profile.html @@ -0,0 +1,58 @@ +
+ {{- with site.Params.profileMode }} +
+ {{- if .imageUrl -}} + {{- $img := "" }} + {{- if not (urls.Parse .imageUrl).IsAbs }} + {{- $img = resources.Get .imageUrl }} + {{- end }} + {{- if $img }} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} + {{- if hugo.IsExtended -}} + {{- $processableFormats = $processableFormats | append "webp" -}} + {{- end -}} + {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} + {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} + {{- if (not (and (not .imageHeight) (not .imageWidth))) }} + {{- $img = $img.Resize (printf "%dx%d" .imageWidth .imageHeight) }} + {{- else if .imageHeight }} + {{- $img = $img.Resize (printf "x%d" .imageHeight) }} + {{ else if .imageWidth }} + {{- $img = $img.Resize (printf "%dx" .imageWidth) }} + {{ else }} + {{- $img = $img.Resize "150x150" }} + {{- end }} + {{- end }} + {{ .imageTitle | default + {{- else }} + {{ .imageTitle | default + {{- end }} + {{- end }} +

{{ .title | default site.Title | markdownify }}

+ {{ .subtitle | markdownify }} + {{- partial "social_icons.html" -}} + + {{- with .buttons }} + + {{- end }} +
+ {{- end}} +
diff --git a/layouts/layouts/partials/post_canonical.html b/layouts/layouts/partials/post_canonical.html new file mode 100644 index 0000000..abfc1e3 --- /dev/null +++ b/layouts/layouts/partials/post_canonical.html @@ -0,0 +1,9 @@ +{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}} +{{ $url := urls.Parse .Params.canonicalURL }} + +{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL site.Params.editPost.URL) }} | {{- end -}} + + {{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}} +  {{ $url.Host }} + +{{- end }} diff --git a/layouts/layouts/partials/post_meta.html b/layouts/layouts/partials/post_meta.html new file mode 100644 index 0000000..b0c0417 --- /dev/null +++ b/layouts/layouts/partials/post_meta.html @@ -0,0 +1,23 @@ +{{- $scratch := newScratch }} + +{{- if not .Date.IsZero -}} +{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }} +{{- end }} + +{{- if (.Param "ShowReadingTime") -}} +{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }} +{{- end }} + +{{- if (.Param "ShowWordCount") -}} +{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} +{{- end }} + +{{- if not (.Param "hideAuthor") -}} +{{- with (partial "author.html" .) }} +{{- $scratch.Add "meta" (slice .) }} +{{- end }} +{{- end }} + +{{- with ($scratch.Get "meta") }} +{{- delimit . " · " | safeHTML -}} +{{- end -}} diff --git a/layouts/layouts/partials/post_nav_links.html b/layouts/layouts/partials/post_nav_links.html new file mode 100644 index 0000000..b988641 --- /dev/null +++ b/layouts/layouts/partials/post_nav_links.html @@ -0,0 +1,19 @@ +{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- if and (gt (len $pages) 1) (in $pages . ) }} + +{{- end }} diff --git a/layouts/layouts/partials/share_icons.html b/layouts/layouts/partials/share_icons.html new file mode 100644 index 0000000..910ba7f --- /dev/null +++ b/layouts/layouts/partials/share_icons.html @@ -0,0 +1,95 @@ +{{- $pageurl := .Permalink }} +{{- $title := .Title }} + +{{- $.Scratch.Set "tags" ""}} + +{{- with .Params.Tags }} +{{- $hashtags := newScratch}} +{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} +{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} +{{- end -}} + +{{- $custom := false }} +{{- $ShareButtons := (.Param "ShareButtons")}} +{{- with $ShareButtons }}{{ $custom = true }}{{ end }} + + diff --git a/layouts/layouts/partials/social_icons.html b/layouts/layouts/partials/social_icons.html new file mode 100644 index 0000000..ce76a30 --- /dev/null +++ b/layouts/layouts/partials/social_icons.html @@ -0,0 +1,8 @@ + diff --git a/layouts/layouts/partials/svg.html b/layouts/layouts/partials/svg.html new file mode 100644 index 0000000..941c4a0 --- /dev/null +++ b/layouts/layouts/partials/svg.html @@ -0,0 +1,988 @@ +{{- $icon_name := ( trim .name " " | lower )}} +{{- if (eq $icon_name "123rf") -}} + + + + +{{- else if (eq $icon_name "500px") -}} + + + +{{- else if (eq $icon_name "adobestock") -}} + + + + +{{- else if (eq $icon_name "anilist") -}} + + + +{{- else if or (eq $icon_name "ao3") (eq $icon_name "archiveofourown") -}} + + + + + + +{{- else if (eq $icon_name "applemusic") -}} + + + +{{- else if (eq $icon_name "applepodcasts") -}} + + + +{{- else if (eq $icon_name "bandcamp") -}} + + + +{{- else if (eq $icon_name "behance") -}} + + + +{{- else if (eq $icon_name "bilibili") -}} + + + + + + + +{{- else if (eq $icon_name "bitcoin") -}} + + + +{{- else if (eq $icon_name "bluesky") -}} + + + +{{- else if (eq $icon_name "bookwyrm") -}} + + + +{{- else if (eq $icon_name "bugcrowd") -}} + + + +{{- else if (eq $icon_name "buttondown") -}} + + + + + + + + + + +{{- else if (eq $icon_name "buymeacoffee") -}} + + + + + + + + + + + + + + + + +{{- else if (eq $icon_name "codeberg") -}} + + + +{{- else if (eq $icon_name "codeforces") -}} + + + +{{- else if (eq $icon_name "codepen") -}} + + + + + + + +{{- else if (eq $icon_name "credly") -}} + + + +{{- else if (eq $icon_name "cryptohack") -}} + + + + + + +{{- else if (eq $icon_name "ctftime") -}} + + + + + + +{{- else if (eq $icon_name "cv") -}} + + + + + + +{{- else if (eq $icon_name "deezer") -}} + + + +{{- else if (eq $icon_name "dev") -}} + + + +{{- else if (eq $icon_name "deviantart") -}} + + + +{{- else if (eq $icon_name "discogs") -}} + + + +{{- else if (eq $icon_name "discord") -}} + + + +{{- else if (eq $icon_name "douban") -}} + + + + + +{{- else if (eq $icon_name "dreamstime") -}} + + + +{{- else if (eq $icon_name "dribbble") -}} + + + + + +{{- else if (eq $icon_name "dzen") -}} + + + +{{- else if (eq $icon_name "email") -}} + + + + +{{- else if (eq $icon_name "ethereum") -}} + + + +{{- else if (eq $icon_name "exercism") -}} + + + + +{{- else if (eq $icon_name "facebook") -}} + + + +{{- else if (eq $icon_name "farcaster") -}} + + + + + +{{- else if (eq $icon_name "fediverse") -}} + + + + + + + + + + +{{- else if (eq $icon_name "firefish") -}} + + + +{{- else if (eq $icon_name "flickr") -}} + + + +{{- else if (eq $icon_name "forgejo") -}} + + + +{{- else if (eq $icon_name "freepik") -}} + + + + + + +{{- else if (eq $icon_name "git") -}} + + + +{{- else if (eq $icon_name "gitea") -}} + + + +{{- else if (eq $icon_name "github") -}} + + + + +{{- else if (eq $icon_name "gitlab") -}} + + + + +{{- else if (eq $icon_name "goodreads") -}} + + + +{{- else if (eq $icon_name "googleplaystore") -}} + + + +{{- else if (eq $icon_name "googlepodcasts") -}} + + + +{{- else if (eq $icon_name "googlescholar") -}} + + + +{{- else if (eq $icon_name "gurushots") -}} + + + + + + + + + + + + +{{- else if (eq $icon_name "hackerone") -}} + + + +{{- else if (eq $icon_name "hackerrank") -}} + + + + + + +{{- else if (eq $icon_name "hackthebox") -}} + + + + + + +{{- else if (eq $icon_name "imdb") -}} + + + +{{- else if (eq $icon_name "instagram") -}} + + + + + +{{- else if (eq $icon_name "intigriti") -}} + + + +{{- else if (eq $icon_name "itchio") -}} + + + +{{- else if (eq $icon_name "juejin") -}} + + + +{{- else if (eq $icon_name "kaggle") -}} + + + +{{- else if (eq $icon_name "kakaotalk") -}} + + + + + + + +{{- else if (eq $icon_name "keybase") -}} + + + +{{- else if (eq $icon_name "keyoxide") -}} + + + + +{{- else if (eq $icon_name "kofi") -}} + + + +{{- else if (eq $icon_name "komoot") -}} + + + +{{- else if (eq $icon_name "lastfm") -}} + + + +{{- else if (eq $icon_name "leetcode") -}} + + + +{{- else if (eq $icon_name "letterboxd") -}} + + + +{{- else if (eq $icon_name "liberapay") -}} + + + + + + +{{- else if (eq $icon_name "lichess" ) -}} + + + +{{- else if (eq $icon_name "linkedin") -}} + + + + + +{{- else if (eq $icon_name "linktree") -}} + + + +{{- else if (eq $icon_name "mastodon") -}} + + + + +{{- else if (eq $icon_name "matrix") -}} + + + +{{- else if (eq $icon_name "medium") -}} + + + + + +{{- else if (eq $icon_name "microblog") -}} + + + + + + +{{- else if (eq $icon_name "mixcloud") -}} + + + +{{- else if (eq $icon_name "monero") -}} + + + +{{- else if (eq $icon_name "neteasecloudmusic") -}} + + + +{{- else if (eq $icon_name "nextcloud") -}} + + + +{{- else if (eq $icon_name "nuget") -}} + + + + + + + + +{{- else if (eq $icon_name "orcid") -}} + + + +{{- else if (eq $icon_name "osu!") -}} + + + + + + +{{- else if (eq $icon_name "overcast") -}} + + + +{{- else if (eq $icon_name "patreon") -}} + + + + + + +{{- else if (eq $icon_name "paypal") -}} + + + +{{- else if (eq $icon_name "peertube") -}} + + + +{{- else if or (eq $icon_name "pgpkey") (eq $icon_name "key") -}} + + + + +{{- else if (eq $icon_name "phone") -}} + + + + + +{{- else if (eq $icon_name "pinterest") -}} + + + +{{- else if (eq $icon_name "pixelfed") -}} + + + +{{- else if (eq $icon_name "pleroma") -}} + + + +{{- else if (eq $icon_name "pocketcasts") -}} + + + +{{- else if (eq $icon_name "printables") -}} + + + +{{- else if (eq $icon_name "qq") -}} + + + + +{{- else if (eq $icon_name "reddit") -}} + + + +{{- else if (eq $icon_name "raycast") -}} + + + +{{- else if (eq $icon_name "researchgate") -}} + + + +{{- else if (eq $icon_name "rootme") -}} + + + + + + + + +{{- else if (eq $icon_name "rss") -}} + + + + + +{{- else if (eq $icon_name "serverfault") -}} + + + +{{- else if (eq $icon_name "sessionmessenger") -}} + + + + +{{- else if (eq $icon_name "shutterstock") -}} + + + + +{{- else if (eq $icon_name "signal") -}} + + + +{{- else if (eq $icon_name "sketchfab") -}} + + + +{{- else if (eq $icon_name "slack") -}} + + + + + + + +{{- else if (eq $icon_name "snapchat") -}} + + + +{{- else if (eq $icon_name "soundcloud") -}} + + + +{{- else if (eq $icon_name "sourcehut") -}} + + + + +{{- else if (eq $icon_name "spacehey") -}} + + + + + +{{- else if (eq $icon_name "spotify") -}} + + + +{{- else if (eq $icon_name "stackoverflow") -}} + + + +{{- else if (eq $icon_name "steam") -}} + + + + + + + + + +{{- else if (eq $icon_name "strava") -}} + + + + +{{- else if (eq $icon_name "substack") -}} + + + +{{- else if (eq $icon_name "tableau") -}} + + + + + + + + + + +{{- else if (eq $icon_name "telegram") -}} + + + +{{- else if (eq $icon_name "thingiverse") -}} + + + +{{- else if (eq $icon_name "threads") -}} + + + + +{{- else if (eq $icon_name "threema") -}} + + + + +{{- else if (eq $icon_name "tidal") -}} + + + +{{- else if (eq $icon_name "tiktok") -}} + + + +{{- else if (eq $icon_name "tryhackme") -}} + + + +{{- else if (eq $icon_name "tumblr") -}} + + + +{{- else if (eq $icon_name "twitch") -}} + + + +{{- else if (eq $icon_name "twitter") -}} + + + + +{{- else if (eq $icon_name "unsplash") -}} + + + + +{{- else if (eq $icon_name "vimeo") -}} + + + +{{- else if or (eq $icon_name "vk") (eq $icon_name "vkontakte") -}} + + + +{{- else if (eq $icon_name "wantedly") -}} + + + +{{- else if (eq $icon_name "wechat") -}} + + + + +{{- else if (eq $icon_name "whatsapp") -}} + + + +{{- else if or (eq $icon_name "wikipedia") (eq $icon_name "wiki") -}} + + + + +{{- else if (eq $icon_name "wordpress") -}} + + + +{{- else if (eq $icon_name "x") -}} + + + + +{{- else if (eq $icon_name "xda") -}} + + + +{{- else if (eq $icon_name "xing") -}} + + + + +{{- else if (eq $icon_name "xmpp") -}} + + + + +{{- else if (eq $icon_name "ycombinator") -}} + + + +{{- else if (eq $icon_name "youtube") -}} + + + + + +{{- else if (eq $icon_name "zcal") -}} + + + +{{- else if (eq $icon_name "zhihu") -}} + + + +{{- else if (eq $icon_name "jamendo") -}} + + + + + + + +{{- else if $icon_name -}} + + + + +{{- end -}} diff --git a/layouts/layouts/partials/templates/_funcs/get-page-images.html b/layouts/layouts/partials/templates/_funcs/get-page-images.html new file mode 100644 index 0000000..268ceb4 --- /dev/null +++ b/layouts/layouts/partials/templates/_funcs/get-page-images.html @@ -0,0 +1,47 @@ +{{- $imgs := slice }} +{{- $imgParams := .Params.images }} +{{- $resources := .Resources.ByType "image" -}} +{{/* Find featured image resources if the images parameter is empty. */}} +{{- if not $imgParams }} + {{- $featured := $resources.GetMatch "*feature*" -}} + {{- if not $featured }}{{ $featured = $resources.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{- with $featured }} + {{- $imgs = $imgs | append (dict + "Image" . + "RelPermalink" .RelPermalink + "Permalink" .Permalink) }} + {{- end }} +{{- end }} +{{/* Use the first one of site images as the fallback. */}} +{{- if and (not $imgParams) (not $imgs) }} + {{- with site.Params.images }} + {{- $imgParams = first 1 . }} + {{- end }} +{{- end }} +{{/* Parse page's images parameter. */}} +{{- range $imgParams }} + {{- $img := . }} + {{- $url := urls.Parse $img }} + {{- if eq $url.Scheme "" }} + {{/* Internal image. */}} + {{- with $resources.GetMatch $img -}} + {{/* Image resource. */}} + {{- $imgs = $imgs | append (dict + "Image" . + "RelPermalink" .RelPermalink + "Permalink" .Permalink) }} + {{- else }} + {{- $imgs = $imgs | append (dict + "RelPermalink" (relURL $img) + "Permalink" (absURL $img) + ) }} + {{- end }} + {{- else }} + {{/* External image */}} + {{- $imgs = $imgs | append (dict + "RelPermalink" $img + "Permalink" $img + ) }} + {{- end }} +{{- end }} +{{- return $imgs }} diff --git a/layouts/layouts/partials/templates/opengraph.html b/layouts/layouts/partials/templates/opengraph.html new file mode 100644 index 0000000..fe5bf53 --- /dev/null +++ b/layouts/layouts/partials/templates/opengraph.html @@ -0,0 +1,86 @@ + + +{{- with or site.Title site.Params.title | plainify }} + +{{- end }} + +{{- with or .Title site.Title site.Params.title | plainify }} + +{{- end }} + +{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }} + +{{- end }} + +{{- with or .Params.locale site.Language.LanguageCode site.Language.Lang }} + +{{- end }} + +{{- if .IsPage }} + + {{- with .Section }} + + {{- end }} + {{- $ISO8601 := "2006-01-02T15:04:05-07:00" }} + {{- with .PublishDate }} + + {{- end }} + {{- with .Lastmod }} + + {{- end }} + {{- range .GetTerms "tags" | first 6 }} + + {{- end }} +{{- else }} + +{{- end }} + +{{- if .Params.cover.image -}} + {{- if (ne .Params.cover.relative true) }} + + {{- else}} + + {{- end}} +{{- else }} + {{- with partial "_funcs/get-page-images" . }} + {{- range . | first 6 }} + + {{- end }} + {{- end }} +{{- end }} + +{{- with .Params.audio }} + {{- range . | first 6 }} + + {{- end }} +{{- end }} + +{{- with .Params.videos }} + {{- range . | first 6 }} + + {{- end }} +{{- end }} + +{{- range .GetTerms "series" }} + {{- range .Pages | first 7 }} + {{- if ne $ . }} + + {{- end }} + {{- end }} +{{- end }} + +{{- with site.Params.social }} + {{- if reflect.IsMap . }} + {{- with .facebook_app_id }} + + {{- else }} + {{- with .facebook_admin }} + + {{- end }} + {{- end }} + {{- end }} +{{- end }} + +{{- with (.Param "social.fediverse_creator") }} + +{{- end }} diff --git a/layouts/layouts/partials/templates/schema_json.html b/layouts/layouts/partials/templates/schema_json.html new file mode 100644 index 0000000..8a4efb4 --- /dev/null +++ b/layouts/layouts/partials/templates/schema_json.html @@ -0,0 +1,128 @@ +{{ if .IsHome }} + +{{- else if (or .IsPage .IsSection) }} +{{/* BreadcrumbList */}} +{{- $url := replace .Parent.Permalink ( printf "%s" site.Home.Permalink) "" }} +{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }} +{{- $bc_list := (split $lang_url "/")}} + +{{- $scratch := newScratch }} + +{{- if .IsPage }} + +{{- end }}{{/* .IsPage end */}} + +{{- end -}} diff --git a/layouts/layouts/partials/templates/twitter_cards.html b/layouts/layouts/partials/templates/twitter_cards.html new file mode 100644 index 0000000..a6e1d05 --- /dev/null +++ b/layouts/layouts/partials/templates/twitter_cards.html @@ -0,0 +1,31 @@ +{{- if .Params.cover.image -}} + +{{- if (ne $.Params.cover.relative true) }} + +{{- else }} + +{{- end}} +{{- else }} +{{- $images := partial "templates/_funcs/get-page-images" . -}} +{{- with index $images 0 -}} + + +{{- else -}} + +{{- end -}} +{{- end }} + + + +{{- $twitterSite := "" }} +{{- with site.Params.social }} + {{- if reflect.IsMap . }} + {{- with .twitter }} + {{- $content := . }} + {{- if not (strings.HasPrefix . "@") }} + {{- $content = printf "@%v" . }} + {{- end }} + + {{- end }} + {{- end }} +{{- end }} diff --git a/layouts/layouts/partials/toc.html b/layouts/layouts/partials/toc.html new file mode 100644 index 0000000..28f8694 --- /dev/null +++ b/layouts/layouts/partials/toc.html @@ -0,0 +1,97 @@ +{{- $headers := findRE "(.|\n])+?
" .Content -}} +{{- $has_headers := ge (len $headers) 1 -}} +{{- if $has_headers -}} +
+
+ + {{- i18n "toc" | default "Table of Contents" }} + + +
+ {{- if (.Param "UseHugoToc") }} + {{- .TableOfContents -}} + {{- else }} + {{- $largest := 6 -}} + {{- range $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + {{- if lt $headerLevel $largest -}} + {{- $largest = $headerLevel -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} + + {{- $.Scratch.Set "bareul" slice -}} +
    + {{- range seq (sub $firstHeaderLevel $largest) -}} +
      + {{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}} + {{- end -}} + {{- range $i, $header := $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + + {{/* get id="xyz" */}} + {{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }} + + {{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}} + {{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }} + {{- $header := replaceRE "((.|\n])+?)" "$1" $header -}} + + {{- if ne $i 0 -}} + {{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}} + {{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}} + {{- if gt $headerLevel $prevHeaderLevel -}} + {{- range seq $prevHeaderLevel (sub $headerLevel 1) -}} +
        + {{/* the first should not be recorded */}} + {{- if ne $prevHeaderLevel . -}} + {{- $.Scratch.Add "bareul" . -}} + {{- end -}} + {{- end -}} + {{- else -}} + + {{- if lt $headerLevel $prevHeaderLevel -}} + {{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}} + {{- if in ($.Scratch.Get "bareul") . -}} +
      + {{/* manually do pop item */}} + {{- $tmp := $.Scratch.Get "bareul" -}} + {{- $.Scratch.Delete "bareul" -}} + {{- $.Scratch.Set "bareul" slice}} + {{- range seq (sub (len $tmp) 1) -}} + {{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}} + {{- end -}} + {{- else -}} +
    + + {{- end -}} + {{- end -}} + {{- end -}} + {{- end }} +
  • + {{- $header | plainify | safeHTML -}} + {{- else }} +
  • + {{- $header | plainify | safeHTML -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := $largest }} + {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }} +
  • + {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}} + {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }} +
+ {{- else }} + + + {{- end -}} + {{- end }} + + {{- end }} +
+
+
+{{- end }} diff --git a/layouts/layouts/partials/translation_list.html b/layouts/layouts/partials/translation_list.html new file mode 100644 index 0000000..0028251 --- /dev/null +++ b/layouts/layouts/partials/translation_list.html @@ -0,0 +1,19 @@ +{{- if .IsTranslated -}} +{{- if (ne .Layout "search") }} +{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}} +{{- end }} +{{- i18n "translations" | default "Translations" }}: + +{{- end -}} diff --git a/layouts/layouts/robots.txt b/layouts/layouts/robots.txt new file mode 100644 index 0000000..f26f508 --- /dev/null +++ b/layouts/layouts/robots.txt @@ -0,0 +1,7 @@ +User-agent: * +{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +Disallow: +{{- else }} +Disallow: / +{{- end }} +Sitemap: {{ "sitemap.xml" | absURL }} diff --git a/layouts/layouts/shortcodes/collapse.html b/layouts/layouts/shortcodes/collapse.html new file mode 100644 index 0000000..17d8d3b --- /dev/null +++ b/layouts/layouts/shortcodes/collapse.html @@ -0,0 +1,8 @@ +{{ if .Get "summary" }} +{{ else }} +{{ warnf "missing value for param 'summary': %s" .Position }} +{{ end }} +

+ {{ .Get "summary" | markdownify }} + {{ .Inner | markdownify }} +

diff --git a/layouts/layouts/shortcodes/figure.html b/layouts/layouts/shortcodes/figure.html new file mode 100644 index 0000000..8c93eff --- /dev/null +++ b/layouts/layouts/shortcodes/figure.html @@ -0,0 +1,31 @@ + + {{- if .Get "link" -}} + + {{- end }} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} + {{ . }} + {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + diff --git a/layouts/layouts/shortcodes/inTextImg.html b/layouts/layouts/shortcodes/inTextImg.html new file mode 100644 index 0000000..0239fd6 --- /dev/null +++ b/layouts/layouts/shortcodes/inTextImg.html @@ -0,0 +1,5 @@ +{{- $Img := (.Get "url") }} +{{- $height := (.Get "height") }} +{{- $alt := (.Get "alt") }} + +{{$alt}} diff --git a/layouts/layouts/shortcodes/ltr.html b/layouts/layouts/shortcodes/ltr.html new file mode 100644 index 0000000..4ad7682 --- /dev/null +++ b/layouts/layouts/shortcodes/ltr.html @@ -0,0 +1,15 @@ +{{ $.Scratch.Set "md" false }} + +{{ if .IsNamedParams }} +{{ $.Scratch.Set "md" (.Get "md") }} +{{ else }} +{{ $.Scratch.Set "md" (.Get 0) }} +{{ end }} + +
+ {{ if eq ($.Scratch.Get "md") false }} + {{ .Inner }} + {{ else }} + {{ .Inner | markdownify }} + {{ end }} +
diff --git a/layouts/layouts/shortcodes/rawhtml.html b/layouts/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..9350c13 --- /dev/null +++ b/layouts/layouts/shortcodes/rawhtml.html @@ -0,0 +1,2 @@ + +{{- .Inner -}} \ No newline at end of file diff --git a/layouts/layouts/shortcodes/rtl.html b/layouts/layouts/shortcodes/rtl.html new file mode 100644 index 0000000..a69b8ce --- /dev/null +++ b/layouts/layouts/shortcodes/rtl.html @@ -0,0 +1,15 @@ +{{ $.Scratch.Set "md" false }} + +{{ if .IsNamedParams }} +{{ $.Scratch.Set "md" (.Get "md") }} +{{ else }} +{{ $.Scratch.Set "md" (.Get 0) }} +{{ end }} + +
+ {{ if eq ($.Scratch.Get "md") false }} + {{ .Inner }} + {{ else }} + {{ .Inner | markdownify }} + {{ end }} +
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 38fbd24..52fb753 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -50,14 +50,14 @@ {{ end }}{{ end }} {{- end }} -{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}} +{{- /* Deprecate site.Params.Social.facebook_admin in favor of site.Params.social.facebook_admin */}} {{- $facebookAdmin := "" }} {{- with site.Params.social }} {{- if reflect.IsMap . }} {{- $facebookAdmin = .facebook_admin }} {{- end }} {{- else }} - {{- with site.Social.facebook_admin }} + {{- with site.Params.Social.facebook_admin }} {{- $facebookAdmin = . }} {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} {{- end }} diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html index 0e7760a..e361de6 100644 --- a/layouts/partials/templates/twitter_cards.html +++ b/layouts/partials/templates/twitter_cards.html @@ -28,14 +28,14 @@ {{- end }} -{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}} +{{- /* Deprecate site.Params.Social.twitter in favor of site.Params.social.twitter */}} {{- $twitterSite := "" }} {{- with site.Params.social }} {{- if reflect.IsMap . }} {{- $twitterSite = .twitter }} {{- end }} {{- else }} - {{- with site.Social.twitter }} + {{- with site.Params.Social.twitter }} {{- $twitterSite = . }} {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} {{- end }} diff --git a/resources/_gen/images/images/blackwolf_hu_b1f5413bfccaa29e.webp b/resources/_gen/images/images/blackwolf_hu_b1f5413bfccaa29e.webp new file mode 100644 index 0000000000000000000000000000000000000000..f2842b3ef926bdb21624823a1c28ba7815efa534 GIT binary patch literal 346 zcmV-g0j2&@Nk&Fe0RRA3MM6+kP&gn)0RR9{4FH`1DwY7206wKsqD!M9p^;7eSThPl z^tW!WyMZoB7!%3)GTSZh?4>OS0mK5ai-MsS`+za33o{S}Kh$~%N4m(*if6fA$gFSO zlyQFAgAVJzt{;W&R1y*ci%w`Ko?NaiIW8pYi%zX_R24YP$^ZcV@KY2;hI|BNV0A;k zOqrteww!8+9mpZil1L1pjY|YNgQQ#nZ@Gt4?NN1H#O>cZOS)xCD;yN7!|sJDfWiR$ z^F&P()k|xiU?)Um_Zy>+=+|^tnIIcHW+X+v{qA5+)wO9pQS=2sw-b>MtrMp;)ij&{ z*#~sMMiGv%xOb7{Ax2CDSuIDUTsnC$t@h|DF;dS!UW7an;Vs`}>Oll)q9H4_u(Rn& sjv`W;_BPBt>6CooD?gQT$;YD%o&sz%Iz6&6Mul^M#~dJz83*710CoeElmGw# literal 0 HcmV?d00001