diff options
author | Vincent Ambo <mail@tazj.in> | 2023-10-04T20·38+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-10-05T17·14+0000 |
commit | ddbb25e145a06d7e7b230135c208f2747a9e44e0 (patch) | |
tree | 740d5ecc34644608ae820d8be30b2eed5f7268f1 /tvix/website/default.nix | |
parent | cb807ad79b318547a5e371c1fc4ce904e3bedf40 (diff) |
feat(tvix/website): add structured data for search engines r/6710
This closes b/303. Change-Id: Icaeccba23a2590c22106bed6e859ed3188c87a02 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9540 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/website/default.nix')
-rw-r--r-- | tvix/website/default.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tvix/website/default.nix b/tvix/website/default.nix index 2d7bce7eaf8d..a2fc247e4a48 100644 --- a/tvix/website/default.nix +++ b/tvix/website/default.nix @@ -1,6 +1,21 @@ { depot, lib, pkgs, ... }: let + description = "Rust implementation of the purely-functional Nix package manager"; + + # https://developers.google.com/search/docs/advanced/structured-data/ + # https://schema.org/SoftwareApplication + structuredData = { + "@context" = "https://schema.org"; + "@type" = "SoftwareApplication"; + name = "Tvix"; + url = "https://tvix.dev"; + abstract = description; + applicationCategory = "DeveloperApplication"; + contributor = "https://tvl.fyi"; + image = "https://tvix.dev/logo.webp"; + }; + # All Tvix-related blog posts from the main TVL website tvixPosts = builtins.filter (post: !(post.draft or false) && (lib.hasInfix "Tvix" post.title)) @@ -14,6 +29,13 @@ let ${builtins.readFile ./landing-en.md} ${builtins.concatStringsSep "\n" postListEntries} ''; + + extraHead = '' + <meta name="description" content="${description}"> + <script type="application/ld+json"> + ${builtins.toJSON structuredData} + </script> + ''; }; in |