summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-22 17:27:42 +0100
committerdavidovski <david@davidovski.xyz>2022-05-22 17:27:42 +0100
commitbaa93cb518ce6ea1b6fe5c178a4034f8f519ea04 (patch)
tree562c6d0f30868554e3b1d205db6ab57d17022fe3
parent3074d28814945d2a74e5cadde61e2f29bcf44477 (diff)
removed text from blog entries
-rw-r--r--build.py5
-rw-r--r--src/welcome.md2
-rw-r--r--templates/summary.html6
3 files changed, 9 insertions, 4 deletions
diff --git a/build.py b/build.py
index d076ccd..a8bc85f 100644
--- a/build.py
+++ b/build.py
@@ -38,13 +38,14 @@ def listPages():
"source_file" : path,
"source_content" : content,
"html" : markdown.markdown("\n".join(content.split("\n...\n"))),
+ "title" : content.split("\n")[0].replace("# ", ""),
"summary" : lowerHeadings(markdown.markdown(content.split("\n...\n")[0])),
"timestamp" : timestamp,
"date": time.strftime(date_format, time.localtime(timestamp)),
"name" : name,
"url" : f"entries/{name}.html"
})(".".join(p.split(".")[:-1]))
- )(os.stat(path).st_ctime)
+ )(os.stat(path).st_mtime)
)(open(path, "r").read())
)(os.path.join(source, p)) for p in os.listdir(source)
]
@@ -92,7 +93,7 @@ def make():
.replace(
"%content%",
page["summary"] + (f"<a href={page['url']}>read more...</a>" if len(page["source_content"].split("\n...\n")) > 1 else "")
- )
+ ).replace("%title%", page["title"])
for page in pages
][: : -1]
diff --git a/src/welcome.md b/src/welcome.md
index 549dd7c..c9bf751 100644
--- a/src/welcome.md
+++ b/src/welcome.md
@@ -1,3 +1,5 @@
+# welcome
+
welcome. i decided to turn this webpage into blog-style site... i havent got a topic or anything, so expect either: quality tutorials and very interesting techy things; or just random shitposts or rambles about things.
originally i was going to make this blog on [b.davidovski.xyz](https://b.davidovski.xyz) using [nanoblogger](http://nanoblogger.sourceforge.net/) (you might be able to still see the start of that) but nb itself seemed quite dead, and i couldn't really be asked to customise it all myself. So i made my own script to generate this static site: [kblg](https://github.com/davidovski/kblg/). Right now its probably just the bare minimum needed for this, but I am planning to add more things to it as I go along (including rss, if anyone would be interested?)
diff --git a/templates/summary.html b/templates/summary.html
index 9f226af..3ce1721 100644
--- a/templates/summary.html
+++ b/templates/summary.html
@@ -1,4 +1,6 @@
<div class="entry">
- <div class="small">%date% <a href="%url%">🔗</a></div>
- %content%
+<a href="%url%">
+ <div class="small">%date% 🔗</div>
+ <h2>%title%</h2>
+</a>
</div>