diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index c29d821..87a418c 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -17,7 +17,7 @@ categories: - 'feature' - 'enhancement' -- title: 'New Translations' +- title: 'Translations' label: 'translation' - title: 'Bug Fixes' diff --git a/.github/workflows/autoprefixer.yml b/.github/workflows/autoprefixer.yml index 5053443..33dbfb7 100644 --- a/.github/workflows/autoprefixer.yml +++ b/.github/workflows/autoprefixer.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2.3.4 - name: Setup Node - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2.4.0 with: node-version: "15.x" diff --git a/.github/workflows/md-link-checker.yml b/.github/workflows/md-link-checker.yml index 43015db..778d760 100644 --- a/.github/workflows/md-link-checker.yml +++ b/.github/workflows/md-link-checker.yml @@ -10,4 +10,4 @@ jobs: # checkout to latest commit - uses: actions/checkout@master # run markdown linter - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.12 + - uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 diff --git a/i18n/bn.toml b/i18n/bn.toml index 17508ec..c0567aa 100644 --- a/i18n/bn.toml +++ b/i18n/bn.toml @@ -30,7 +30,7 @@ other = "ইমেইল নোটিফিকেশান এর মাধ্ other = "ইমেইল প্রবেশ করান" [newsletter_warning] -other = "আমরা আপনার ইমেল অন্য কারও সাথে শেয়ার করব না।" +other = "আপনার ইমেইল ঠিকানা প্রবেশের মাধমে আপনি এই ওয়েবসাইটের নিউজ লেটার পেতে সম্মত হচ্ছেন।" [submit] other = "জমা দিন" diff --git a/i18n/de.toml b/i18n/de.toml index 8583769..b9e3ada 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -33,7 +33,7 @@ other = "Mit dem Newsletter auf dem neuesten Stand bleiben" other = "E-Mail Adresse eingeben" [newsletter_warning] -other = "Wir geben deine E-Mail Adresse nicht an Dritte weiter." +other = "Mit der Eingabe Ihrer E-Mail-Adresse erklären Sie sich damit einverstanden, den Newsletter dieser Website zu erhalten." [submit] other = "Absenden" diff --git a/i18n/en.toml b/i18n/en.toml index 564b640..8c8463e 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -33,7 +33,7 @@ other = "Stay up to date with email notification" other = "Enter email" [newsletter_warning] -other = "We'll never share your email with anyone else." +other = "By entering your email address, you agree to receive the newsletter of this website." [submit] other = "Submit" diff --git a/i18n/es.toml b/i18n/es.toml index 62ed93f..1701fa6 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -33,7 +33,7 @@ other = "Subscribirse" other = "Ingrese email" [newsletter_warning] -other = "Jamás compartiremos tus datos con alguién mas" +other = "Al ingresar su dirección de correo electrónico, acepta recibir el boletín de este sitio web." [submit] other = "Enviar" diff --git a/i18n/fr.toml b/i18n/fr.toml index 97c17cb..ae1b4e9 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -3,7 +3,7 @@ other = "Accueil" [posts] -other = "Des postes" +other = "Articles" [toc_heading] other = "Table des matières" @@ -33,7 +33,7 @@ other = "Restez à jour par e-mail" other = "Entrez une adresse e-mail" [newsletter_warning] -other = "Nous ne partagerons jamais votre courriel avec quelqu'un d'autre." +other = "En renseignant votre adresse e-mail, vous acceptez de recevoir la newsletter de ce site." [submit] other = "Envoyer" @@ -89,8 +89,8 @@ other = "Montrer moins" # [comments_by] # other = "comments powered by" -# [read] -# other = "Read" +[read] +other = "Lire" # [project_star] # other = "Star" diff --git a/i18n/hi.toml b/i18n/hi.toml index e5f4ac9..c0c47f5 100644 --- a/i18n/hi.toml +++ b/i18n/hi.toml @@ -33,7 +33,7 @@ other = "ईमेल अधिसूचना से अवगत रहें" other = "ईमेल दर्ज करें" [newsletter_warning] -other = "हम आपके ईमेल को कभी भी किसी और के साथ साझा नहीं करेंगे" +other = "अपना ईमेल पता दर्ज करके, आप इस वेबसाइट का न्यूज़लेटर प्राप्त करने के लिए सहमत होते हैं।" [submit] other = "जमा करें" diff --git a/i18n/id.toml b/i18n/id.toml index ff8b61f..9af6324 100644 --- a/i18n/id.toml +++ b/i18n/id.toml @@ -33,7 +33,7 @@ other = "Ingin selalu update dengan notifikasi email" other = "Masukkan email" [newsletter_warning] -other = "Kami tidak pernah berbagi data email dengan siapapun." +other = "Dengan memasukkan alamat email Anda, Anda setuju untuk menerima buletin situs web ini." [submit] other = "Kirim" diff --git a/i18n/it.toml b/i18n/it.toml index 882a9d5..c18826f 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -33,7 +33,7 @@ other = "Resta aggiornato con la notifica di email" other = "Inserisci l'email" [newsletter_warning] -other = "Non condivideremo l'email con altri." +other = "Inserendo il tuo indirizzo email, accetti di ricevere la newsletter di questo sito." [submit] other = "Invia" diff --git a/i18n/jp.toml b/i18n/jp.toml index 2a1cdac..10e3769 100644 --- a/i18n/jp.toml +++ b/i18n/jp.toml @@ -30,7 +30,7 @@ other = "メールで最新情報を受け取る" other = "ここにメールアドレスを入力" [newsletter_warning] -other = "ご入力いただいたメールアドレスが他人に開示されることは決してございません。" +other = "メールアドレスを入力すると、このウェブサイトのニュースレターを受け取ることに同意したことになります。" [submit] other = "登録" diff --git a/i18n/ko.toml b/i18n/ko.toml index 3f90b2d..c58fe9c 100644 --- a/i18n/ko.toml +++ b/i18n/ko.toml @@ -33,7 +33,7 @@ other = "이메일 알림으로 최신 상태를 유지해보세요" other = "이메일을 입력하세요" [newsletter_warning] -other = "이메일을 다른 목적으로 사용하지 않습니다." +other = "이메일 주소를 입력하면이 웹 사이트의 뉴스 레터 수신에 동의하는 것입니다." [submit] other = "제출" diff --git a/i18n/nl.toml b/i18n/nl.toml index 41bb2ca..19e7936 100644 --- a/i18n/nl.toml +++ b/i18n/nl.toml @@ -32,7 +32,7 @@ other = "Mit dem Newsletter auf dem neuesten Stand bleiben" other = "E-Mail-Adresse eingeben" [newsletter_warning] -other = "Wir werden Ihre E-Mail-Adresse nicht an Dritte weitergeben." +other = "Door uw e-mailadres in te voeren, gaat u akkoord met het ontvangen van de nieuwsbrief van deze website." [submit] other = "Absenden" diff --git a/i18n/ru.toml b/i18n/ru.toml index 86549ec..b2b3f60 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -33,7 +33,7 @@ other = "Подпишитесь на уведомления, чтобы не п other = "Введите email" [newsletter_warning] -other = "Ваши данные в безопасности" +other = "Вводя свой адрес электронной почты, вы соглашаетесь получать информационный бюллетень этого веб-сайта." [submit] other = "Подтвердить" diff --git a/i18n/vn.toml b/i18n/vn.toml index 4a03d00..cd32f2b 100644 --- a/i18n/vn.toml +++ b/i18n/vn.toml @@ -33,7 +33,7 @@ other = "Nhận email cập nhật thông tin" other = "Nhập email" [newsletter_warning] -other = "Chúng tôi sẽ không bao giờ chia sẻ email của bạn." +other = "Bằng cách nhập địa chỉ email của bạn, bạn đồng ý nhận bản tin của trang web này." [submit] other = "Gửi" diff --git a/i18n/cn.toml b/i18n/zh-cn.toml similarity index 70% rename from i18n/cn.toml rename to i18n/zh-cn.toml index 1a26020..3f8b6e4 100644 --- a/i18n/cn.toml +++ b/i18n/zh-cn.toml @@ -33,7 +33,7 @@ other = "通过电子邮件接收最新信息" other = "填入 E-mail" [newsletter_warning] -other = "我们绝不会与任何人共享您的电子邮件。" +other = "输入您的电子邮件地址,即表示您同意接收本网站的时事通讯" [submit] other = "提交" @@ -77,29 +77,29 @@ other = "查看更多" [show_less] other = "显示较少" -# [responsibilities] -# other = "Responsibilities:" +[responsibilities] +other = "职责:" -# [present] -# other = "Present" +[present] +other = "至今" -# [comments_javascript] -# other = "Please enable JavaScript to view the" +[comments_javascript] +other = "请启用 JavaScript 以查看" -# [comments_by] -# other = "comments powered by" +[comments_by] +other = "评论支持 by" -# [read] -# other = "Read" +[read] +other = "阅读" -# [project_star] -# other = "Star" +[project_star] +other = "Star" -# [project_details] -# other = "Details" +[project_details] +other = "详情" -# [err_404] -# other = "The page you are looking for is not there yet." +[err_404] +other = "您查找的页面已私奔。" [more] other = "更多的" @@ -111,4 +111,4 @@ other = "查看证书" other = "笔记" [disclaimer_text] -other = "责任通知" +other = "免责声明" diff --git a/i18n/zh-tw.toml b/i18n/zh-tw.toml new file mode 100644 index 0000000..3efc426 --- /dev/null +++ b/i18n/zh-tw.toml @@ -0,0 +1,114 @@ +# More documentation here: https://github.com/nicksnyder/go-i18n +[home] +other = "首頁" + +[posts] +other = "文章" + +[toc_heading] +other = "目錄" + +[at] +other = "at" + +[resume] +other = "履歷" + +[navigation] +other = "導覽列" + +[contact_me] +other = "聯絡方式:" + +[email] +other = "信箱" + +[phone] +other = "電話" + +[newsletter_text] +other = "通過電子郵件接收最新消息" + +[newsletter_input_placeholder] +other = "在此輸入您的電子郵件地址" + +[newsletter_warning] +other = "輸入您的電子郵件地址,即表示您同意接受本網站的最新消息" + +[submit] +other = "提交" + +[hugoAttributionText] +other = "Powered by" + +[prev] +other = "上一篇" + +[next] +other = "下一篇" + +[improve_this_page] +other = "改善此頁面" + +[out_of] +other = "/" + +[publications] +other = "出版" + +[taken_courses] +other = "修習課程" + +[course_name] +other = "課程名稱" + +[total_credit] +other = "總分" + +[obtained_credit] +other = "獲得學分" + +[extracurricular_activities] +other = "課外活動" + +[show_more] +other = "查看更多" + +[show_less] +other = "顯示較少" + +# [responsibilities] +# other = "Responsibilities:" + +# [present] +# other = "Present" + +# [comments_javascript] +# other = "Please enable JavaScript to view the" + +# [comments_by] +# other = "comments powered by" + +# [read] +# other = "Read" + +# [project_star] +# other = "Star" + +# [project_details] +# other = "Details" + +# [err_404] +# other = "The page you are looking for is not there yet." + +[more] +other = "更多的" + +[view_certificate] +other = "查看證書" + +[notes] +other = "筆記" + +[disclaimer_text] +other = "免責聲明" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f733092..af3faed 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,13 +4,20 @@ {{ .Page.Title }} {{- partial "header.html" . -}} + {{ template "_internal/opengraph.html" . }} {{ block "header" . }} {{ end }} {{ if site.GoogleAnalytics }} - {{ template "_internal/google_analytics_async.html" . }} + + {{ if hasPrefix site.GoogleAnalytics "UA-"}} + {{ template "_internal/google_analytics_async.html" . }} + {{ else }} + + {{ template "_internal/google_analytics.html" . }} + {{ end }} {{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1e8ac50..8367014 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,9 @@ {{ define "header" }} + + + {{ end }} {{ define "navbar" }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html index e4f7414..42620da 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -1,6 +1,9 @@ {{ define "header" }} + + + {{ end }} {{ define "navbar" }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 907818d..7c57187 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,6 +6,9 @@ /> + + + {{ end }} {{ define "navbar" }} diff --git a/layouts/index.html b/layouts/index.html index 9a5d5dd..634504f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,6 +13,7 @@ {{- partial "header.html" . -}} + {{- partial "opengraph.html" . -}} @@ -24,10 +25,19 @@ + + + {{ if site.GoogleAnalytics }} - {{ template "_internal/google_analytics_async.html" . }} + + {{ if hasPrefix site.GoogleAnalytics "UA-"}} + {{ template "_internal/google_analytics_async.html" . }} + {{ else }} + + {{ template "_internal/google_analytics.html" . }} + {{ end }} {{ end }} diff --git a/layouts/partials/cards/project.html b/layouts/partials/cards/project.html index 93d022d..cdf33bf 100644 --- a/layouts/partials/cards/project.html +++ b/layouts/partials/cards/project.html @@ -11,7 +11,10 @@ {{ $logoImage:= resources.Get .logo}} {{ if $logoImage }} - {{ $logoImage := $logoImage.Fit "24x24" }} + {{/* svg don't support "Fit" operation */}} + {{ if ne $logoImage.MediaType.SubType "svg" }} + {{ $logoImage = $logoImage.Fit "24x24" }} + {{ end }} {{ .name }} {{ end }} diff --git a/layouts/partials/cards/skill.html b/layouts/partials/cards/skill.html index 1cf229f..cba5529 100644 --- a/layouts/partials/cards/skill.html +++ b/layouts/partials/cards/skill.html @@ -7,7 +7,7 @@ {{/* svg don't support "Fit" operation */}} {{ if ne $logoImage.MediaType.SubType "svg" }} - {{ $logoImage := $logoImage.Fit "24x24" }} + {{ $logoImage = $logoImage.Fit "24x24" }} {{ end }} {{ .name }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index d4bde35..af771d0 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -137,7 +137,7 @@ {{ if and $disclaimerEnabled $disclaimer}}
-

