Skip to content

Commit

Permalink
add analytics b/c evil
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Jun 23, 2024
1 parent 965002c commit 3c8266e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
import jinja2 # type: ignore
import pytz # type: ignore

PROJECT_DIR = os.environ["PROJECT_ROOT"]

je = jinja2.Environment()
je = jinja2.Environment(loader=jinja2.FileSystemLoader(f"{PROJECT_DIR}/src"))


# DATA
Expand Down Expand Up @@ -165,7 +166,7 @@ def compile_feed(posts: PostIndex):


def main():
os.chdir(os.environ["PROJECT_ROOT"])
os.chdir(PROJECT_DIR)

with Path("src/posts/index.json").open("r") as fp:
posts = {k: PostMeta.parse(v) for k, v in json.load(fp).items()}
Expand Down
5 changes: 5 additions & 0 deletions src/head.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/assets/css/global.css" />
<link href="https://sunsetglow.net/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed" />
<script defer src="https://ozu.sunsetglow.net/script.js" data-website-id="6519316e-0391-4a7b-ae2a-f308d136b119"></script>
7 changes: 2 additions & 5 deletions src/index.jinja
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/assets/css/global.css" />
<link rel="stylesheet" type="text/css" href="/assets/css/index.css" />
<link href="https://sunsetglow.net/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed" />
{% include "head.jinja" %}
<title>sunset glow</title>
<link rel="stylesheet" type="text/css" href="/assets/css/index.css" />
</head>
<body>
<div class="flex flex-col gap-2 p-4">
Expand Down
6 changes: 2 additions & 4 deletions src/posts/template.jinja
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/assets/css/global.css" />
<link rel="stylesheet" type="text/css" href="/assets/css/post.css" />
{% include "head.jinja" %}
<title>{{ meta.title }}</title>
<link rel="stylesheet" type="text/css" href="/assets/css/post.css" />
</head>
<body>
<div class="w-content mx-auto p-8">
Expand Down

0 comments on commit 3c8266e

Please sign in to comment.