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

Refactor: add BuildMode::Skip #2419

Closed
wants to merge 2 commits into from

Conversation

clarfonthey
Copy link
Contributor

@clarfonthey clarfonthey commented Jan 22, 2024

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you doing the PR on the next branch?

Note: this is rebased on top of #2418, and that should be merged first.

This is an attempt at incorporating the refactoring done in #2388 without changing behaviour. It helps pave a path toward render = false for pages while making things a bit more consistent for the existing render = false for sections and taxonomies.

Effectively, render = false will still add things to the library, but their pages and aliases won't be rendered. We could potentially convert having aliases for something render = false to a hard error, but at least for now, it makes no sense to create links to something that isn't actually rendered.

@clarfonthey
Copy link
Contributor Author

Actually, going to close this first since I realise it needs a bit more work. After looking more into how the code works, get_page and get_section don't even go through SITE_CONTENT, so, we probably shouldn't rely on using BuildMode and instead just not running the write_content method.

This was the original justification for adding BuildMode::SKIP (since it bypasses SITE_CONTENT) but after going through it more, that's probably not the right choice.

@clarfonthey clarfonthey deleted the buildmode-skip branch July 21, 2024 02:15
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.

1 participant