diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 6a22367..ee51d3e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Build Link Index uses: jackyzha0/hugo-obsidian@v2.12 diff --git a/config.toml b/config.toml index 5c4dfcb..5efa9f3 100644 --- a/config.toml +++ b/config.toml @@ -28,3 +28,6 @@ enableGitInfo = true lineNumbersInTable = true style = "dracula" tabWidth = 4 + [frontmatter] + lastmod = ["lastmod", ":git", "date", "publishDate"] + publishDate = ["publishDate", "date"] \ No newline at end of file diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index cdacfc1..4757b72 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -7,7 +7,7 @@ {{$spacedurl := replace $trimmed "%20" " " }} {{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}} {{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}} -{{$rooted := default $spacedurl (strings.TrimRight "/" (.Page.GetPage $spacedurl).RelPermalink) }} +{{$rooted := default $spacedurl ((.Page.GetPage $spacedurl).RelPermalink) }}