{{ i18n "disclaimer_text" }}: {{ $disclaimer }}

+

{{ i18n "disclaimer_text" }}: {{ $disclaimer | markdownify }}

{{ end }} {{ if $credentialsEnabled }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f979cd4..7568437 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,18 +1,3 @@ -{{/* default favicon */}} -{{ $favicon := "/images/favicon.png" }} - -{{/* if favicon is provided in the config, then use that */}} -{{ if site.Params.logo.favicon }} - {{ $favicon = site.Params.logo.favicon }} -{{ end }} - -{{/* resize the favicon. don't resize svg because it is not supported */}} -{{ $favicon := resources.Get $favicon }} -{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }} - {{ $favicon = $favicon.Resize "42x" }} -{{ end }} -{{ $favicon = $favicon.RelPermalink}} - @@ -20,7 +5,6 @@ - @@ -30,7 +14,16 @@ - +{{/* add favicon only if the site author has provided the the favicon */}} +{{ if site.Params.logo.favicon }} + {{ $favicon := site.Params.logo.favicon }} - - + {{/* resize the favicon. don't resize svg because it is not supported */}} + {{ $favicon = resources.Get $favicon }} + {{ if and $favicon (ne $favicon.MediaType.SubType "svg") }} + {{ $favicon = $favicon.Resize "42x" }} + {{ end }} + {{ $favicon = $favicon.RelPermalink}} + + +{{end}} diff --git a/layouts/partials/helpers/get-author-image.html b/layouts/partials/helpers/get-author-image.html index 439bafc..b4cfe8f 100644 --- a/layouts/partials/helpers/get-author-image.html +++ b/layouts/partials/helpers/get-author-image.html @@ -18,12 +18,12 @@ {{ end }} {{ end }} -{{/* apply image processing. don't use "Fit" in svg because its not supported */}} +{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}} {{ $authorImage:= resources.Get $authorImage}} -{{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }} - {{ $authorImage := $authorImage.Fit "120x120" }} + +{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }} + {{ $authorImage = $authorImage.Fit "120x120" }} {{ end }} {{/* return the author image link */}} {{ return $authorImage.RelPermalink }} - diff --git a/layouts/partials/helpers/get-pages.html b/layouts/partials/helpers/get-pages.html new file mode 100644 index 0000000..8e06483 --- /dev/null +++ b/layouts/partials/helpers/get-pages.html @@ -0,0 +1,10 @@ +{{ $pages:= slice}} +{{ range . }} + {{ if .HasChildren }} + {{ $nestedPages:=partial "helpers/get-pages.html" .Children }} + {{ $pages = $pages | append $nestedPages }} + {{ else }} + {{ $pages = $pages | append .Page }} + {{ end }} +{{ end }} +{{ return $pages}} diff --git a/layouts/partials/navigators/navbar-2.html b/layouts/partials/navigators/navbar-2.html index 86b4626..c129f6e 100644 --- a/layouts/partials/navigators/navbar-2.html +++ b/layouts/partials/navigators/navbar-2.html @@ -1,28 +1,31 @@ -{{/* default logos */}} -{{ $mainLogo := "/images/main-logo.png" }} -{{ $invertedLogo := "/images/inverted-logo.png" }} +{{/* by default, don't use any logo */}} +{{ $mainLogo := "" }} +{{ $invertedLogo := "" }} -{{/* if custom logo has been provided in the config file, then use them */}} +{{/* if custom logo has been provided, use them */}} {{ if site.Params.logo.main }} {{ $mainLogo = site.Params.logo.main }} {{ end }} - {{ if site.Params.logo.inverted }} {{ $invertedLogo = site.Params.logo.inverted }} {{ end }} {{/* resize the logos. don't resize svg because it is not supported */}} -{{ $mainLogo := resources.Get $mainLogo}} -{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} - {{ $mainLogo = $mainLogo.Resize "42x" }} +{{ if $mainLogo }} + {{ $mainLogo = resources.Get $mainLogo}} + {{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} + {{ $mainLogo = $mainLogo.Resize "42x" }} + {{ end }} + {{ $mainLogo = $mainLogo.RelPermalink}} {{ end }} -{{ $mainLogo = $mainLogo.RelPermalink}} -{{ $invertedLogo := resources.Get $invertedLogo}} -{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg") }} - {{ $invertedLogo = $invertedLogo.Resize "42x" }} +{{ if $invertedLogo }} + {{ $invertedLogo = resources.Get $invertedLogo}} + {{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}} + {{ $invertedLogo = $invertedLogo.Resize "42x" }} + {{ end }} + {{ $invertedLogo = $invertedLogo.RelPermalink}} {{ end }} -{{ $invertedLogo = $invertedLogo.RelPermalink}} diff --git a/layouts/partials/navigators/navbar.html b/layouts/partials/navigators/navbar.html index df29cdc..ed6cff9 100644 --- a/layouts/partials/navigators/navbar.html +++ b/layouts/partials/navigators/navbar.html @@ -7,11 +7,11 @@ {{ $blogEnabled = true }} {{ end }} -{{/* default logos */}} -{{ $mainLogo := "/images/main-logo.png" }} -{{ $invertedLogo := "/images/inverted-logo.png" }} +{{/* by default, don't use any logo */}} +{{ $mainLogo := "" }} +{{ $invertedLogo := "" }} -{{/* if custom logo is used, them */}} +{{/* if custom logo has been provided, use them */}} {{ if site.Params.logo.main }} {{ $mainLogo = site.Params.logo.main }} {{ end }} @@ -20,17 +20,21 @@ {{ end }} {{/* resize the logos. don't resize svg because it is not supported */}} -{{ $mainLogo := resources.Get $mainLogo}} -{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} - {{ $mainLogo = $mainLogo.Resize "42x" }} +{{ if $mainLogo }} + {{ $mainLogo = resources.Get $mainLogo}} + {{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }} + {{ $mainLogo = $mainLogo.Resize "42x" }} + {{ end }} + {{ $mainLogo = $mainLogo.RelPermalink}} {{ end }} -{{ $mainLogo = $mainLogo.RelPermalink}} -{{ $invertedLogo := resources.Get $invertedLogo}} -{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}} - {{ $invertedLogo = $invertedLogo.Resize "42x" }} +{{ if $invertedLogo }} + {{ $invertedLogo = resources.Get $invertedLogo}} + {{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}} + {{ $invertedLogo = $invertedLogo.Resize "42x" }} + {{ end }} + {{ $invertedLogo = $invertedLogo.RelPermalink}} {{ end }} -{{ $invertedLogo = $invertedLogo.RelPermalink}} {{ $customMenus := site.Params.customMenus }} {{ if (index site.Data site.Language.Lang).site.customMenus }} @@ -45,7 +49,9 @@ diff --git a/layouts/partials/navigators/next-prev-navigator.html b/layouts/partials/navigators/next-prev-navigator.html index f87c369..378c97d 100644 --- a/layouts/partials/navigators/next-prev-navigator.html +++ b/layouts/partials/navigators/next-prev-navigator.html @@ -1,33 +1,43 @@ +{{ $curPage := . }} +{{ $prevPage := "" }} +{{ $nextPage := "" }} + + +{{ $pages := slice }} + +{{ if isset site.Menus "sidebar" }} + {{ $pages = partial "helpers/get-pages.html" site.Menus.sidebar }} +{{ end }} + + +{{ $idx := 0 }} +{{ range $pages }} + {{ if eq .RelPermalink $curPage.RelPermalink }} + {{ $prevPage = index $pages (sub $idx 1) }} + {{ $nextPage = index $pages (add $idx 1) }} + {{ end }} + {{ $idx = add $idx 1 }} +{{ end }} +
-{{ $currentPage := . }} -{{ range (where site.RegularPages.ByDate "Type" "in" site.Params.mainSections )}} - {{ if eq .RelPermalink $currentPage.RelPermalink }} - {{ if .Next }} - {{ if (in site.Params.mainSections .Next.Type) }} - diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 0000000..2163e49 --- /dev/null +++ b/layouts/partials/opengraph.html @@ -0,0 +1,12 @@ +{{ $title := (index site.Data site.Language.Lang).site.openGraph.title | default site.Title }} +{{ $type := (index site.Data site.Language.Lang).site.openGraph.type | default "website" }} +{{ $description := (index site.Data site.Language.Lang).site.openGraph.description | default (index site.Data site.Language.Lang).site.description }} +{{ $image := (index site.Data site.Language.Lang).site.openGraph.image | default (index site.Data site.Language.Lang).author.image }} +{{ $url := (index site.Data site.Language.Lang).site.openGraph.url | default site.BaseURL }} + + + + + + + diff --git a/layouts/partials/sections/about.html b/layouts/partials/sections/about.html index 3bb02d6..9f26313 100644 --- a/layouts/partials/sections/about.html +++ b/layouts/partials/sections/about.html @@ -11,7 +11,8 @@
-
+ + {{ if or (.softSkills) (.badges) }}
{{ else }}
{{ end }}

{{ $author.name }}

{{ if .designation }}
diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index 6ab4cba..6303db9 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -26,8 +26,11 @@ {{ $authorImage = $author.image }} {{ end }} {{ $authorImage := resources.Get $authorImage }} -{{ $authorImage := $authorImage.Fit "148x148" }} +{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}} +{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }} + {{ $authorImage = $authorImage.Fit "148x148" }} +{{ end }} {{/* get file that matches the filename as specified as src="" in shortcode */}} {{ $src := resources.Get $backgroundImage }} @@ -110,6 +113,9 @@ alt="Author Image" />

{{ $author.greeting }} {{ $name }}

+ {{ if $author.subtitle }} +

{{ $author.subtitle }}

+ {{ end }}