From 5e3222357b6fc1339185b48c98d536738f534dc8 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 14 Jul 2022 11:22:40 -0400 Subject: [PATCH] Add services config page --- content/en/about/hugo-and-gdpr.md | 3 +- .../getting-started/configuration-services.md | 63 +++++++++++++++++++ content/en/getting-started/configuration.md | 16 +++-- data/docs.json | 18 ++++++ 4 files changed, 92 insertions(+), 8 deletions(-) create mode 100644 content/en/getting-started/configuration-services.md diff --git a/content/en/about/hugo-and-gdpr.md b/content/en/about/hugo-and-gdpr.md index 269c5d43255..d9c461f6798 100644 --- a/content/en/about/hugo-and-gdpr.md +++ b/content/en/about/hugo-and-gdpr.md @@ -4,7 +4,7 @@ linktitle: Hugo and GDPR description: About how to configure your Hugo site to meet the new regulations. date: 2018-05-25 layout: single -keywords: ["GDPR", "Privacy", "Data Protection"] +keywords: [GDPR, privacy, data protection, services] menu: docs: parent: "about" @@ -137,4 +137,3 @@ enableDNT simple : If simple mode is enabled, the video thumbnail is fetched from Vimeo's servers and it is overlayed with a play button. If the user clicks to play the video, it will open in a new tab directly on Vimeo's website. - diff --git a/content/en/getting-started/configuration-services.md b/content/en/getting-started/configuration-services.md new file mode 100644 index 00000000000..d4c8d977a76 --- /dev/null +++ b/content/en/getting-started/configuration-services.md @@ -0,0 +1,63 @@ +--- +title: Configure Services +description: How to configure your site services. +date: 2022-07-14 +categories: [getting started,fundamentals] +keywords: [configuration,services] +weight: 67 +sections_weight: 67 +toc: true +--- + +Configuration for all the relevant services in Hugo. +{{< new-in "0.41.0" >}} + +The default settings for all site services supported by Hugo are as follows: + +{{< code-toggle config="services" />}} + +## Disqus + +Settings relevant to the Disqus template: + +shortname +: The unique identifier assigned to a Disqus site. + +## GoogleAnalytics + +Settings relevant to the Google Analytics (GA) template: + +ID +: The GA tracking ID. + +## Instagram + +Settings relevant to Instagram shortcodes: + +disableInlineCSS +: The Simple variant of the Instagram is decorated with Bootstrap card classes. + Disable inline CSS if you want to provide your own CSS. + +accessToken +: App or client access token. + +## Twitter + +Settings relevant to the Twitter shortcodes: + +disableInlineCSS +: The Simple variant of Twitter is decorated with a basic set of inline styles. + Disable inline CSS if you want to provide your own CSS. + +## RSS + +Settings relevant to RSS feeds: + +limit +: Limit the number of pages. Default value: -1 (unlimited). + +## Privacy config + +The services settings are also relevant to privacy settings. For details, see [Hugo and the GDPR][]. + +[Hugo and the GDPR]: /about/hugo-and-gdpr/ diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 9393e45347e..65cca435211 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -106,7 +106,7 @@ The following is the full list of Hugo-defined variables with their default value in parentheses. Users may choose to override those values in their site config file(s). -### archetypeDir +### archetypeDir **Default value:** "archetypes" @@ -347,7 +347,7 @@ The directory to where Hugo will write the final static site (the HTML files etc ### related : See [Related Content](/content-management/related/#configure-related-content).{{< new-in "0.27" >}} -### relativeURLs +### relativeURLs **Default value:** false @@ -384,7 +384,11 @@ See ["Section Menu for Lazy Bloggers"](/templates/menu-templates/#section-menu-f ### security -See [Security Policy](/about/security-model/#security-policy) +See [Security Policy](/about/security-model/#security-policy). + +### services + +See [Configure Services](/getting-started/configuration-services). ### sitemap Default [sitemap configuration](/templates/sitemap-template/#configuration). @@ -407,13 +411,13 @@ See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies). The directory where Hugo reads the themes from. -### timeout +### timeout **Default value:** "30s" Timeout for generating page contents, specified as a [duration](https://pkg.go.dev/time#Duration) or in milliseconds. *Note:* this is used to bail out of recursive content generation. You might need to raise this limit if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents). -### timeZone +### timeZone {{< new-in "0.87.0" >}} @@ -514,7 +518,7 @@ Content-Security-Policy = "script-src localhost:1313" {{< new-in "0.72.0" >}} -You can also specify simple redirects rules for the server. The syntax is again similar to Netlify's. +You can also specify simple redirects rules for the server. The syntax is again similar to Netlify's. Note that a `status` code of 200 will trigger a [URL rewrite](https://docs.netlify.com/routing/redirects/rewrites-proxies/), which is what you want in SPA situations, e.g: diff --git a/data/docs.json b/data/docs.json index fe4efeb22e8..6db058116c7 100644 --- a/data/docs.json +++ b/data/docs.json @@ -1666,6 +1666,24 @@ ".*" ] } + }, + "services": { + "disqus": { + "shortname": "" + }, + "googleAnalytics": { + "ID": "" + }, + "instagram": { + "disableInlineCSS": false, + "accessToken": "" + }, + "twitter": { + "disableInlineCSS": false + }, + "RSS": { + "limit": -1 + } } }, "media": {