Hello.,
My image src = src="/{{ .Params.banner }}"
because all the list pages on my site use relative links for displaying thumbnail images.
Recently I added new section to the site, called news
where the frontmatter image URL is an absolute URL.
So the above code renders a broken image src, because of the leading /
. It generates https://site.com/https://absoluteURL.here
instead of just the absolute URL.
So for every tag generated from the news
section, I need to use src="{{ .Params.banner }}"
(no leading /
)
I’m thinking 2 options: Which would be better?
-
create if possible, a custom list page (not sure where in the template look up order), where every tag generated inside this
news
section uses a custom list page instead of the default list page? -
Use a
if/then
check to see what section the page belongs to and ifnews
then don’t use/
I am unsure how to do either of them.
The news section has 50,000 pages. So I’m trying to keep the generation cost to a minumum and the more checks there are, the more it slows down.
Please advise. I hope I asked my question well. Thank you.