Skip to content

Commit

Permalink
Merge pull request #765 from mpourismaiel/fix/config-fragment/remove-…
Browse files Browse the repository at this point in the history
…duplicated-configs

Remove duplicated config fragments
  • Loading branch information
stp-ip authored May 23, 2020
2 parents 045b938 + 5427b08 commit 60c58db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/helpers/fragments.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@
{{- $name := replace .Name "/index" "" -}}
{{- if ne $root.File nil -}}
{{- $directory_same_name := in ($page_scratch.Get "fragments_directory_name") (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
{{- if and (not .Params.disabled) (isset .Params "fragment") (not (where ($page_scratch.Get "page_fragments") ".Name" $name)) (not $directory_same_name) -}}
{{- if and (not .Params.disabled) (isset .Params "fragment") (not $directory_same_name) -}}
{{- if or $is_404 (ne .Params.fragment "404") -}}
{{- if eq .Params.fragment "config" -}}
{{- if and (eq .Params.fragment "config") (not (where ($page_scratch.Get "page_config") ".Name" $name)) -}}
{{- $page_scratch.Add "page_config" . -}}
{{- else -}}
{{- else if not (where ($page_scratch.Get "page_fragments") ".Name" $name) -}}
{{- $page_scratch.Add "page_fragments" . -}}
{{- $page_scratch.Add "fragments_directory_name" (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
{{- if isset .Params "padding" -}}
Expand Down

0 comments on commit 60c58db

Please sign in to comment.