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

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

Merged
merged 1 commit into from
Feb 16, 2024

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
Collaborator

@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
11 checks passed
@chalin chalin deleted the chalin-parent-nil-fix-2024-02-15 branch February 16, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants