diff --git a/preview.ts b/preview.ts index f515255..ed2f527 100644 --- a/preview.ts +++ b/preview.ts @@ -25,7 +25,7 @@ createServer((req, res) => { req_path = path.join(__dirname, "build", "404.html"); } //set content type - let non_utf8_content_types: string[] = ["image/png", "image/gif", "image/jpeg", "video/mp4"]; + let non_utf8_content_types: string[] = ["image/png", "image/gif", "image/jpeg", "video/mp4", "font/woff2"]; let content_type: string; switch (req_path.split(".")[1]) { case "html": @@ -53,6 +53,9 @@ createServer((req, res) => { case "mp4": content_type = "video/mp4"; break; + case "woff2": + content_type = "font/woff2"; + break; default: content_type = "text/plain"; } diff --git a/static/linjalipamanka-lili.woff2 b/static/linjalipamanka-lili.woff2 new file mode 100644 index 0000000..3bd122b Binary files /dev/null and b/static/linjalipamanka-lili.woff2 differ diff --git a/static/styles/post.css b/static/styles/post.css index 9be4216..233890d 100644 --- a/static/styles/post.css +++ b/static/styles/post.css @@ -1,3 +1,8 @@ +@font-face { + font-family: linjalipamanka; + src: url(/linjalipamanka-lili.woff2); +} + #post-md { margin-top: 7px; display: none; @@ -14,3 +19,7 @@ #next-post-container { padding-top: 10px; } + +.code-toki-pona { + font-family: linjalipamanka !important; +}