From 53d8dd6a1e56533dbe33a711bdec792cd477f0c7 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 1 Apr 2021 00:49:21 +0200 Subject: feat(ops/nixos/www): Serve rendered Tvix component SVG (hack!) This is a quick hack to make it possible to view the rendered SVG on https://code.tvl.fyi/about/tvix/docs/components.md We want to be able to do this sort of thing dynamically in the future, but we can't yet, so ... well. Deal with it. Change-Id: Id2b819679d748b6f517018a9c6e72d5c1d806c4c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2743 Reviewed-by: flokli Tested-by: BuildkiteCI --- ops/nixos/www/code.tvl.fyi.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ops/nixos/www/code.tvl.fyi.nix b/ops/nixos/www/code.tvl.fyi.nix index 5ee33f39ca..e16c0512d9 100644 --- a/ops/nixos/www/code.tvl.fyi.nix +++ b/ops/nixos/www/code.tvl.fyi.nix @@ -12,6 +12,13 @@ forceSSL = true; extraConfig = '' + # Serve the rendered Tvix component SVG. + # + # TODO(tazjin): Implement a way of serving this dynamically + location = /about/tvix/docs/component-flow.svg { + alias ${config.depot.tvix.docs.svg}/component-flow.svg; + } + # Static assets must always hit the root. location ~ ^/(favicon\.ico|cgit\.(css|png))$ { proxy_pass http://localhost:2448; -- cgit 1.4.1