Commit b3145f0 1 parent f944968 commit b3145f0 Copy full SHA for b3145f0
File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ {{/* cSpell:ignore querify subdir */ -}}
2
+ {{/* Class names ending with `--KIND` are deprecated in favor of `__KIND`, but we're keeping them for a few releases after 0.9.0 */ -}}
3
+
4
+ {{ $viewURL := path.Join .repo.url "/tree" .repo_branch .repo_path -}}
5
+ {{ $editURL := path.Join .repo.url "/edit" .repo_branch .repo_path -}}
6
+ {{ $issuesQS := printf "issue[title]=%s" (safeURL $.context.Title) -}}
7
+ {{ $issuesURL := path.Join .repo.url "/issues/new" -}}
8
+ {{ $issuesURL = printf "%s?%" $issuesURL $issuesQS -}}
9
+ {{ $newPageStub := resources.Get "stubs/new-page-template.md" -}}
10
+ {{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
11
+ {{ $newPageURL := path.Join .repo.url "/new" .repo_branch (path.Dir .repo_path) -}}
12
+ {{ $newPageURL = printf "%s?%s" $newPageURL $newPageQS -}}
13
+ < a href ="{{ $viewURL }} " class ="td-page-meta--view td-page-meta__view " target ="_blank " rel ="noopener "> < i class ="fa-solid fa-file-lines fa-fw "> </ i > {{ T "post_view_this" }}</ a >
14
+ < a href ="{{ $editURL }} " class ="td-page-meta--edit td-page-meta__edit " target ="_blank " rel ="noopener "> < i class ="fa-solid fa-pen-to-square fa-fw "> </ i > {{ T "post_edit_this" }}</ a >
15
+ < a href ="{{ $newPageURL }} " class ="td-page-meta--child td-page-meta__child " target ="_blank " rel ="noopener "> < i class ="fa-solid fa-pen-to-square fa-fw "> </ i > {{ T "post_create_child_page" }}</ a >
16
+ < a href ="{{ $issuesURL }} " class ="td-page-meta--issue td-page-meta__issue " target ="_blank " rel ="noopener "> < i class ="fa-solid fa-list-check fa-fw "> </ i > {{ T "post_create_issue" }}</ a >
17
+ {{ with .repo.project_url -}}
18
+ {{ $project_issueURL := printf "%s/issues/new" . -}}
19
+ < a href ="{{ $project_issueURL }} " class ="td-page-meta--project td-page-meta__project-issue " target ="_blank " rel ="noopener "> < i class ="fa-solid fa-list-check fa-fw "> </ i > {{ T "post_create_project_issue" }}</ a >
20
+ {{ end -}}
You can’t perform that action at this time.
0 commit comments