[Bug 279896] Download PDF not working in handbook [404]
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 279896] Download PDF not working in handbook [404]"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 22 Jun 2024 12:55:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279896
--- Comment #5 from freebsd.illusive064@passinbox.com ---
I did some more invenstigation :
<div class="resources">
<h3>{{ i18n "resources" }}</h3>
<ul class="contents">
{{ $pathSections := split .Page.File "/" }}
{{ $path := printf "%s/%s/%s_%s.pdf" (index $pathSections 0) (index
$pathSections 1) (index $pathSections 1) $.Site.Home.Language }}
{{ $pdfUrl := printf "%s%s/%s" $.Site.Params.downloadBaseUrl
$.Site.Home.Language $path }}
<li><i class="fa fa-file-pdf-o" aria-hidden="true" title="{{ i18n
"download-pdf" }}"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf"
}}</a></li>
{{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl
$.Site.Home.Language .Page.File }}
<li><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{
i18n "edit-page" }}"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n
"edit-page" }}</a></li>
</ul>
</div>
Here specifically:
{{ $pathSections := split .Page.File "/" }}
{{ $path := printf "%s/%s/%s_%s.pdf" (index $pathSections 0) (index
$pathSections 1) (index $pathSections 1) $.Site.Home.Language }}
pathSections 1 and 0 are nil, why? I have no idea how this site is made,
hopefully someone else can answer that
--
You are receiving this mail because:
You are the assignee for the bug.