From 16e41217d4c88f493564962adf8c760f778ea3f5 Mon Sep 17 00:00:00 2001 From: Morgan Date: Tue, 31 Oct 2023 16:11:59 +0900 Subject: [PATCH] edited post --- config.yml | 2 + config.yml.old | 120 ++++++++++++++++++++ scripts/build.sh | 3 + themes/mytheme/layouts/partials/footer.html | 3 +- 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 config.yml.old create mode 100755 scripts/build.sh diff --git a/config.yml b/config.yml index 59e7c25..b134526 100644 --- a/config.yml +++ b/config.yml @@ -116,3 +116,5 @@ markup: guessSyntax: true # lineNos: true style: github + +buildDate: 2023-10-31_16:11:53 diff --git a/config.yml.old b/config.yml.old new file mode 100644 index 0000000..55c633c --- /dev/null +++ b/config.yml.old @@ -0,0 +1,120 @@ +baseURL: "http://blog.morgan.kr" +title: Morgan's Blog +paginate: 50 +theme: "mytheme" + +enableRobotsTXT: true +buildDrafts: false +buildFuture: false +buildExpired: false + +googleAnalytics: UA-123-45 +minify: + disableXML: true + minifyOutput: true + +params: + env: production # to enable google analytics, opengraph, twitter-cards and schema. + title: Morgan's Blog + description: "Hi! I'm Morgan!" + keywords: [Blog, Portfolio, PaperMod] + author: Me + images: [""] + DateFormat: "Jan 2, 2006" + defaultTheme: dark + disableThemeToggle: false + + ShowReadingTime: false + ShowShareButtons: true + ShowPostNavLinks: true + ShowBreadCrumbs: false + ShowCodeCopyButtons: true + ShowWordCount: false + ShowRssButtonInSectionTermList: false + UseHugoToc: true + + disableSpecial1stPost: false + disableScrollToTop: false + comments: true + hidemeta: false + hideSummary: false + showtoc: false + tocopen: false + mainSections: + - posts + + homeInfoParams: + Title: Hi, I'm Morgan. + Content: I am student developer in Korea, studying Embedded system and Cryptography. + + socialIcons: # optional + - name: github + url: "https://github.com/morgan9e" + - name: email + url: "mailto:me@morgan.kr" + - name: git + url: "https://git.morgan.kr" + - name: twitter + url: "https://twitter.com/morgan8w" + - name: telegram + url: "https://t.me/morgan9e" + + assets: + favicon: "https://blog.morgan.kr/favicon.ico" + apple_touch_icon: "https://blog.morgan.kr/favicon.ico" + safari_pinned_tab: "https://blog.morgan.kr/favicon.ico" + + label: + icon: /favicon.png + icon_inv: /favicon-inv.png + iconHeight: 24 + + analytics: + google: + SiteVerificationTag: "XYZabc" + bing: + SiteVerificationTag: "XYZabc" + yandex: + SiteVerificationTag: "XYZabc" + + cover: + hidden: true # hide everywhere but not in structured data + hiddenInList: true # hide on list pages and home + hiddenInSingle: true # hide on single page + + # for search + # https://fusejs.io/api/options.html + fuseOpts: + isCaseSensitive: false + shouldSort: true + location: 0 + distance: 1000 + threshold: 0.4 + minMatchCharLength: 0 + keys: ["title", "permalink", "summary", "content"] + +permalinks: + posts: /:year/:month/:title/ + +menus: + main: + - identifier: posts + name: Posts + url: /posts/ + weight: 30 + # - identifier: tags + # name: Tags + # url: /tags/ + # weight: 10 + +pygmentsUseClasses: true +markup: + highlight: + noClasses: false + # anchorLineNos: true + codeFences: true + guessSyntax: true + # lineNos: true + style: github + +buildDate: 2023-10-31_16:11:52 diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..2740701 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,3 @@ +sed -i.old "s/buildDate: [0-9]\+-[0-9]\+-[0-9]\+_[0-9]\+:[0-9]\+:[0-9]\+/buildDate: $(date +%Y-%m-%d_%H:%M:%S)/" config.yml + +hugo diff --git a/themes/mytheme/layouts/partials/footer.html b/themes/mytheme/layouts/partials/footer.html index 2a39196..66313f5 100644 --- a/themes/mytheme/layouts/partials/footer.html +++ b/themes/mytheme/layouts/partials/footer.html @@ -3,7 +3,8 @@ {{- if site.Copyright }} {{ site.Copyright | markdownify }} {{- else }} - © {{ now.Year }} {{ site.Title }} + © {{ now.Year }} {{ site.Title }} + Build date: {{- if not ( eq site.buildDate 0 ) }}{{ site.buildDate }}{{- end }} {{- end }} {{- end }}