Fix JSON-LD, use faster minifier

This commit is contained in:
Stefan 2024-12-03 21:15:46 +00:00
parent 075780ad73
commit 1d59a19168
3 changed files with 9 additions and 9 deletions

View file

@ -2,16 +2,16 @@
{
"@context": "http://schema.org",
"@type": "LocalBusiness",
"name": "{{ name }}",
{%- if email -%}"email": "{{ email }}",{%- endif -%}
{%- if phone -%}"telephone": "{{ phone }}",{%- endif -%}
{%- if web -%}"url": "{{ web }}",{%- endif -%}
{%- if facebook or instagram -%} "sameAs": [
"name": "{{ name }}"
{%- if email -%}, "email": "{{ email }}"{%- endif -%}
{%- if phone -%}, "telephone": "{{ phone }}"{%- endif -%}
{%- if web -%}, "url": "{{ web }}"{%- endif -%}
{%- if facebook or instagram -%}, "sameAs": [
{%- if facebook -%}"{{ facebook }}"{%- endif -%}
{%- if facebook and instagram -%},{%- endif -%}
{%- if instagram -%}"{{ instagram }}"{%- endif -%}
],{%- endif -%}
{%- if google -%}"hasMap": "{{ google }}"{%- endif -%}
]{%- endif -%}
{%- if google -%}, "hasMap": "{{ google }}"{%- endif -%}
{%- if address -%}
, "address": {
"@type": "PostalAddress",

View file

@ -20,7 +20,7 @@ pkgs.stdenv.mkDerivation {
nativeBuildInputs = with pkgs; [
cacert
html-minifier
minify
lightningcss
sass
yarn
@ -46,7 +46,7 @@ pkgs.stdenv.mkDerivation {
yarn --offline eleventy
echo 'Minifying HTML'
html-minifier --input-dir _site --output-dir _site --collapse-whitespace --file-ext html
minify --all --recursive --output . _site
'';
installPhase = ''