Updates
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -168,4 +168,5 @@ cython_debug/
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
public
|
||||
public
|
||||
content/*
|
||||
@@ -30,7 +30,7 @@ class ContentItemPrototype:
|
||||
self.slug = md_file.stem
|
||||
self.data = frontmatter.load(md_file)
|
||||
self.html = markdown.markdown(self.data.content)
|
||||
self.preview = self.html[:300] + " <a href=" + f"{self.slug}.html" + ">...read more</a>"
|
||||
self.preview = self.html[:300] + "<a href=" + f"{self.slug}.html" + ">... read more</a>"
|
||||
self.title = self.data.get("title", self.slug)
|
||||
self.omit_second_title = self.data.get("omit_second_title", False)
|
||||
self.date = self.data.get("data", "2000-01-01T00:00:00+03:00")
|
||||
@@ -85,3 +85,6 @@ with (output_dir / "index.html").open("w", encoding="utf-8") as f:
|
||||
# Render the about file
|
||||
about_content = ContentItemPrototype(Path('static/about.md'))
|
||||
about_content.render_content()
|
||||
|
||||
# Move 'robots.txt' into output_dir
|
||||
shutil.copyfile(static_dir / 'robots.txt', output_dir / 'robots.txt')
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="card h-100" style="border-radius: 5px;">
|
||||
<img src="{{ content_item.image }}" alt="{{ content_item.title }}" class="card-img-top img-fluid" style="background: rgb(77, 77, 77); object-fit: cover; height: 200px; border-radius: 5px;">
|
||||
<div class="card-body d-flex flex-column">
|
||||
<h5 class="card-title">{{ content_item.title }}</h5>
|
||||
<h5 class="card-title"><a class="text-decoration-none text-body" href="{{ content_item.slug}}.html ">{{ content_item.title }}</a></h5>
|
||||
<p class="card-text mb-3">{{ content_item.preview | safe}}</p>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user