diff --git a/README.md b/README.md
index e72c317..197312d 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
+
+
+
+
# picopaper
A minimal static site generator for blogs built with Python 3 and Jinja2
diff --git a/config.py b/config.py
index 3f23cdb..2f193d3 100644
--- a/config.py
+++ b/config.py
@@ -1,6 +1,6 @@
"""Configuration file for picopaper blog"""
-BLOG_TITLE = "picopaper"
+BLOG_TITLE = "PicoPaper.com"
BLOG_DESCRIPTION = "we like simple."
THEME = "default"
@@ -14,3 +14,8 @@ NAVBAR_ITEMS = [
{'text': 'About', 'url': '/about/'}
]
+# Logo settings
+HIDE_LOGO = False
+HIDE_TITLE = True
+LOGO_PATH = "/images/logo.png"
+
diff --git a/images/logo.png b/images/logo.png
new file mode 100644
index 0000000..5f00575
Binary files /dev/null and b/images/logo.png differ
diff --git a/picopaper.py b/picopaper.py
index f9184a1..700bc67 100644
--- a/picopaper.py
+++ b/picopaper.py
@@ -6,7 +6,7 @@ from datetime import datetime
from pathlib import Path
from jinja2 import Environment, FileSystemLoader
import markdown
-from config import BLOG_TITLE, BLOG_DESCRIPTION, THEME, EXCLUDE_FEEDS_FROM_MAIN, NAVBAR_ITEMS
+from config import BLOG_TITLE, BLOG_DESCRIPTION, THEME, EXCLUDE_FEEDS_FROM_MAIN, NAVBAR_ITEMS, HIDE_LOGO, HIDE_TITLE, LOGO_PATH
class SSGGGenerator:
def __init__(self, items_dir='items', output_dir='output', theme=None, blog_title=None, blog_description=None):
@@ -20,6 +20,9 @@ class SSGGGenerator:
self.blog_description = blog_description or BLOG_DESCRIPTION
self.exclude_feeds = EXCLUDE_FEEDS_FROM_MAIN
self.navbar_items = NAVBAR_ITEMS
+ self.hide_logo = HIDE_LOGO
+ self.hide_title = HIDE_TITLE
+ self.logo_path = LOGO_PATH
# Setup Jinja2
self.env = Environment(loader=FileSystemLoader(self.templates_dir))
@@ -143,7 +146,10 @@ class SSGGGenerator:
blog_description=self.blog_description,
navbar_items=self.navbar_items,
posts=posts,
- all_posts=all_posts or posts
+ all_posts=all_posts or posts,
+ hide_logo=self.hide_logo,
+ hide_title=self.hide_title,
+ logo_path=self.logo_path
)
output_path.parent.mkdir(parents=True, exist_ok=True)
@@ -174,7 +180,10 @@ class SSGGGenerator:
blog_description=self.blog_description,
navbar_items=self.navbar_items,
feeds=feed_list,
- all_posts=all_posts or []
+ all_posts=all_posts or [],
+ hide_logo=self.hide_logo,
+ hide_title=self.hide_title,
+ logo_path=self.logo_path
)
output_path.parent.mkdir(parents=True, exist_ok=True)
@@ -193,7 +202,10 @@ class SSGGGenerator:
blog_description=self.blog_description,
navbar_items=self.navbar_items,
post=post,
- all_posts=all_posts or []
+ all_posts=all_posts or [],
+ hide_logo=self.hide_logo,
+ hide_title=self.hide_title,
+ logo_path=self.logo_path
)
# Create directory for the post slug
diff --git a/theme/default/assets/style.css b/theme/default/assets/style.css
index 1663aa4..9b276fc 100644
--- a/theme/default/assets/style.css
+++ b/theme/default/assets/style.css
@@ -12,6 +12,7 @@ header {
padding: 20px;
margin-bottom: 40px;
border-radius: 10px;
+ text-align: center;
}
img {
@@ -22,7 +23,13 @@ hr {
border: 1px solid #efefef;
}
-h1 { margin: 0; }
+h1 {
+ margin: 0;
+}
+
+.header-logo {
+ vertical-align: middle;
+}
.blog-description {
margin: 10px 0 0 0;
@@ -33,6 +40,10 @@ h1 { margin: 0; }
.main-nav {
margin-top: 15px;
font-weight: bold;
+ display: flex;
+ justify-content: center;
+ gap: 10px;
+ flex-wrap: wrap;
}
.nav-item {
diff --git a/theme/default/templates/header.tmpl b/theme/default/templates/header.tmpl
index 22b854c..e92c6f6 100644
--- a/theme/default/templates/header.tmpl
+++ b/theme/default/templates/header.tmpl
@@ -1,5 +1,14 @@
-
+
{{ blog_description }}