Init
This commit is contained in:
32
old_scripts/generate_jinja.py
Normal file
32
old_scripts/generate_jinja.py
Normal file
@@ -0,0 +1,32 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user