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", "@context": "http://schema.org",
"@type": "LocalBusiness", "@type": "LocalBusiness",
"name": "{{ name }}", "name": "{{ name }}"
{%- if email -%}"email": "{{ email }}",{%- endif -%} {%- if email -%}, "email": "{{ email }}"{%- endif -%}
{%- if phone -%}"telephone": "{{ phone }}",{%- endif -%} {%- if phone -%}, "telephone": "{{ phone }}"{%- endif -%}
{%- if web -%}"url": "{{ web }}",{%- endif -%} {%- if web -%}, "url": "{{ web }}"{%- endif -%}
{%- if facebook or instagram -%} "sameAs": [ {%- if facebook or instagram -%}, "sameAs": [
{%- if facebook -%}"{{ facebook }}"{%- endif -%} {%- if facebook -%}"{{ facebook }}"{%- endif -%}
{%- if facebook and instagram -%},{%- endif -%} {%- if facebook and instagram -%},{%- endif -%}
{%- if instagram -%}"{{ instagram }}"{%- endif -%} {%- if instagram -%}"{{ instagram }}"{%- endif -%}
],{%- endif -%} ]{%- endif -%}
{%- if google -%}"hasMap": "{{ google }}"{%- endif -%} {%- if google -%}, "hasMap": "{{ google }}"{%- endif -%}
{%- if address -%} {%- if address -%}
, "address": { , "address": {
"@type": "PostalAddress", "@type": "PostalAddress",

View file

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