mirror of https://github.com/docker/docs.git
Merge pull request #15277 from crazy-max/test-fb
jekyll: add hotjar for staging environment
This commit is contained in:
commit
9c04beffd0
|
@ -49,7 +49,12 @@ ENV TARGET=/out
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
--mount=type=cache,target=/src/.jekyll-cache <<EOT
|
--mount=type=cache,target=/src/.jekyll-cache <<EOT
|
||||||
set -eu
|
set -eu
|
||||||
CONFIG_FILES=_config.yml$([ "$JEKYLL_ENV" = "production" ] && echo ",_config_production.yml" || true)
|
CONFIG_FILES="_config.yml"
|
||||||
|
if [ "${JEKYLL_ENV}" = "production" ]; then
|
||||||
|
CONFIG_FILES="${CONFIG_FILES},_config_prod.yml"
|
||||||
|
elif [ "${DOCS_URL}" = "https://docs-stage.docker.com" ]; then
|
||||||
|
CONFIG_FILES="${CONFIG_FILES},_config_stage.yml"
|
||||||
|
fi
|
||||||
set -x
|
set -x
|
||||||
bundle exec jekyll build --profile -d ${TARGET} --config ${CONFIG_FILES}
|
bundle exec jekyll build --profile -d ${TARGET} --config ${CONFIG_FILES}
|
||||||
EOT
|
EOT
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
##
|
||||||
|
# This file overrides options set in _config.yml for staging environment (https://docs-stage.docker.com/)
|
||||||
|
##
|
||||||
|
|
||||||
|
hotjar_id: 3218181
|
|
@ -0,0 +1,13 @@
|
||||||
|
{%- if site.hotjar_id != '' and page.skip_feedback != true -%}
|
||||||
|
<!-- Hotjar Tracking Code for https://docs.docker.com -->
|
||||||
|
<script>
|
||||||
|
(function(h,o,t,j,a,r){
|
||||||
|
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
||||||
|
h._hjSettings={hjid:{{ site.hotjar_id }},hjsv:6};
|
||||||
|
a=o.getElementsByTagName('head')[0];
|
||||||
|
r=o.createElement('script');r.async=1;
|
||||||
|
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
|
||||||
|
a.appendChild(r);
|
||||||
|
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
|
||||||
|
</script>
|
||||||
|
{%- endif -%}
|
|
@ -73,6 +73,7 @@
|
||||||
{%- if site.local_search -%}
|
{%- if site.local_search -%}
|
||||||
<script defer src="/assets/js/search.js"></script>
|
<script defer src="/assets/js/search.js"></script>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
{%- include feedback.html -%}
|
||||||
|
|
||||||
{%- comment -%}
|
{%- comment -%}
|
||||||
preload fonts: https://www.freecodecamp.org/news/web-fonts-in-2018-f191a48367e8/
|
preload fonts: https://www.freecodecamp.org/news/web-fonts-in-2018-f191a48367e8/
|
||||||
|
|
|
@ -19,17 +19,18 @@ The front-matter of a given page is in a section at the top of the Markdown
|
||||||
file that starts and ends with three hyphens. It includes YAML content. The
|
file that starts and ends with three hyphens. It includes YAML content. The
|
||||||
following keys are supported. The title, description, and keywords are required.
|
following keys are supported. The title, description, and keywords are required.
|
||||||
|
|
||||||
| Key | Required | Description |
|
| Key | Required | Description |
|
||||||
|------------------------|-----------|-----------------------------------------|
|
|----------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| title | yes | The page title. This is added to the HTML output as a `<h1>` level header. |
|
| title | yes | The page title. This is added to the HTML output as a `<h1>` level header. |
|
||||||
| description | yes | A sentence that describes the page contents. This is added to the HTML metadata. It’s not rendered on the page. |
|
| description | yes | A sentence that describes the page contents. This is added to the HTML metadata. It’s not rendered on the page. |
|
||||||
| keywords | yes | A comma-separated list of keywords. These are added to the HTML metadata. |
|
| keywords | yes | A comma-separated list of keywords. These are added to the HTML metadata. |
|
||||||
| redirect_from | no | A YAML list of pages which should redirect to the current page. At build time, each page listed here is created as an HTML stub containing a 302 redirect to this page. |
|
| redirect_from | no | A YAML list of pages which should redirect to the current page. At build time, each page listed here is created as an HTML stub containing a 302 redirect to this page. |
|
||||||
| notoc | no | Either `true` or `false`. If `true`, no in-page TOC is generated for the HTML output of this page. Defaults to `false`. Appropriate for some landing pages that have no in-page headings.|
|
| notoc | no | Either `true` or `false`. If `true`, no in-page TOC is generated for the HTML output of this page. Defaults to `false`. Appropriate for some landing pages that have no in-page headings. |
|
||||||
| toc_min | no | Ignored if `notoc` is set to `true`. The minimum heading level included in the in-page TOC. Defaults to `2`, to show `<h2>` headings as the minimum. |
|
| toc_min | no | Ignored if `notoc` is set to `true`. The minimum heading level included in the in-page TOC. Defaults to `2`, to show `<h2>` headings as the minimum. |
|
||||||
| toc_max | no | Ignored if `notoc` is set to `false`. The maximum heading level included in the in-page TOC. Defaults to `3`, to show `<h3>` headings. Set to the same as `toc_min` to only show `toc_min` level of headings. |
|
| toc_max | no | Ignored if `notoc` is set to `false`. The maximum heading level included in the in-page TOC. Defaults to `3`, to show `<h3>` headings. Set to the same as `toc_min` to only show `toc_min` level of headings. |
|
||||||
| skip_read_time | no | Set to `true` to disable the 'Estimated reading time' banner for this page. |
|
| skip_read_time | no | Set to `true` to disable the 'Estimated reading time' banner for this page. |
|
||||||
| sitemap | no | Exclude the page from indexing by search engines. When set to `false`, the page is excluded from `sitemap.xml`, and a `<meta name="robots" content="noindex"/>` header is added to the page. |
|
| skip_feedback | no | Set to `true` to disable the Feedback widget for this page. |
|
||||||
|
| sitemap | no | Exclude the page from indexing by search engines. When set to `false`, the page is excluded from `sitemap.xml`, and a `<meta name="robots" content="noindex"/>` header is added to the page. |
|
||||||
|
|
||||||
Here's an example of a valid (but contrived) page metadata. The order of
|
Here's an example of a valid (but contrived) page metadata. The order of
|
||||||
the metadata elements in the front-matter isn't important.
|
the metadata elements in the front-matter isn't important.
|
||||||
|
|
Loading…
Reference in New Issue