|
1 | | -{{ if .Path }} |
2 | | - {{ $pathFormatted := replace .Path "\\" "/" }} |
| 1 | +{{ if .File }} |
| 2 | + {{ $pathFormatted := replace .File.Path "\\" "/" }} |
3 | 3 | {{ $gh_issue_template := ($.Param "github_issue_template") }} |
4 | 4 | {{ $gh_issue_filter := ($.Param "github_issue_filter") }} |
5 | 5 | {{ $gh_repo := ($.Param "github_repo") }} |
6 | 6 | {{ $gh_subdir := ($.Param "github_subdir") }} |
7 | 7 | {{ $gh_project_repo := ($.Param "github_project_repo") }} |
8 | | - {{ $gh_project_number := .Params.github_project_number }} |
9 | 8 | {{ $gh_branch := (default "develop" ($.Param "github_branch")) }} |
10 | 9 | {{ $gh_repo := (.Param "github_repo") }} |
11 | 10 | {{ $issue_template_page := (.Site.GetPage "/issue_templates") }} |
|
14 | 13 | {{ $issueURL := (printf "%s/issues/new?%s" $gh_repo $queryString) }} |
15 | 14 | {{ $github_discuss_category := ($.Param "github_discuss_category" | default "general") }} |
16 | 15 |
|
| 16 | + <div class="td-page-meta ml-2 pb-1 pt-2 mb-0"> |
17 | 17 | {{ if $gh_repo }} |
18 | 18 | {{ $discussionURL := (printf "%s/discussions/categories/%s" $gh_repo $github_discuss_category) }} |
19 | 19 | {{ $newDiscussionURL := (printf "%s/discussions/new?category=%s" $gh_repo $github_discuss_category) }} |
20 | | - <div class="td-page-meta ml-2 pb-1 pt-2 mb-0"> |
21 | 20 | {{ $editURL := printf "%s/edit/%s/content/%s" $gh_repo $gh_branch $pathFormatted }} |
22 | 21 | {{ if and ($gh_subdir) (.Site.Language.Lang) }} |
23 | 22 | {{ $editURL = printf "%s/edit/%s/%s/content/%s/%s" $gh_repo $gh_branch $gh_subdir ($.Site.Language.Lang) $pathFormatted }} |
24 | 23 | {{ else if .Site.Language.Lang }} |
25 | 24 | {{ $editURL = printf "%s/edit/%s/content/%s/%s" $gh_repo $gh_branch ($.Site.Language.Lang) $pathFormatted }} |
26 | 25 | {{ else if $gh_subdir }} |
27 | 26 | {{ $editURL = printf "%s/edit/%s/%s/content/%s" $gh_repo $gh_branch $gh_subdir $pathFormatted }} |
28 | | - {{ end }} |
| 27 | + {{ end -}} |
29 | 28 | {{ $qExpr := printf "is:open %s" $gh_issue_filter }} |
30 | 29 | {{ $viewRelatedIssuesURL := printf "%s/issues?%s" $gh_repo (querify "q" $qExpr) }} |
31 | 30 | <a href="{{ $issueURL }}" target="_blank"><i class="fab fa-github"></i> {{ T "post_create_issue" }}</a> |
|
35 | 34 | {{ if $gh_project_repo }} |
36 | 35 | {{ $project_issueURL := printf "%s/issues/new" $gh_project_repo }} |
37 | 36 | <a href="{{ $project_issueURL }}" target="_blank"><i class="fas fa-tasks"></i> {{ T "post_create_project_issue" }}</a> |
38 | | - {{ end }} |
39 | | - </div> |
40 | | - {{ end }} |
| 37 | + {{ end -}} |
| 38 | + {{ end -}} |
| 39 | + {{ with .CurrentSection.AlternativeOutputFormats.Get "print" -}} |
| 40 | + <a id="print" href="{{ .Permalink | safeURL }}"><i class="fa-solid fa-print fa-fw"></i> {{ T "print_entire_section" }}</a> |
| 41 | + {{ end -}} |
| 42 | + </div> |
| 43 | + |
41 | 44 | {{ end }} |
0 commit comments