Merge branch 'hugo' of https://github.com/jackyzha0/quartz into hugo
| | |
| | | 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 |
| | |
| | | lineNumbersInTable = true |
| | | style = "dracula" |
| | | tabWidth = 4 |
| | | [frontmatter] |
| | | lastmod = ["lastmod", ":git", "date", "publishDate"] |
| | | publishDate = ["publishDate", "date"] |
| | |
| | | {{$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) }} |
| | | <a |
| | | {{if not $nonexistent}}href="{{$rooted}}"{{end}} |
| | | rel="noopener" class="internal-link{{if $nonexistent}} broken{{end}}" |