added showcase, credits, and fixed hover bug
This commit is contained in:
16
build.py
16
build.py
@@ -48,14 +48,13 @@ class Website:
|
||||
filename = page.get_filename()
|
||||
html_content = page.get_content()
|
||||
html_output = template.render(
|
||||
title=metadata['title'],
|
||||
year=metadata['year'],
|
||||
date=metadata['date'],
|
||||
tags=metadata.get('tags', []),
|
||||
image=metadata['image'],
|
||||
showcase=metadata['showcase'],
|
||||
credits=metadata['credits'],
|
||||
references=page.get_references(),
|
||||
title=metadata.get('title', ''),
|
||||
year=metadata.get('year', ''), # Assuming year is a string
|
||||
date=metadata.get('date', ''), # Assuming date is a string
|
||||
tags=metadata.get('tags', []),
|
||||
image=metadata.get('image', ''), # Assuming image is a string
|
||||
showcase=metadata.get('showcase', []),
|
||||
credits=metadata.get('credits', []), # Assuming credits is a string
|
||||
content=html_content)
|
||||
with open(os.path.join(self.output_dir_root, filename), 'w', encoding='utf8') as output_file:
|
||||
output_file.write(html_output)
|
||||
@@ -105,6 +104,7 @@ class Website:
|
||||
def format_content(self, content):
|
||||
# convert all (link)(src) to <a> tags
|
||||
content = re.sub(r'\(([^)]+)\)\[([^\]]+)\]', r'<a href="\2">\1</a>', content)
|
||||
# convert all video links to embedded code
|
||||
return content
|
||||
|
||||
def fetch_all_images(self):
|
||||
|
||||
Reference in New Issue
Block a user