Skip to content

Comments

Section-index: ensure .Parent isn't nil#1866

Merged
chalin merged 1 commit intogoogle:mainfrom
chalin:chalin-parent-nil-fix-2024-02-15
Feb 16, 2024
Merged

Section-index: ensure .Parent isn't nil#1866
chalin merged 1 commit intogoogle:mainfrom
chalin:chalin-parent-nil-fix-2024-02-15

Conversation

@chalin
Copy link
Collaborator

@chalin chalin commented Feb 15, 2024

To test, I ran the following from a local docsy repo:

$ mkdir tmp
$ cd tmp
$ ../tools/make-site.sh -s HUGO_MODULE
$ cd test-site
$ echo "---\ntitle: Hello\ntype: docs\n---\nPlaceholder" > content/_index.md
$ hugo # building or serving seems fine now

Without the fix in this PR, the commands above yield the error reported in #1863.

@chalin
Copy link
Collaborator Author

chalin commented Feb 15, 2024

/cc @marshalc @chulcher

@chulcher
Copy link

The change to 'if and .Parent .Parent.File' is working for my setup.

Copy link
Contributor

@deining deining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Sorry for introducing a regression here.

@chalin chalin merged commit 3692cb8 into google:main Feb 16, 2024
@chalin chalin deleted the chalin-parent-nil-fix-2024-02-15 branch February 16, 2024 22:28
@chalin chalin added this to the 24Q1 milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.9.0: execute of template failed at <.Parent.File>: nil pointer evaluating page.Page.File -- error when using page type docs

3 participants