From 7668fe23d0255ae369d866b0a3e7760255df5423 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 14 Mar 2024 13:32:33 +0100 Subject: [PATCH] [doc] Prerender includes in release notes --- docs/pages/release_notes_pmd7.md | 8 ++++---- docs/render_release_notes.rb | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/pages/release_notes_pmd7.md b/docs/pages/release_notes_pmd7.md index e57d6c827a..f468452d22 100644 --- a/docs/pages/release_notes_pmd7.md +++ b/docs/pages/release_notes_pmd7.md @@ -51,10 +51,10 @@ Contributors: [Clément Fournier](https://github.com/oowekyala) (@oowekyala), [Andreas Dangel](https://github.com/adangel) (@adangel), [Juan Martín Sotuyo Dodero](https://github.com/jsotuyod) (@jsotuyod) -{% include note.html content=" + ### Revamped Command Line Interface @@ -664,10 +664,10 @@ The rules have been moved into categories with PMD 6. ## 💥 Compatibility and Migration Notes -{% include note.html content=" + ### For endusers diff --git a/docs/render_release_notes.rb b/docs/render_release_notes.rb index dcd33faca3..e1af48d05b 100755 --- a/docs/render_release_notes.rb +++ b/docs/render_release_notes.rb @@ -39,6 +39,10 @@ liquid_env = { to_render = File.read(release_notes_file) +if to_render.match(/\{%\s*include/) + STDERR.printf("\n\n\e[31;1mERROR\e[0m Detected an include tag - this is jekyll specific and not supported here! Please replace it manually\n\n") + exit 1 +end rendered = Liquid::Template.parse(to_render).render(liquid_env)