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

remove nunjucks templating in experimental plugin themes #4933

Merged
merged 7 commits into from
Jul 7, 2022

Conversation

dimitropoulos
Copy link
Contributor

@dimitropoulos dimitropoulos commented Jul 6, 2022

changelog(Breaking changes): We have removed nunjucks templating support from themes. If your custom theme makes use of these, check the examples in #4933

We have decided to remove nunjucks templating from themes because it is unnecessary and adds quite a lot of complexity to the theme system (and is ABSOLUTELY TRIVIAL to remove).

36c6d41 (#4933) converts all the internal themes. As you can see, it's very very straightforward.

But what about 3rd party plugins from the community??!?

40b2ef8 (#4933) serves as a tool (which, I expect we'll use for plenty of other things) that can solve this issue by downloading all the existing themes in the community. I did this and found that there were two that were using this feature (both, equally trivial to undo), so I went ahead and made them PRs to migrate away:

1e0faeb (#4933) then adds some functionality to alert people to this (and writes unit tests for it! 😄).

569f507 and 9fa66b2 was from a self review: the function no longer needs to be async now that it's not calling nunjucks rendering, and now we don't need a specific type for it since it's gone.

Now, when the user adds a theme that has this problem, they'll see something like this:

@dimitropoulos dimitropoulos self-assigned this Jul 6, 2022
@dimitropoulos dimitropoulos enabled auto-merge (squash) July 7, 2022 12:24
@dimitropoulos dimitropoulos merged commit 26fe408 into Kong:develop Jul 7, 2022
@dimitropoulos dimitropoulos deleted the remove-theme-nunjucks branch July 7, 2022 13:19
This pull request was closed.
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.

2 participants