From 39854d71b2afa5e793acb6a76f30b038bf569cca Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 9 Feb 2020 00:01:07 +0000 Subject: refactor(web): Serve static assets to //web/homepage Shuffles around the nginx locations that are served to ensure that all static content will be served from tazj.in/static (including for the blog). --- web/blog/default.nix | 2 -- web/blog/fragments.nix | 24 +++++------------------- 2 files changed, 5 insertions(+), 21 deletions(-) (limited to 'web/blog') diff --git a/web/blog/default.nix b/web/blog/default.nix index 4fa97f2248..73b1bc20e3 100644 --- a/web/blog/default.nix +++ b/web/blog/default.nix @@ -34,8 +34,6 @@ let rendered = pkgs.third_party.runCommandNoCC "tazjins-blog" {} '' mkdir -p $out - cp ${fragments.blogIndex posts} $out/index.html - ${lib.concatStringsSep "\n" (map (post: "cp ${fragments.renderPost post} $out/${post.key}.html" ) posts)} diff --git a/web/blog/fragments.nix b/web/blog/fragments.nix index 4af642c01e..646cd7d317 100644 --- a/web/blog/fragments.nix +++ b/web/blog/fragments.nix @@ -20,15 +20,13 @@ let - + - tazjin's blog${lib.optionalString (title != "") ( - ": " + (escape title) - )} + tazjin's blog: ${escape title} - +
-

tazjin's blog

+

tazjin's interblag


''; @@ -68,18 +66,6 @@ let isDraft = post: (hasAttr "draft" post) && post.draft; isUnlisted = post: (hasAttr "listed" post) && !post.listed; includePost = post: !(isDraft post) && !(isUnlisted post); - - indexEntry= post: "
  • a blog post
  • "; - blogIndex = posts: writeText "blog-index.html" (lib.concatStrings ( - [ - (header "") - "" - footer - ])); in { - inherit blogIndex renderPost; + inherit renderPost; } -- cgit 1.4.1