mirror of
https://codeberg.org/Reuh/feather.git
synced 2025-10-28 02:29:32 +00:00
feat: use jinja templates for HTML & filenames
This commit is contained in:
parent
75d9367e4f
commit
d29b97ebf5
4 changed files with 121 additions and 29 deletions
|
|
@ -14,7 +14,35 @@ items_per_request = 500
|
|||
data = "data"
|
||||
# Directory path where the user-facing files will be stored.
|
||||
reader = "reader"
|
||||
# Maximum allowed filename length before ellipsing
|
||||
|
||||
[html]
|
||||
# HTML template used for generating item HTML files.
|
||||
template = '''
|
||||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
<body style="background-color:black; color:white;">
|
||||
<style>a{color:palevioletred; text-decoration:none;}</style>
|
||||
<article style="max-width:60rem; margin:auto;">
|
||||
<p style="display:flex; flex-direction:row; justify-content:space-between;">
|
||||
<span>{{ published_formatted }}</span>
|
||||
<span><a href="{{ origin_url }}">{{ origin_title }}</a></span>
|
||||
</p>
|
||||
<h1><a href="{{ canonical_url }}">{{ title }}</a></h1>
|
||||
<h3>{{ author }}</h3>
|
||||
<div>{{ summary | safe }}</div>
|
||||
<div>{{ content | safe }}</div>
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
||||
'''
|
||||
# Filename template for generated HTML files.
|
||||
filename_template = "{{ published_formatted }}\t[{{ origin_title }}]\t{{ title }}.html"
|
||||
# Maximum allowed filename length before truncating.
|
||||
max_filename_length = 200
|
||||
|
||||
[time]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue