fixed issues with about and cv not updating when built
This commit is contained in:
20
build.py
20
build.py
@@ -106,15 +106,16 @@ class Website:
|
||||
self.tags.append(tag)
|
||||
|
||||
def build_about(self):
|
||||
about_meta, about_content, about_modified_time = self.fetch_page('content', 'about.md')
|
||||
template = self.env.get_template('about.html')
|
||||
html_output = template.render(
|
||||
content=self.about_content,
|
||||
socials=self.about_meta,
|
||||
modified_time = self.about_modified_time
|
||||
)
|
||||
content=about_content,
|
||||
socials=about_meta,
|
||||
modified_time=about_modified_time
|
||||
)
|
||||
with open(os.path.join('public', 'about.html'), 'w', encoding='utf8') as output_file:
|
||||
output_file.write(html_output)
|
||||
|
||||
output_file.write(html_output)
|
||||
|
||||
def build_campfire(self):
|
||||
template = self.env.get_template('campfire.html')
|
||||
html_output = template.render(
|
||||
@@ -122,12 +123,15 @@ class Website:
|
||||
)
|
||||
|
||||
def build_cv(self):
|
||||
cv_meta, cv_content, cv_modified_time = self.fetch_page('content', 'cv.md')
|
||||
template = self.env.get_template('cv.html')
|
||||
html_output = template.render(
|
||||
content=self.cv_content
|
||||
content=cv_content,
|
||||
modified_time=cv_modified_time,
|
||||
socials=cv_meta # only if the template expects it
|
||||
)
|
||||
with open(os.path.join('public', 'cv.html'), 'w', encoding='utf8') as output_file:
|
||||
output_file.write(html_output)
|
||||
output_file.write(html_output)
|
||||
|
||||
def format_content(self, content):
|
||||
# convert all (link)(src) to <a> tags
|
||||
|
||||
Reference in New Issue
Block a user