From e1911a58fff3b96754b3b49837ac2d4dd4fcf5aa Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 27 Dec 2021 17:28:53 -0500 Subject: [PATCH] enable last modified info --- .github/workflows/deploy.yaml | 2 +- Makefile | 2 +- assets/base.scss | 29 ++++++++++++++++++----------- config.toml | 1 + layouts/_default/single.html | 4 ++++ 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c19bec8..fc3a5c2 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v2 - name: Build Link Index - uses: jackyzha0/hugo-obsidian@v2.5 + uses: jackyzha0/hugo-obsidian@v2.6 with: index: true input: content diff --git a/Makefile b/Makefile index cdc2ffa..88605eb 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,4 @@ help: ## Show all Makefile targets @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' serve: ## serve - hugo-obsidian -input=content -output=data -index && hugo server + hugo-obsidian -input=content -output=data -index -root=. && hugo server diff --git a/assets/base.scss b/assets/base.scss index c9340a9..571ca22 100644 --- a/assets/base.scss +++ b/assets/base.scss @@ -108,18 +108,25 @@ td, th { margin: 0.5em 0; } -article a { - font-family: Source Sans Pro; - font-weight: 600; +article { + & > .meta { + margin: -1.5em 0 1em 0; + opacity: 0.7; + } - // internal link - &[href^="./"], &[href^="/"] { - text-decoration: none; - background-color: transparentize(#8f9fa9, 0.85); - padding: 0 0.1em; - margin: auto -0.1em; - border-radius: 3px; - } + & a { + font-family: Source Sans Pro; + font-weight: 600; + + // internal link + &[href^="./"], &[href^="/"] { + text-decoration: none; + background-color: transparentize(#8f9fa9, 0.85); + padding: 0 0.1em; + margin: auto -0.1em; + border-radius: 3px; + } + } } .backlinks a { diff --git a/config.toml b/config.toml index e4f3d0a..a0d71f7 100644 --- a/config.toml +++ b/config.toml @@ -9,6 +9,7 @@ ignoreFiles = [ "/content/private/*", ] summaryLength = 35 +enableGitInfo = true [markup] [markup.tableOfContents] diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cbf70a2..d78d300 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,6 +14,9 @@
{{if .Title}}

{{ .Title }}

{{end}} +

+ Last updated {{ .Lastmod.Format "January 2, 2006" }} +

{{if $.Site.Data.config.enableToc}} {{end}} {{.Content}} +
{{partial "footer.html" .}}