Skip to content

Commit

Permalink
docs(alpha): fix seo issues [KHCP-10667] (#2006)
Browse files Browse the repository at this point in the history
* fix(docs): seo [KHCP-10667]

* fix: update link
  • Loading branch information
adamdehaven authored Feb 9, 2024
1 parent 2050c6a commit 0f724a4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
5 changes: 4 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from 'vitepress'
import VueDevTools from 'vite-plugin-vue-devtools'

const DEPLOYED_HOSTNAME = 'https://kongponents.konghq.com' // Ensure this does NOT end with a trailing-slash
// TODO: Update to permanent path when `alpha` is merged into main
const DEPLOYED_HOSTNAME = 'https://alpha--kongponents.netlify.app' // Ensure this does NOT end with a trailing-slash

const KONG_SVG = '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><title>Kong API Gateway and Service Connectivity Platform</title><path fill-rule="evenodd" clip-rule="evenodd" d="m16.28 36.66 1-1.3h7.45l3.88 4.96-.7 1.68h-9.6l.24-1.68-2.27-3.66Z" fill="#169FCC"/><path fill-rule="evenodd" clip-rule="evenodd" d="m18.55 19.75 3.6-6.21h4.19L45.1 35.35 43.65 42H35.6l.5-1.87-17.55-20.38Z" fill="#14B59A"/><path fill-rule="evenodd" clip-rule="evenodd" d="m22.92 12.36 1.72-3.19L29.8 5l8.85 6.94-1.15 1.17 1.54 2.13v2.28l-4.4 3.6-7.4-8.76h-4.32Z" fill="#1BC263"/><path fill-rule="evenodd" clip-rule="evenodd" d="M9.25 26.23h2.33l6.1-5.1 8.08 9.4-2.28 3.41h-7.46l-5.15 6.55L9.7 42H3v-8.03l6.25-7.74Z" fill="#16BDCC"/></svg>'

Expand All @@ -11,6 +12,7 @@ export default defineConfig({
title: 'Kongponents',
description: 'Kong UI Components & Style Guide',
head: [
['meta', { name: 'robots', content: 'noindex,nofollow' }], // TODO: Remove when `alpha` is merged into main
['meta', { name: 'theme-color', content: '#1456cb' }],
['meta', { name: 'msapplication-TileColor', content: '#1456cb' }],
['meta', { name: 'application-name', content: 'Kongponents' }],
Expand Down Expand Up @@ -142,6 +144,7 @@ export default defineConfig({
{
text: 'v8.x',
link: 'https://kongponents.konghq.com',
rel: 'nofollow'
},
{
text: 'v7.x',
Expand Down
20 changes: 12 additions & 8 deletions src/components/KModal/KModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,22 @@ const toggleFocusTrap = async (isActive: boolean): Promise<void> => {
}
const toggleBodyScroll = (isScrollable: boolean): void => {
if (isScrollable) {
document.body.classList.remove('k-modal-overflow-hidden')
} else {
document.body.classList.add('k-modal-overflow-hidden')
if (typeof document !== 'undefined') {
if (isScrollable) {
document.body.classList.remove('k-modal-overflow-hidden')
} else {
document.body.classList.add('k-modal-overflow-hidden')
}
}
}
const toggleEventListeners = (isActive: boolean): void => {
if (isActive) {
document.addEventListener('keydown', handleKeydown)
} else {
document.removeEventListener('keydown', handleKeydown)
if (typeof document !== 'undefined') {
if (isActive) {
document.addEventListener('keydown', handleKeydown)
} else {
document.removeEventListener('keydown', handleKeydown)
}
}
}
Expand Down

0 comments on commit 0f724a4

Please sign in to comment.