Thanks. Is there a way to override the template so I can put that code in a separate file and then the Lucid template will always read from the new file first, so when I upgrade, it won't reset my changes? Like how some software has a functions.php in a child theme?
No, anyway it will require the changes in the mentioned file. So the provided solution is the minimum.