Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The site (e.g. site.RegularPages) does not work from archetype templates #9046

Closed
bep opened this issue Oct 15, 2021 · 1 comment · Fixed by #9045
Closed

The site (e.g. site.RegularPages) does not work from archetype templates #9046

bep opened this issue Oct 15, 2021 · 1 comment · Fixed by #9045
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Oct 15, 2021

Workaround: {{ .Site.... }}.

@bep bep added the Bug label Oct 15, 2021
@bep bep added this to the v0.89 milestone Oct 15, 2021
@bep bep self-assigned this Oct 15, 2021
bep added a commit to bep/hugo that referenced this issue Oct 15, 2021
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes gohugoio#9032
Fixes gohugoio#7589
Fixes gohugoio#9043
Fixes gohugoio#9046
bep added a commit to bep/hugo that referenced this issue Oct 15, 2021
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes gohugoio#9032
Fixes gohugoio#7589
Fixes gohugoio#9043
Fixes gohugoio#9046
bep added a commit to bep/hugo that referenced this issue Oct 15, 2021
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes gohugoio#9032
Fixes gohugoio#7589
Fixes gohugoio#9043
Fixes gohugoio#9046
bep added a commit to bep/hugo that referenced this issue Oct 16, 2021
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes gohugoio#9032
Fixes gohugoio#7589
Fixes gohugoio#9043
Fixes gohugoio#9046
bep added a commit to bep/hugo that referenced this issue Oct 16, 2021
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes gohugoio#9032
Fixes gohugoio#7589
Fixes gohugoio#9043
Fixes gohugoio#9046
bep added a commit to bep/hugo that referenced this issue Oct 16, 2021
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes gohugoio#9032
Fixes gohugoio#7589
Fixes gohugoio#9043
Fixes gohugoio#9046
Fixes gohugoio#9047
@bep bep closed this as completed in #9045 Oct 16, 2021
bep added a commit that referenced this issue Oct 16, 2021
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes #9032
Fixes #7589
Fixes #9043
Fixes #9046
Fixes #9047
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant