Hello, I came across this piece of code in the index.html file of a theme: {{ partial "homepage" . }}
Where can I find the homepage template? I have checked the documentation, according to it, the parameter for partial should be a file or a file’s relative path. homepage is none of them.
I have another small but irrelevant question: What does the dot (.) do as the 2nd parameter?
The . is the context of a template that you pass to the partial. Inside a template you can access variables with the dot syntax, e.g. with .Params the frontmatter variables. By passing the context to a partial you’ve access to the same information within the partial.