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

Add default template warning #2200

Closed
wants to merge 4 commits into from

Conversation

Raymi306
Copy link
Contributor

@Raymi306 Raymi306 commented Apr 30, 2023

IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.

The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

Issue #2135
SO, I manually tested this a bit and it worked as best I could tell.
I ended up having to dig pretty far into code for rendering templates and then bubble information up about whether or not a default template was rendered.
Besides the arguable ugliness of this approach, it also means that it doesn't work for zola check as the build has to happen.
There should be some simpler way to check all of the templates without building...I will think about it now that I'm getting more familiar with the code and I am also open to suggestions. I may be able to work on this later today yet, we'll see.

IF this approach is acceptable, at the very least I want to do a cleanup pass and add some comments/documentation.

@Raymi306 Raymi306 changed the base branch from master to next April 30, 2023 19:01
@Raymi306
Copy link
Contributor Author

Raymi306 commented Apr 30, 2023

I've begun rewriting this.
My new plan is to add a method to Site, "get_default_templates".
This method will iterate through all pages and sites of the library.
I will write some functions to determine if a page or site is using a default template, collect the results, and return a vec either of pathbufs or strings

@Raymi306 Raymi306 mentioned this pull request May 1, 2023
3 tasks
@Raymi306
Copy link
Contributor Author

Raymi306 commented May 1, 2023

See #2205

@Raymi306 Raymi306 closed this May 1, 2023
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.

None yet

1 participant