Where is the "homepage" template located?

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?

Thanks in Advance :slightly_smiling:

It is a weird name for a partial, but the file should be inside /layouts/partials/homepage.html in either your project or the theme.

1 Like

Oh! I just checked and indeed, there was a html file at themes\THEME\layouts\partials\homepage.html :smiley:

I am still wondering about the dot thingy, can anyone explain it to me? :slight_smile:

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.

1 Like