{{ if (and ($.Site.Params.ShowReadingTime) (eq .Params.identifier "overview")) }}
{{ else if ($.Site.Params.ShowReadingTime) }}
<span class="post-read-time"
>— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span
>
{{ end }}
But the first if gets never executed and I do not understand why. The if-else will get executed.
When I switch the cases, then the part with the logical and will still not get executed so it has to do with the condition. I think it has to do with the eq part, but I do not see the mistake.
{{ if (and ($.Site.Params.ShowReadingTime) (eq .Params.identifier "overview")) }}
ShowReadingTime in your config's [params] section is set (to something other than false)
AND
the frontmatter of your page has
identifier: overview
set.
In that case it's shown.
{{else if ($.Site.Params.ShowReadingTime)}}
{{ end }}
To help you we would have to know what your config and your test pages frontmatter is saying.
That’s what I meant. But from what I can see I would expect that to work.
Now check the “context”. The dot (.) does not always mean “the current page” if you are inside of a range or with construct. You will have to show more code. Maybe a public repo?
By the way, your config variable is showReadingTime, not ShowReadingTime. I don’t expect that to be the solution but test it
hmm… all those pages come up white for me. I have the distinct feeling I don’t know how to initialise your repo I did run git submodule update --recursive --remote but it didn’t do anything… help me to help you?
So I would say it’s working as expected. What did you expect where? That page is set to “identifier = overview” and it’s showing the schwah schwahs from my override… Please do something along the lines of “I load localhost:1313/so-and-so” and expect to see “this and that”. I think you either have a “polluted” installation (then delete everything and re-setup) or you are working on the wrong side of your setup.
I had to wait for 18hours to answer you because I am a newbie uff.
Your solution is what I currently have as well and that was my goal. But before I could not get rid of the date and readMore button.
So my issue from the beginning is already solved, as I said in the edit of my 3rd post.
However, do you know if it is possible to make two different texts like the SCHWAH SCHWAH?
Here SCHWAH SCHWAH is applied under mathematical journey and proofs.
How could I make two different texts? One only for proofs and one for mathematical journey?