{{/* template adapted from Docsy theme */}}

{{ if .File.Path }}
  {{ $pathFormatted := replace .File.Path "\\" "/" }}
  {{ $gh_repo := ($.Param "github_repo") }}
  {{ $gh_subdir := ($.Param "github_subdir") }}
  {{ $gh_project_repo := ($.Param "github_project_repo") }}
  {{ $gh_branch := (default "main" ($.Param "github_branch")) }}
  <div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
  {{ if $gh_repo }}
    {{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted }}
    {{ if and ($gh_subdir) (.Si