Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add services config page #1781

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions content/en/about/hugo-and-gdpr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.

63 changes: 63 additions & 0 deletions content/en/getting-started/configuration-services.md
Original file line number Diff line number Diff line change
@@ -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/
16 changes: 10 additions & 6 deletions content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,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"

Expand Down Expand Up @@ -369,7 +369,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

Expand Down Expand Up @@ -406,7 +406,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).
Expand All @@ -429,13 +433,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:*&nbsp;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" >}}

Expand Down Expand Up @@ -536,7 +540,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:

Expand Down
18 changes: 18 additions & 0 deletions data/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,24 @@
".*"
]
}
},
"services": {
"disqus": {
"shortname": ""
},
"googleAnalytics": {
"ID": ""
},
"instagram": {
"disableInlineCSS": false,
"accessToken": ""
},
"twitter": {
"disableInlineCSS": false
},
"RSS": {
"limit": -1
}
}
},
"media": {
Expand Down