forked from ruangrupa/konfluks
fix paths
This commit is contained in:
parent
55050aa3f6
commit
30dbc6212f
@ -17,20 +17,20 @@ from natural import date
|
||||
from slugify import slugify
|
||||
|
||||
# a publicly accessible ICS calendar
|
||||
calendar_url = os.environ.get("CALENDAR_URL", "")
|
||||
calendar_url = os.environ.get("CALENDAR_URL")
|
||||
|
||||
# your Hugo content directory
|
||||
output_dir = os.environ.get("OUTPUT_DIR", "")
|
||||
output_dir = os.environ.get("OUTPUT_DIR")
|
||||
|
||||
cal = Calendar(requests.get(calendar_url).text)
|
||||
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.curdir))
|
||||
template_dir = os.path.join(Path(__file__).parent.resolve(), "templates")
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
|
||||
|
||||
if not os.path.exists(output_dir):
|
||||
os.mkdir(output_dir)
|
||||
|
||||
cwd = Path.resolve()
|
||||
template = env.get_template(os.path.join(cwd, "templates" "calendar.md"))
|
||||
template = env.get_template("calendar.md")
|
||||
|
||||
existing_posts = os.listdir(output_dir)
|
||||
|
@ -192,18 +192,15 @@ if not os.path.exists("etags"):
|
||||
os.mkdir("etags")
|
||||
|
||||
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.curdir))
|
||||
template_dir = os.path.join(Path(__file__).parent.resolve(), "templates")
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
|
||||
|
||||
output_dir = os.environ.get(
|
||||
"OUTPUT_DIR", "/home/r/Programming/lumbung.space/lumbung.space-web/content/posts/"
|
||||
)
|
||||
# output_dir = os.environ.get('OUTPUT_DIR', 'network/')
|
||||
output_dir = os.environ.get("OUTPUT_DIR")
|
||||
|
||||
if not os.path.exists(output_dir):
|
||||
os.makedirs(output_dir)
|
||||
|
||||
cwd = Path.resolve()
|
||||
template = env.get_template(os.path.join(cwd, "templates" "feed.md"))
|
||||
template = env.get_template("feed.md")
|
||||
|
||||
# add iframe to the allowlist of feedparser's sanitizer,
|
||||
# this is now handled in parse_post()
|
||||
|
@ -111,13 +111,13 @@ mastodon = login_mastodon_bot()
|
||||
output_dir = output_dir
|
||||
|
||||
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.curdir))
|
||||
template_dir = os.path.join(Path(__file__).parent.resolve(), "templates")
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
|
||||
|
||||
env.filters["localize_media_url"] = localize_media_url
|
||||
env.filters["filter_mastodon_urls"] = filter_mastodon_urls
|
||||
|
||||
cwd = Path.resolve()
|
||||
template = env.get_template(os.path.join(cwd, "templates" "hashtag.md"))
|
||||
template = env.get_template("hashtag.md")
|
||||
|
||||
|
||||
if not os.path.exists(output_dir):
|
||||
|
@ -35,7 +35,8 @@ def linebreaks(text):
|
||||
return br.sub(r"<br />\n", text)
|
||||
|
||||
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.curdir))
|
||||
template_dir = os.path.join(Path(__file__).parent.resolve(), "templates")
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
|
||||
env.filters["duration"] = duration
|
||||
env.filters["linebreaks"] = linebreaks
|
||||
|
||||
@ -119,8 +120,7 @@ output_dir = os.environ.get(
|
||||
if not os.path.exists(output_dir):
|
||||
os.mkdir(output_dir)
|
||||
|
||||
cwd = Path.resolve()
|
||||
template = env.get_template(os.path.join(cwd, "templates" "video.md"))
|
||||
template = env.get_template("video.md")
|
||||
|
||||
existing_posts = os.listdir(output_dir)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user