Files
rocky-man/old_scripts/generate_jinja.py
Stephen Simpson 2287678798 Init
2025-01-09 15:39:20 -06:00

32 lines
507 B
Python

from jinja2 import Environment, FileSystemLoader
import os
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template('page.j2')
# Define the data to pass to the template
data = {
'title': 'Rocky Man Page - 8.10',
'header_title': 'Welcome to Rocky Man Page',
'main_content': '<input type="text" id="searchInput" placeholder="Search..."><ul><li>Item 1</li><li>Item 2</li></ul>'
}
# Render the template with the data
output = template.render(data)
print(output)