Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-mulier-p committed Dec 20, 2024
1 parent f6d1cb7 commit 8f60574
Show file tree
Hide file tree
Showing 12 changed files with 269 additions and 164 deletions.
41 changes: 22 additions & 19 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
<template>
<NuxtLayout>
<DefaultLayout>
<NuxtPage />
</NuxtLayout>
</DefaultLayout>
</template>

<script setup lang="ts">
useHead({
htmlAttrs: {
lang: "en",
},
link: [
{
rel: "icon",
type: "image/png",
href: "/favicon-192x192.png",
import DefaultLayout from "~/layouts/default.vue";
import "@kestra-io/ui-libs/style.css";
useHead({
htmlAttrs: {
lang: "en",
},
link: [
{
rel: "icon",
type: "image/png",
href: "/favicon-192x192.png",
},
],
titleTemplate: (titleChunk) => {
return titleChunk &&
titleChunk != "Kestra, Open Source Declarative Data Orchestration"
? `${titleChunk}`
: "Kestra, Open Source Declarative Data Orchestration";
},
],
titleTemplate: (titleChunk) => {
return titleChunk &&
titleChunk != "Kestra, Open Source Declarative Data Orchestration"
? `${titleChunk}`
: "Kestra, Open Source Declarative Data Orchestration";
},
});
});
</script>

<style lang="scss">
Expand Down
5 changes: 2 additions & 3 deletions components/layout/PluginContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
<span v-html="transformTitle(getPageTitle())"></span>
</h1>
</div>
<NavToc :rate-helpful="true" :page="page && page" class="my-md-0 my-4 right-menu"/>
<NavToc :rate-helpful="true" :page="page" class="my-md-0 my-4 right-menu"/>

<div class="bd-content">
<DocsFeatureScopeMarker v-if="page.editions || page.version" :editions="page.editions"
:version="page.version"/>
<SchemaToHtml :page="page" :getPageName="getPageName" v-if="page.pluginType === 'definitions'">
<SchemaToHtml :schema="page.body.jsonSchema" :plugin-type="getPageName()" v-if="page.pluginType === 'definitions'">
<template v-slot:markdown="{ content }">
<MDC :value="content" tag="article" />
</template>
Expand All @@ -52,7 +52,6 @@
import {hash} from "ohash";
import {recursivePages, generatePageNames} from "~/utils/navigation.js";
const isDoc = computed(() => props.type === 'docs');
const config = useRuntimeConfig();
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
}
},
close() {
if (this.$refs.modal) {
if (process.client && this.$refs.modal) {
const modal = this.$bootstrap.Modal.getInstance(this.$refs.modal);
if (modal) {
modal.hide();
Expand Down
2 changes: 1 addition & 1 deletion components/videos/TutorialsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
}
const closeModal = () => {
if (youtubeVideoModal.value) {
if (process.client && youtubeVideoModal.value) {
const modal = $bootstrap.Modal.getInstance(youtubeVideoModal.value);
if (modal) {
modal.hide();
Expand Down
8 changes: 6 additions & 2 deletions error.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<template>
<NuxtLayout>
<DefaultLayout>
<Error :error="error" :title="title" :description="description" />
</NuxtLayout>
</DefaultLayout>
</template>

<script setup>
import DefaultLayout from "~/layouts/default.vue";
</script>

<script>
export default {
props: ['error'],
Expand Down
2 changes: 1 addition & 1 deletion middleware/route-lower-case.global.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
return navigateTo(to.fullPath.replace(to.path, to.path.toLocaleLowerCase()), {redirectCode: 301})
}

if (process.env.NODE_ENV === "production" && to.path !== "/" && to.path.endsWith("/")) {
if (to.path !== "/" && to.path.endsWith("/")) {
return navigateTo(to.path.substring(0, to.path.length - 1), {redirectCode: 301});
}
})
10 changes: 4 additions & 6 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as sass from "sass"
import * as sass from "sass";

const DEFAULT_KESTRA_API_URL = 'https://api.kestra.io/v1';

Expand Down Expand Up @@ -125,8 +125,8 @@ export default defineNuxtConfig({
build: {
rollupOptions: {
external: [
'shiki/onig.wasm'
],
'shiki/onig.wasm',
]
}
},
optimizeDeps: {
Expand Down Expand Up @@ -204,8 +204,7 @@ export default defineNuxtConfig({

nitro: {
prerender: {
routes: ['/rss.xml'],
autoSubfolderIndex: false
routes: ['/rss.xml']
},
},

Expand Down Expand Up @@ -308,7 +307,6 @@ export default defineNuxtConfig({
},

multiCache: {
debug: true,
data: {
enabled: true,
},
Expand Down
Loading

0 comments on commit 8f60574

Please sign in to comment.