diff --git a/src/Elastic.Documentation.Site/Assets/custom-elements.ts b/src/Elastic.Documentation.Site/Assets/custom-elements.ts new file mode 100644 index 000000000..5aa96ff4c --- /dev/null +++ b/src/Elastic.Documentation.Site/Assets/custom-elements.ts @@ -0,0 +1 @@ +import './web-components/VersionDropdown' diff --git a/src/Elastic.Documentation.Site/Assets/main.ts b/src/Elastic.Documentation.Site/Assets/main.ts index 1eb75e5af..c43944a33 100644 --- a/src/Elastic.Documentation.Site/Assets/main.ts +++ b/src/Elastic.Documentation.Site/Assets/main.ts @@ -7,7 +7,6 @@ import { initNav } from './pages-nav' import { initSmoothScroll } from './smooth-scroll' import { initTabs } from './tabs' import { initTocNav } from './toc-nav' -import './web-components/VersionDropdown' import 'htmx-ext-head-support' import 'htmx-ext-preload' import 'htmx.org' diff --git a/src/Elastic.Documentation.Site/Layout/_Footer.cshtml b/src/Elastic.Documentation.Site/Layout/_Footer.cshtml index 3ccea316a..a887c0774 100644 --- a/src/Elastic.Documentation.Site/Layout/_Footer.cshtml +++ b/src/Elastic.Documentation.Site/Layout/_Footer.cshtml @@ -1,6 +1,5 @@ @inherits RazorSlice - - - diff --git a/src/Elastic.Documentation.Site/Layout/_Head.cshtml b/src/Elastic.Documentation.Site/Layout/_Head.cshtml index ef3904a60..f043ae6ec 100644 --- a/src/Elastic.Documentation.Site/Layout/_Head.cshtml +++ b/src/Elastic.Documentation.Site/Layout/_Head.cshtml @@ -8,6 +8,8 @@ } + + @if (Model.CanonicalBaseUrl is not null) { diff --git a/src/Elastic.Documentation.Site/Layout/_Scripts.cshtml b/src/Elastic.Documentation.Site/Layout/_Scripts.cshtml deleted file mode 100644 index b5eda3de0..000000000 --- a/src/Elastic.Documentation.Site/Layout/_Scripts.cshtml +++ /dev/null @@ -1,21 +0,0 @@ -@inherits RazorSlice - - - - - - - - - - - - - - - - - - - - diff --git a/src/Elastic.Documentation.Site/package-lock.json b/src/Elastic.Documentation.Site/package-lock.json index c63ab2d9f..711294e10 100644 --- a/src/Elastic.Documentation.Site/package-lock.json +++ b/src/Elastic.Documentation.Site/package-lock.json @@ -26,6 +26,7 @@ "@emotion/css": "11.13.5", "@emotion/react": "11.14.0", "@eslint/js": "9.30.1", + "@parcel/reporter-bundle-analyzer": "^2.15.4", "@r2wc/react-to-web-component": "2.0.4", "@tailwindcss/postcss": "4.1.11", "@trivago/prettier-plugin-sort-imports": "5.2.2", @@ -1722,6 +1723,25 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/@parcel/reporter-bundle-analyzer": { + "version": "2.15.4", + "resolved": "https://registry.npmjs.org/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.15.4.tgz", + "integrity": "sha512-s2tDgyBxBJCsg5RkvNpmGrubyCwcSjuTg3/it5w7Gq9JxNhKW3UY54/6w5IMLb4F0iuYhVtmjrI1W/WwOi/4eg==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.15.4", + "@parcel/utils": "2.15.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">= 16.0.0", + "parcel": "^2.15.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/@parcel/reporter-cli": { "version": "2.15.4", "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.15.4.tgz", diff --git a/src/Elastic.Documentation.Site/package.json b/src/Elastic.Documentation.Site/package.json index 9f4d0c715..b7bfc0db1 100644 --- a/src/Elastic.Documentation.Site/package.json +++ b/src/Elastic.Documentation.Site/package.json @@ -12,6 +12,10 @@ "fmt:write": "prettier --write ." }, "targets": { + "customElements": { + "distDir": "_static", + "source": "Assets/custom-elements.ts" + }, "js": { "distDir": "_static", "source": "Assets/main.ts" @@ -33,6 +37,7 @@ "@emotion/css": "11.13.5", "@emotion/react": "11.14.0", "@eslint/js": "9.30.1", + "@parcel/reporter-bundle-analyzer": "2.15.4", "@r2wc/react-to-web-component": "2.0.4", "@tailwindcss/postcss": "4.1.11", "@trivago/prettier-plugin-sort-imports": "5.2.2",