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

Replace deprecated Page.Dir with Page.File.Dir #988

Merged
merged 3 commits into from
Mar 29, 2022

Conversation

anoadragon453
Copy link
Member

@anoadragon453 anoadragon453 commented Mar 8, 2022

Fixes #986 (which has a bit more context).

Page.Dir has been deprecated for a while, calling them raised an error in hugo v0.92.0, before it was finally removed in hugo v0.93.0.

This commit replaces instances of Page.Dir with Page.File.Dir.

Preview: https://pr988--matrix-spec-previews.netlify.app

Page.Dir has been deprecated for a while, and was finally removed in hugo v0.93.0.

This commit replaces instances of Page.Dir with Page.File.Dir.
{{ $page := .Site.GetPage (path.Join .Page.File.Dir "modules" (printf "%s%s" $name ".md"))}}
Copy link
Member Author

@anoadragon453 anoadragon453 Mar 8, 2022

Choose a reason for hiding this comment

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

I'm not 100% sure where the changelog for this PR's changes should go...

Copy link
Member

Choose a reason for hiding this comment

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

we don't have a changelog place for this PR's changeset.

@anoadragon453 anoadragon453 requested a review from a team March 8, 2022 14:16
@turt2live turt2live self-requested a review March 8, 2022 14:42
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

the changes look good, and it appears as though Hugo fixed whatever was causing this to not work on Windows. The deprecated version was previously chosen for compatibility reasons.

Can we also bump the minimum required version in the README (currently v0.74) to prevent future issues? Arbitrarily setting it to v0.93 would be fine, I think.

@anoadragon453 anoadragon453 force-pushed the anoa/page_dir_deprecation_fix branch from 71f2455 to 8275bc5 Compare March 9, 2022 17:47
@anoadragon453
Copy link
Member Author

@turt2live bumped min hugo to v0.93.0 in the README and switched our CI to the latest release (v0.93.3).

@anoadragon453 anoadragon453 requested a review from turt2live March 9, 2022 17:48
@turt2live
Copy link
Member

(please don't rebase after review has been given - it makes things difficult. Merge commits will be squashed out of existence when the PR is merged)

@anoadragon453
Copy link
Member Author

(Apologies! I had rewritten a commit that hadn't yet been reviewed, hence assuming it was fine.)

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

thanks :)

@anoadragon453 anoadragon453 merged commit 5a54ca6 into main Mar 29, 2022
@anoadragon453 anoadragon453 deleted the anoa/page_dir_deprecation_fix branch March 29, 2022 14:03
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.

Build fails with hugo 0.92.0+
2 participants