Skip to content

Commit

Permalink
Improve page-meta-links page
Browse files Browse the repository at this point in the history
This PR fixes a warning in the page-meta-links.html page where `.Path`
is a function to be removed soon. Warning message:

```
WARN 2022/06/17 21:20:35 .Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file.
```
  • Loading branch information
tengqm committed Jun 17, 2022
1 parent 404bdfa commit 12f11d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layouts/partials/page-meta-links.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{/* template adapted from Docsy theme */}}
{{ if .Path }}
{{ $pathFormatted := replace .Path "\\" "/" }}

{{ if .File.Path }}
{{ $pathFormatted := replace .File.Path "\\" "/" }}
{{ $gh_repo := ($.Param "github_repo") }}
{{ $gh_subdir := ($.Param "github_subdir") }}
{{ $gh_project_repo := ($.Param "github_project_repo") }}
Expand Down

0 comments on commit 12f11d4

Please sign in to comment.