Hi, I use custom output format to generate search index, is it possible to generate a hash (according to the content) for those output files to avoid using out-of-date caches?
{{- with .Home.OutputFormats.Get "SearchIndex" }}
{{- $indexURL := printf "%s?v=%s" .RelPermalink "hash_string" }}
{{- end }}
I’ve read the OutputFormat and Output, but couldn’t find any useful variable can be used by hash (md5).
Is there a workaround to get the content of generated output? I’ve tried to use GetPage, but with no luck (nopPage).
{{- warnf "%v" (.Site.GetPage "/search.json") }}
I could use partialCached to fetch the content from build caches, but I believe that there is an easy way to do that. And in my case, I want to collect all related outputs from all sites, partialCached might become a potential buggy implementation (the context).
Sorry for providing the wrong example (.File.UniqueID), I wish to generate a hash string about the content, which will be changed according to the content.