From 31dbcfde9f030bc8ee6a82c90c8af4b2db23cf54 Mon Sep 17 00:00:00 2001 From: Carson Yang Date: Wed, 13 Sep 2023 09:29:17 +0800 Subject: [PATCH] Docs: update cdn (#291) Signed-off-by: Carson Yang --- .../partials/docs/footer/footer-scripts.html | 2 +- docSite/layouts/partials/google-fonts.html | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 docSite/layouts/partials/google-fonts.html diff --git a/docSite/layouts/partials/docs/footer/footer-scripts.html b/docSite/layouts/partials/docs/footer/footer-scripts.html index 7ad746e9c..eba00a395 100644 --- a/docSite/layouts/partials/docs/footer/footer-scripts.html +++ b/docSite/layouts/partials/docs/footer/footer-scripts.html @@ -63,7 +63,7 @@ diff --git a/docSite/layouts/partials/google-fonts.html b/docSite/layouts/partials/google-fonts.html new file mode 100644 index 000000000..5ba511e1d --- /dev/null +++ b/docSite/layouts/partials/google-fonts.html @@ -0,0 +1,14 @@ +{{ if .Site.Params.google_fonts }} + {{ $fonts := slice }} + {{ range .Site.Params.google_fonts }} + {{ $family := replace (index (.) 0) " " "+" }} + {{ $weights := replace (index (.) 1) " " "" }} + {{ $string := print $family ":" $weights }} + {{ $fonts = $fonts | append $string }} + {{ end }} + {{ $url_part := (delimit $fonts "|") | safeHTMLAttr }} + + + +{{ else}} +{{ end }} \ No newline at end of file