mirror of https://github.com/luizdepra/hugo-coder.git

Yudi
01.01.2019 74232e32b5f904feb21870121ba61f2fc675ab49
replace .URL with .RelPermalink (#176)

* replace .URL with .RelPermalink

find * -type f -exec sed -i "" "s/.URL/.RelPermalink/g" {} \;

* fix my bad
3 files modified
10 ■■■■ changed files
layouts/partials/list.html 2 ●●● patch | view | raw | blame | history
layouts/partials/posts/series.html 6 ●●●● patch | view | raw | blame | history
layouts/posts/li.html 2 ●●● patch | view | raw | blame | history
layouts/partials/list.html
@@ -11,7 +11,7 @@
    {{ range .Paginator.Pages }}
    <li>
      <span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
      <a class="title" href="{{ .Params.ExternalLink | default .URL }}">{{ .Title }}</a>
      <a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a>
    </li>
    {{ end }}
  </ul>
layouts/partials/posts/series.html
@@ -1,4 +1,4 @@
{{ $currentPageUrl := .URL }}
{{ $currentPageUrl := .RelPermalink }}
{{ if .Params.series }}
<section class="see-also">
  {{ range .Params.series }}
@@ -10,9 +10,9 @@
        <ul>
        {{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }}
        {{ range first (add $maxItems 1) $series.Pages }}
          {{ if ne .URL $currentPageUrl }}
          {{ if ne .RelPermalink $currentPageUrl }}
            <li>
              <a href="{{ .Params.ExternalLink | default .URL }}">{{ .Title }}</a>
              <a href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a>
            </li>
          {{ end }}
        {{ end }}
layouts/posts/li.html
@@ -1,4 +1,4 @@
<li>
  <span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
  <a class="title" href="{{ .Params.ExternalLink | default .URL }}">{{ .Title }}</a>
  <a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a>
</li>