ADD Logo configuration for the header #14
This commit is contained in:
parent
cc1cc4639c
commit
b623e17c5a
5 changed files with 44 additions and 7 deletions
20
picopaper.py
20
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue