From 7f1c7da6d155bc4e8d6b12db8e706db55d4ee434 Mon Sep 17 00:00:00 2001 From: weru <fromweru@gmail.com> Date: Fri, 12 Mar 2021 15:34:01 +0000 Subject: [PATCH] edit docs #38 --- exampleSite/content/docs/compose/customize.md | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletions(-) diff --git a/exampleSite/content/docs/compose/customize.md b/exampleSite/content/docs/compose/customize.md index 9fdb153..cd062f2 100644 --- a/exampleSite/content/docs/compose/customize.md +++ b/exampleSite/content/docs/compose/customize.md @@ -49,4 +49,30 @@ Just put the following line in the `[params]` section in your `config.toml` file (and of course change the color): ````toml metaThemeColor = "#123456" -```` \ No newline at end of file +```` + +### How do I add custom styles, scripts, meta tags e.t.c + +Use hooks. Ideally, you should not override the them directly. + +Instead, you should duplicate [these files](https://github.com/chipzoller/hugo-clarity/tree/master/layouts/partials/hooks) at the root of you site directory. + +1. layouts/partials/hooks/head.html +2. layouts/partials/hooks/scripts.html + +The contents of the first file will be attached just before the `</head>` tag. + +The contents of the second file will be attached just before the `</body>` tag. + +Alternatively, if you want to use the `config.toml` to track your custom styles or scripts, and them in as an array(s) under `[params]` like so: + +```toml +... +[params] +customCSS = [styleURL1, styleURL2 ...] +customJS = [scriptURL1, scriptURL2 ... ] +... +``` + +### I want to add custom sass + -- Gitblit v1.10.0