diff options
author | danielkvist <d94.zaragoza@gmail.com> | 2019-03-13 19:45:21 +0300 |
---|---|---|
committer | danielkvist <d94.zaragoza@gmail.com> | 2019-03-13 19:45:21 +0300 |
commit | 19fea6b4dc1f5e7775864c01e8bd31c7f02da00e (patch) | |
tree | 77a3952728c26d208327ceb1922b8ebe2d9badf9 | |
parent | 2fa584f79747a883140617917432ae530c8b5320 (diff) |
add Font Awesome optionsv2.2
-rw-r--r-- | exampleSite/config.toml | 6 | ||||
-rw-r--r-- | layouts/partials/fontawesome.html | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9953f06..06c0d61 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -26,9 +26,13 @@ themesDir = "../.." # Not necessary on production sites cta = "Contact" link = "contact" # Relative URL -[params.separator] # Separator between section on the home page +[params.separator] # Separators between section on the home page show = false +[params.fa] # Font Awesome options + version = "5.7.2" + integrity = "sha384-0pzryjIRos8mFBWMzSSZApWtPl/5++eIfzYmTgBBmXYdhvxPc+XcFEk+zJwDgWbP" + [params.form] # Contact form netlify = true # Use only if you are using Netlify action = "https://formspree.io/your@email.com" diff --git a/layouts/partials/fontawesome.html b/layouts/partials/fontawesome.html new file mode 100644 index 0000000..6cc5fd5 --- /dev/null +++ b/layouts/partials/fontawesome.html @@ -0,0 +1,15 @@ +{{ $version := "5.7.2" }} +{{ $integrity := "sha384-0pzryjIRos8mFBWMzSSZApWtPl/5++eIfzYmTgBBmXYdhvxPc+XcFEk+zJwDgWbP" }} +{{ if and $.Site.Params.fa.version $.Site.Params.fa.integrity }} +{{ $version = $.Site.Params.fa.version }} +{{ $integrity = $.Site.Params.fa.integrity }} +{{ end }} + +{{ $src := printf "%s%s%s" "https://use.fontawesome.com/releases/v" $version "/js/all.js" }} + +<script + defer + src="{{ $src }}" + integrity="{{ $integrity }}" + crossorigin="anonymous" +></script> |