From 4d426ef841a72da087ac699bf4ab2621a46a6f60 Mon Sep 17 00:00:00 2001 From: kemsguy7 Date: Tue, 22 Oct 2024 18:49:22 +0100 Subject: [PATCH 1/5] added the preview html and styles --- assets/js/preview-fade.js | 12 +++++ assets/scss/preview-fade.scss | 51 +++++++++++++++++++ .../languages/js/getting-started/nodejs.md | 4 +- layouts/shortcodes/preview_fade.html | 9 ++++ package.json | 6 +-- 5 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 assets/js/preview-fade.js create mode 100644 assets/scss/preview-fade.scss create mode 100644 layouts/shortcodes/preview_fade.html diff --git a/assets/js/preview-fade.js b/assets/js/preview-fade.js new file mode 100644 index 000000000000..872a48fb163d --- /dev/null +++ b/assets/js/preview-fade.js @@ -0,0 +1,12 @@ +document.addEventListener('DOMContentLoaded', function() { + document.querySelectorAll('.preview-fade').forEach(container => { + const button = container.querySelector('.expand-button'); + const buttonText = container.querySelector('.expand-text'); + + button.addEventListener('click', () => { + const isCollapsed = container.dataset.state === 'collapsed'; + container.dataset.state = isCollapsed ? 'expanded' : 'collapsed'; + buttonText.textContent = isCollapsed ? 'Show Less' : 'Show More'; + }); + }); + }); \ No newline at end of file diff --git a/assets/scss/preview-fade.scss b/assets/scss/preview-fade.scss new file mode 100644 index 000000000000..16dfeffdacf5 --- /dev/null +++ b/assets/scss/preview-fade.scss @@ -0,0 +1,51 @@ + +.preview-fade { + position: relative; + border: 1px solid var(--gray-200); + border-radius: 0.375rem; + background: var(--gray-100); + margin: 1rem 0; + } + + .preview-content { + padding: 1rem; + margin: 0; + overflow-x: auto; + } + + .preview-fade[data-state="collapsed"] .preview-content { + max-height: 150px; + } + + .preview-fade[data-state="expanded"] .preview-content { + max-height: none; + } + + .fade-overlay { + position: absolute; + bottom: 2.5rem; + left: 0; + right: 0; + height: 4rem; + background: linear-gradient(to top, var(--gray-100), transparent); + pointer-events: none; + } + + .preview-fade[data-state="expanded"] .fade-overlay { + display: none; + } + + .expand-button { + width: 100%; + padding: 0.5rem; + border: none; + border-top: 1px solid var(--gray-200); + background: var(--gray-100); + color: var(--gray-700); + cursor: pointer; + font-size: 0.875rem; + } + + .expand-button:hover { + background: var(--gray-200); + } \ No newline at end of file diff --git a/content/en/docs/languages/js/getting-started/nodejs.md b/content/en/docs/languages/js/getting-started/nodejs.md index 4197b9118e0f..59080c93a840 100644 --- a/content/en/docs/languages/js/getting-started/nodejs.md +++ b/content/en/docs/languages/js/getting-started/nodejs.md @@ -17,7 +17,7 @@ below. Look [here](/docs/languages/js) for more info about the status of OpenTelemetry in JavaScript. {{% /alert %}} ## Prerequisites - + Ensure that you have the following installed locally: - [Node.js](https://nodejs.org/en/download/) @@ -467,7 +467,7 @@ the console output, such as the following: ``` - + ## Next Steps Enrich your instrumentation generated automatically with diff --git a/layouts/shortcodes/preview_fade.html b/layouts/shortcodes/preview_fade.html new file mode 100644 index 000000000000..1c352737dca8 --- /dev/null +++ b/layouts/shortcodes/preview_fade.html @@ -0,0 +1,9 @@ +
+
+ {{ .Inner | safeHTML }} +
+
+ +
\ No newline at end of file diff --git a/package.json b/package.json index 0beecdac83d4..88039d0cf9ce 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,12 @@ "Notes": [ "The 'all' runs _all_ named scripts in sequence, even if one fails; and exits with failure in that case." ], - "scripts": { + "scripts": { "__check:links": "make --keep-going check-links", "_build": "npm run _hugo -- -e dev --buildDrafts --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"", "_check:format:any": "npx prettier --check --ignore-path ''", "_check:format:ja+zh": "npm run _check:format:nowrap -- content/ja content/zh", - "_check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve", + "_check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve", "_check:format": "npx prettier --check .", "_check:links--md": "npx markdown-link-check --config .markdown-link-check.json *.md", "_check:links--warn": "npm run _check:links || (echo; echo 'WARNING: see link-checker output for issues.'; echo)", @@ -156,7 +156,7 @@ "node": "20.x" }, "gitHubActionCacheKey": "2023-07-13 - change this key to force cache refresh", - "private": true, + "private": true, "prettier": { "proseWrap": "always", "singleQuote": true From 9c5f08cd65f6862b048433c681926de4a0b40e9b Mon Sep 17 00:00:00 2001 From: kemsguy7 Date: Wed, 23 Oct 2024 03:34:57 +0100 Subject: [PATCH 2/5] updates: added jquery for Show More functionality for the json output --- assets/js/preview-fade.js | 12 ----- assets/scss/preview-fade.scss | 51 ------------------- .../languages/js/getting-started/nodejs.md | 23 +++++---- layouts/shortcodes/preview_fade.html | 9 ---- 4 files changed, 14 insertions(+), 81 deletions(-) delete mode 100644 assets/js/preview-fade.js delete mode 100644 assets/scss/preview-fade.scss delete mode 100644 layouts/shortcodes/preview_fade.html diff --git a/assets/js/preview-fade.js b/assets/js/preview-fade.js deleted file mode 100644 index 872a48fb163d..000000000000 --- a/assets/js/preview-fade.js +++ /dev/null @@ -1,12 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - document.querySelectorAll('.preview-fade').forEach(container => { - const button = container.querySelector('.expand-button'); - const buttonText = container.querySelector('.expand-text'); - - button.addEventListener('click', () => { - const isCollapsed = container.dataset.state === 'collapsed'; - container.dataset.state = isCollapsed ? 'expanded' : 'collapsed'; - buttonText.textContent = isCollapsed ? 'Show Less' : 'Show More'; - }); - }); - }); \ No newline at end of file diff --git a/assets/scss/preview-fade.scss b/assets/scss/preview-fade.scss deleted file mode 100644 index 16dfeffdacf5..000000000000 --- a/assets/scss/preview-fade.scss +++ /dev/null @@ -1,51 +0,0 @@ - -.preview-fade { - position: relative; - border: 1px solid var(--gray-200); - border-radius: 0.375rem; - background: var(--gray-100); - margin: 1rem 0; - } - - .preview-content { - padding: 1rem; - margin: 0; - overflow-x: auto; - } - - .preview-fade[data-state="collapsed"] .preview-content { - max-height: 150px; - } - - .preview-fade[data-state="expanded"] .preview-content { - max-height: none; - } - - .fade-overlay { - position: absolute; - bottom: 2.5rem; - left: 0; - right: 0; - height: 4rem; - background: linear-gradient(to top, var(--gray-100), transparent); - pointer-events: none; - } - - .preview-fade[data-state="expanded"] .fade-overlay { - display: none; - } - - .expand-button { - width: 100%; - padding: 0.5rem; - border: none; - border-top: 1px solid var(--gray-200); - background: var(--gray-100); - color: var(--gray-700); - cursor: pointer; - font-size: 0.875rem; - } - - .expand-button:hover { - background: var(--gray-200); - } \ No newline at end of file diff --git a/content/en/docs/languages/js/getting-started/nodejs.md b/content/en/docs/languages/js/getting-started/nodejs.md index 59080c93a840..921c2deed1cf 100644 --- a/content/en/docs/languages/js/getting-started/nodejs.md +++ b/content/en/docs/languages/js/getting-started/nodejs.md @@ -16,7 +16,7 @@ for Node.js is still under development hence an example for it is not provided below. Look [here](/docs/languages/js) for more info about the status of OpenTelemetry in JavaScript. {{% /alert %}} -## Prerequisites +## Prerequisites Ensure that you have the following installed locally: @@ -51,10 +51,10 @@ npm install typescript \ ts-node \ @types/node \ express \ - @types/express + @types/express # initialize typescript -npx tsc --init +npx tsc --init ``` {{% /tab %}} {{% tab JavaScript %}} @@ -251,8 +251,9 @@ Open in your web browser and reload the page a few times. After a while you should see the spans printed in the console by the `ConsoleSpanExporter`. -
-View example output + +{{% preview-fade %}} ```json { @@ -333,15 +334,18 @@ few times. After a while you should see the spans printed in the console by the } ``` -
+{{% /preview-fade %}} + + The generated span tracks the lifetime of a request to the `/rolldice` route. Send a few more requests to the endpoint. After a moment, you'll see metrics in the console output, such as the following: -
-View example output + +{{% preview-fade %}} ```yaml { @@ -466,7 +470,8 @@ the console output, such as the following: } ``` -
+{{% /preview-fade %}} + ## Next Steps diff --git a/layouts/shortcodes/preview_fade.html b/layouts/shortcodes/preview_fade.html deleted file mode 100644 index 1c352737dca8..000000000000 --- a/layouts/shortcodes/preview_fade.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
- {{ .Inner | safeHTML }} -
-
- -
\ No newline at end of file From 887493fca30e72fc31644665475a4600452a5268 Mon Sep 17 00:00:00 2001 From: kemsguy7 Date: Wed, 23 Oct 2024 10:49:32 +0100 Subject: [PATCH 3/5] moved assets and shortcode to root directory --- assets/js/preview-fade.js | 12 +++++ assets/scss/_preview-fade.scss | 50 +++++++++++++++++++ assets/scss/_styles_project.scss | 1 + .../languages/js/getting-started/nodejs.md | 4 +- content/en/ecosystem/registry/_index.md | 2 +- layouts/partials/hooks/body-end.html | 1 + layouts/shortcodes/preview-fade.html | 9 ++++ 7 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 assets/js/preview-fade.js create mode 100644 assets/scss/_preview-fade.scss create mode 100644 layouts/shortcodes/preview-fade.html diff --git a/assets/js/preview-fade.js b/assets/js/preview-fade.js new file mode 100644 index 000000000000..bac16bf74a09 --- /dev/null +++ b/assets/js/preview-fade.js @@ -0,0 +1,12 @@ +document.addEventListener('DOMContentLoaded', function() { + document.querySelectorAll('.preview-fade').forEach(container => { + const button = container.querySelector('.expand-button'); + const buttonText = container.querySelector('.expand-text'); + + button.addEventListener('click', () => { + const isCollapsed = container.dataset.state === 'collapsed'; + container.dataset.state = isCollapsed ? 'expanded' : 'collapsed'; + buttonText.textContent = isCollapsed ? 'Show Less' : 'Show More'; + }); + }); + }); \ No newline at end of file diff --git a/assets/scss/_preview-fade.scss b/assets/scss/_preview-fade.scss new file mode 100644 index 000000000000..e2b7f30055c3 --- /dev/null +++ b/assets/scss/_preview-fade.scss @@ -0,0 +1,50 @@ +.preview-fade { + position: relative; + border: 1px solid var(--gray-200); + border-radius: 0.375rem; + background: var(--gray-100); + margin: 1rem 0; +} + +.preview-content { + padding: 1rem; + margin: 0; + overflow-x: auto; +} + +.preview-fade[data-state='collapsed'] .preview-content { + max-height: 150px; +} + +.preview-fade[data-state='expanded'] .preview-content { + max-height: none; +} + +.fade-overlay { + position: absolute; + bottom: 2.5rem; + left: 0; + right: 0; + height: 4rem; + background: linear-gradient(to top, var(--gray-100), transparent); + pointer-events: none; +} + +.preview-fade[data-state='expanded'] .fade-overlay { + display: none; +} + +.expand-button { + width: 100%; + padding: 0.5rem; + border: none; + border-top: 1px solid var(--gray-200); + background: var(--gray-100); + color: var(--gray-700); + cursor: pointer; + font-size: 0.875rem; +} + +.expand-button:hover { + background: var(--gray-200); +} diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index 6de8eb1b3b6a..a8d29aebd105 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -5,6 +5,7 @@ @import 'tabs'; @import 'external_link'; @import 'td/code-dark'; +@import 'preview-fade'; .td-home { .otel-logo { diff --git a/content/en/docs/languages/js/getting-started/nodejs.md b/content/en/docs/languages/js/getting-started/nodejs.md index 921c2deed1cf..0eb16754ba4e 100644 --- a/content/en/docs/languages/js/getting-started/nodejs.md +++ b/content/en/docs/languages/js/getting-started/nodejs.md @@ -11,7 +11,7 @@ This page will show you how to get started with OpenTelemetry in Node.js. You will learn how to instrument both [traces][] and [metrics][] and log them to the console. -{{% alert title="Note" color="info" %}} The logging library for OpenTelemetry +{{% alert title="Note" color="info" %}} The logging library for OpenTelemetry for Node.js is still under development hence an example for it is not provided below. Look [here](/docs/languages/js) for more info about the status of OpenTelemetry in JavaScript. {{% /alert %}} @@ -482,7 +482,7 @@ codebase. This gets you customized observability data. You'll also want to configure an appropriate exporter to [export your telemetry data](/docs/languages/js/exporters) to one or more telemetry backends. - + If you'd like to explore a more complex example, take a look at the [OpenTelemetry Demo](/docs/demo/), which includes the JavaScript based [Payment Service](/docs/demo/services/payment/) and the TypeScript based diff --git a/content/en/ecosystem/registry/_index.md b/content/en/ecosystem/registry/_index.md index 0b671e5499d2..392fff1fcdac 100644 --- a/content/en/ecosystem/registry/_index.md +++ b/content/en/ecosystem/registry/_index.md @@ -11,7 +11,7 @@ description: >- # redirect rule to avoid the loop, as suggested by Netlify support # (email support ID 159489): redirects: [{ from: /ecosystem/registry*, to: '/ecosystem/registry?' }] -aliases: [/registry/*] +aliases: [/registry/*] type: default layout: registry outputs: [html, json] diff --git a/layouts/partials/hooks/body-end.html b/layouts/partials/hooks/body-end.html index 9df70d272006..b5ea4a642cf2 100644 --- a/layouts/partials/hooks/body-end.html +++ b/layouts/partials/hooks/body-end.html @@ -2,3 +2,4 @@ {{ partial "script.html" (dict "src" "js/tracing.js") -}} {{ end -}} {{ partial "script.html" (dict "src" "js/navScroll.js") -}} +{{ partial "script.html" (dict "src" "js/preview-fade.js") -}} \ No newline at end of file diff --git a/layouts/shortcodes/preview-fade.html b/layouts/shortcodes/preview-fade.html new file mode 100644 index 000000000000..c99d4c80a930 --- /dev/null +++ b/layouts/shortcodes/preview-fade.html @@ -0,0 +1,9 @@ +
+
+ {{ .Inner | safeHTML }} +
+
+ +
\ No newline at end of file From dff2c2f8869be57d3c0719c082bdb23514ac3baa Mon Sep 17 00:00:00 2001 From: kemsguy7 Date: Fri, 25 Oct 2024 14:37:14 +0100 Subject: [PATCH 4/5] updates: fixed linking of shortcode and scss --- assets/js/preview-fade.js | 41 ++++++-- assets/scss/_preview-fade.scss | 95 ++++++++++--------- assets/scss/_styles_project.scss | 54 ++++++++++- .../languages/js/getting-started/nodejs.md | 19 ++-- content/en/ecosystem/registry/_index.md | 2 +- layouts/partials/hooks/body-end.html | 4 +- layouts/shortcodes/preview-fade.html | 16 ++-- netlify.toml | 4 +- package.json | 6 +- 9 files changed, 161 insertions(+), 80 deletions(-) diff --git a/assets/js/preview-fade.js b/assets/js/preview-fade.js index bac16bf74a09..ad0fe8daecd5 100644 --- a/assets/js/preview-fade.js +++ b/assets/js/preview-fade.js @@ -1,12 +1,33 @@ -document.addEventListener('DOMContentLoaded', function() { - document.querySelectorAll('.preview-fade').forEach(container => { - const button = container.querySelector('.expand-button'); - const buttonText = container.querySelector('.expand-text'); +// assets/js/preview-fade.js +console.log('Preview fade script loaded'); - button.addEventListener('click', () => { - const isCollapsed = container.dataset.state === 'collapsed'; - container.dataset.state = isCollapsed ? 'expanded' : 'collapsed'; - buttonText.textContent = isCollapsed ? 'Show Less' : 'Show More'; - }); +document.addEventListener('DOMContentLoaded', () => { + console.log('DOM Content Loaded'); + + const previewFades = document.querySelectorAll('.preview-fade'); + console.log('Found preview fades:', previewFades.length); + + previewFades.forEach(container => { + const button = container.querySelector('.expand-button'); + const buttonText = button.querySelector('.expand-text'); + + if (!button) { + console.error('Button not found in container:', container); + return; + } + + if (!buttonText) { + console.error('Button text element not found in button:', button); + return; + } + + button.addEventListener('click', () => { + console.log('Button clicked'); + const currentState = container.getAttribute('data-state'); + const newState = currentState === 'collapsed' ? 'expanded' : 'collapsed'; + console.log('State changing from', currentState, 'to', newState); + container.setAttribute('data-state', newState); + buttonText.textContent = newState === 'expanded' ? 'Show Less' : 'Show More'; }); - }); \ No newline at end of file + }); +}); \ No newline at end of file diff --git a/assets/scss/_preview-fade.scss b/assets/scss/_preview-fade.scss index e2b7f30055c3..98893ea57ea1 100644 --- a/assets/scss/_preview-fade.scss +++ b/assets/scss/_preview-fade.scss @@ -1,50 +1,51 @@ +// assets/scss/components/_preview-fade.scss .preview-fade { position: relative; - border: 1px solid var(--gray-200); - border-radius: 0.375rem; - background: var(--gray-100); margin: 1rem 0; -} - -.preview-content { - padding: 1rem; - margin: 0; - overflow-x: auto; -} - -.preview-fade[data-state='collapsed'] .preview-content { - max-height: 150px; -} - -.preview-fade[data-state='expanded'] .preview-content { - max-height: none; -} - -.fade-overlay { - position: absolute; - bottom: 2.5rem; - left: 0; - right: 0; - height: 4rem; - background: linear-gradient(to top, var(--gray-100), transparent); - pointer-events: none; -} - -.preview-fade[data-state='expanded'] .fade-overlay { - display: none; -} - -.expand-button { - width: 100%; - padding: 0.5rem; - border: none; - border-top: 1px solid var(--gray-200); - background: var(--gray-100); - color: var(--gray-700); - cursor: pointer; - font-size: 0.875rem; -} - -.expand-button:hover { - background: var(--gray-200); -} + + &__content { + max-height: 200px; + overflow: hidden; + transition: max-height 0.3s ease-out; + + &--expanded { + max-height: none; + } + } + + &__overlay { + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 100px; + background: linear-gradient( + to bottom, + rgba(255, 255, 255, 0), + rgba(255, 255, 255, 1) + ); + display: flex; + align-items: flex-end; + justify-content: center; + padding-bottom: 1rem; + + &--hidden { + display: none; + } + } + + &__button { + padding: 0.5rem 1rem; + border-radius: 20px; + background-color: white; + border: 1px solid #0366d6; + color: #0366d6; + cursor: pointer; + font-size: 0.875rem; + transition: all 0.2s; + + &:hover { + background-color: #f6f8fa; + } + } +} \ No newline at end of file diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index a8d29aebd105..da5ad39367b5 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -9,7 +9,7 @@ .td-home { .otel-logo { - margin-top: 2rem; + margin-top: 2rem; margin-bottom: 3rem; max-height: 12rem; } @@ -328,3 +328,55 @@ details { overflow-y: auto; } } + + +.preview-fade { + position: relative; + border: 1px solid var(--gray-200); + border-radius: 0.375rem; + background: var(--gray-100); + margin: 1rem 0; +} + +.preview-content { + padding: 1rem; + margin: 0; + overflow-x: auto; +} + +.preview-fade[data-state='collapsed'] .preview-content { + max-height: 150px; +} + +.preview-fade[data-state='expanded'] .preview-content { + max-height: none; +} + +.fade-overlay { + position: absolute; + bottom: 2.5rem; + left: 0; + right: 0; + height: 4rem; + background: linear-gradient(to top, var(--gray-100), transparent); + pointer-events: none; +} + +.preview-fade[data-state='expanded'] .fade-overlay { + display: none; +} + +.expand-button { + width: 100%; + padding: 0.5rem; + border: none; + border-top: 1px solid var(--gray-200); + background: var(--gray-100); + color: var(--gray-700); + cursor: pointer; + font-size: 0.875rem; +} + +.expand-button:hover { + background: var(--gray-200); +} diff --git a/content/en/docs/languages/js/getting-started/nodejs.md b/content/en/docs/languages/js/getting-started/nodejs.md index 0eb16754ba4e..7e79bcd899b2 100644 --- a/content/en/docs/languages/js/getting-started/nodejs.md +++ b/content/en/docs/languages/js/getting-started/nodejs.md @@ -11,13 +11,13 @@ This page will show you how to get started with OpenTelemetry in Node.js. You will learn how to instrument both [traces][] and [metrics][] and log them to the console. -{{% alert title="Note" color="info" %}} The logging library for OpenTelemetry +{{% alert title="Note" color="info" %}} The logging library for OpenTelemetry for Node.js is still under development hence an example for it is not provided below. Look [here](/docs/languages/js) for more info about the status of OpenTelemetry in JavaScript. {{% /alert %}} -## Prerequisites - +## Prerequisites + Ensure that you have the following installed locally: - [Node.js](https://nodejs.org/en/download/) @@ -51,10 +51,10 @@ npm install typescript \ ts-node \ @types/node \ express \ - @types/express + @types/express # initialize typescript -npx tsc --init +npx tsc --init ``` {{% /tab %}} {{% tab JavaScript %}} @@ -89,7 +89,7 @@ app.get('/rolldice', (req, res) => { app.listen(PORT, () => { console.log(`Listening for requests on http://localhost:${PORT}`); -}); +}); ``` {{% /tab %}} {{% tab JavaScript %}} @@ -253,6 +253,7 @@ few times. After a while you should see the spans printed in the console by the + {{% preview-fade %}} ```json @@ -345,6 +346,7 @@ the console output, such as the following: + {{% preview-fade %}} ```yaml @@ -471,8 +473,9 @@ the console output, such as the following: ``` {{% /preview-fade %}} + - + ## Next Steps Enrich your instrumentation generated automatically with @@ -482,7 +485,7 @@ codebase. This gets you customized observability data. You'll also want to configure an appropriate exporter to [export your telemetry data](/docs/languages/js/exporters) to one or more telemetry backends. - + If you'd like to explore a more complex example, take a look at the [OpenTelemetry Demo](/docs/demo/), which includes the JavaScript based [Payment Service](/docs/demo/services/payment/) and the TypeScript based diff --git a/content/en/ecosystem/registry/_index.md b/content/en/ecosystem/registry/_index.md index 392fff1fcdac..0b671e5499d2 100644 --- a/content/en/ecosystem/registry/_index.md +++ b/content/en/ecosystem/registry/_index.md @@ -11,7 +11,7 @@ description: >- # redirect rule to avoid the loop, as suggested by Netlify support # (email support ID 159489): redirects: [{ from: /ecosystem/registry*, to: '/ecosystem/registry?' }] -aliases: [/registry/*] +aliases: [/registry/*] type: default layout: registry outputs: [html, json] diff --git a/layouts/partials/hooks/body-end.html b/layouts/partials/hooks/body-end.html index b5ea4a642cf2..e09d85134f6c 100644 --- a/layouts/partials/hooks/body-end.html +++ b/layouts/partials/hooks/body-end.html @@ -2,4 +2,6 @@ {{ partial "script.html" (dict "src" "js/tracing.js") -}} {{ end -}} {{ partial "script.html" (dict "src" "js/navScroll.js") -}} -{{ partial "script.html" (dict "src" "js/preview-fade.js") -}} \ No newline at end of file +{{ partial "script.html" (dict "src" "js/preview-fade.js") -}} + + diff --git a/layouts/shortcodes/preview-fade.html b/layouts/shortcodes/preview-fade.html index c99d4c80a930..92cc1f9b0574 100644 --- a/layouts/shortcodes/preview-fade.html +++ b/layouts/shortcodes/preview-fade.html @@ -1,9 +1,9 @@
-
- {{ .Inner | safeHTML }} -
-
- -
\ No newline at end of file +
+ {{ .Inner | markdownify }} +
+
+ + \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 5c43ee2b633d..427415dbe44a 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,7 +4,7 @@ command = "npm run netlify-build:preview" [context.production] command = "npm run netlify-build:production" - + [[redirects]] from = "https://docs.opentelemetry.io/*" to = "https://opentelemetry.io/docs/:splat" @@ -19,3 +19,5 @@ force = true for = "/schemas/:version" [headers.values] content-type = "application/yaml" + + diff --git a/package.json b/package.json index 88039d0cf9ce..0beecdac83d4 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,12 @@ "Notes": [ "The 'all' runs _all_ named scripts in sequence, even if one fails; and exits with failure in that case." ], - "scripts": { + "scripts": { "__check:links": "make --keep-going check-links", "_build": "npm run _hugo -- -e dev --buildDrafts --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"", "_check:format:any": "npx prettier --check --ignore-path ''", "_check:format:ja+zh": "npm run _check:format:nowrap -- content/ja content/zh", - "_check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve", + "_check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve", "_check:format": "npx prettier --check .", "_check:links--md": "npx markdown-link-check --config .markdown-link-check.json *.md", "_check:links--warn": "npm run _check:links || (echo; echo 'WARNING: see link-checker output for issues.'; echo)", @@ -156,7 +156,7 @@ "node": "20.x" }, "gitHubActionCacheKey": "2023-07-13 - change this key to force cache refresh", - "private": true, + "private": true, "prettier": { "proseWrap": "always", "singleQuote": true From fd65fdfdfa8b086fd5b913a0530d116b9400183d Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Sat, 2 Nov 2024 12:11:31 -0400 Subject: [PATCH 5/5] Update netlify.toml - remove unnecessary whitespace changes --- netlify.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 427415dbe44a..5c43ee2b633d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,7 +4,7 @@ command = "npm run netlify-build:preview" [context.production] command = "npm run netlify-build:production" - + [[redirects]] from = "https://docs.opentelemetry.io/*" to = "https://opentelemetry.io/docs/:splat" @@ -19,5 +19,3 @@ force = true for = "/schemas/:version" [headers.values] content-type = "application/yaml" - -