diff --git a/assets/scss/_page.scss b/assets/scss/_page.scss index aa41a7708..815f00666 100644 --- a/assets/scss/_page.scss +++ b/assets/scss/_page.scss @@ -63,3 +63,26 @@ margin-right: calc(var(--mm-spacing) / 3); } } + +.page__toc { + background-color: #F8FAFC; + border: 1px solid var(--mm-color-border); + border-radius: var(--mm-border-radius); + padding: calc(var(--mm-spacing) / 2); + + ul { + margin: 0; + } + + ul ul { + margin-top: calc(var(--mm-spacing) / 8); + } + + li { + margin-bottom: calc(var(--mm-spacing) / 8); + } +} + +.page__toc__title { + margin-top: 0; +} diff --git a/content/geoip/docs/web-services/requests.md b/content/geoip/docs/web-services/requests.md index dc922ce3d..f7ff3c4df 100644 --- a/content/geoip/docs/web-services/requests.md +++ b/content/geoip/docs/web-services/requests.md @@ -1,6 +1,7 @@ --- draft: false title: GeoIP and GeoLite API Requests +type: "has-toc" --- ## Authorization and Security diff --git a/content/geoip/docs/web-services/responses.md b/content/geoip/docs/web-services/responses.md index f6cd6f83d..de82bcc02 100644 --- a/content/geoip/docs/web-services/responses.md +++ b/content/geoip/docs/web-services/responses.md @@ -1,6 +1,7 @@ --- draft: false title: GeoIP and GeoLite API Responses +type: "has-toc" --- ## Headers diff --git a/content/minfraud/api-documentation/requests.md b/content/minfraud/api-documentation/requests.md index d9106f678..e76758617 100644 --- a/content/minfraud/api-documentation/requests.md +++ b/content/minfraud/api-documentation/requests.md @@ -1,6 +1,7 @@ --- draft: false title: minFraud API Requests +type: "has-toc" --- ## Authorization and Security diff --git a/content/minfraud/api-documentation/responses.md b/content/minfraud/api-documentation/responses.md index 2568a49c9..36be2d5d7 100644 --- a/content/minfraud/api-documentation/responses.md +++ b/content/minfraud/api-documentation/responses.md @@ -1,6 +1,7 @@ --- draft: false title: minFraud API Responses +type: "has-toc" --- ## Headers diff --git a/layouts/partials/page.html b/layouts/partials/page.html index d2a7b3f94..28a2c6a74 100644 --- a/layouts/partials/page.html +++ b/layouts/partials/page.html @@ -4,6 +4,13 @@

{{ .Title }}

+ {{ if eq .Type "has-toc" }} +
+

On this page

+ {{ .TableOfContents }} +
+ {{ end }} + {{ .Content }} {{ if eq .Type "release-note" }}