Added sitemap on nuxt side

This commit is contained in:
Julien Nahum 2024-01-02 18:31:31 +01:00
parent b3740dc1c3
commit db57793932
6 changed files with 16 additions and 39 deletions

View File

@ -3,6 +3,9 @@ import opnformConfig from "./opnform.config";
import sitemap from "./sitemap";
export default defineNuxtConfig({
site: {
url: opnformConfig.app_url
},
devtools: {enabled: true},
css: ['~/scss/app.scss'],
modules: [
@ -13,6 +16,9 @@ export default defineNuxtConfig({
'nuxt-simple-sitemap',
// ... opnformConfig.sentry_dsn ? ['@nuxtjs/sentry'] : [],
],
build: {
transpile: ["vue-notion"],
},
postcss: {
plugins: {
'postcss-import': {},

View File

@ -1,6 +1,6 @@
export default {
"app_ame": "OpnForm",
"app_url": "https://opnform.test",
"app_url": "http://localhost:3000/",
"api_url": "https://opnform.test/api",
"locale": "en",
"locales": {"en": "EN"},

View File

@ -3,9 +3,9 @@
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"build": "export NODE_TLS_REJECT_UNAUTHORIZED=0; nuxt build",
"dev": "export NODE_TLS_REJECT_UNAUTHORIZED=0; nuxt dev",
"generate": "nuxt generate",
"generate": "export NODE_TLS_REJECT_UNAUTHORIZED=0; nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},

View File

@ -1,35 +0,0 @@
<template>
<div>
<div class="mt-6 flex flex-col">
<div class="w-full md:max-w-3xl md:mx-auto px-4 md:pt-16">
<h1 class="sm:text-5xl mb-4">
Integrations
</h1>
<NotionPage :block-map="blockMap" :loading="loading" />
</div>
</div>
<open-form-footer/>
</div>
</template>
<script setup>
// metaTitle: { type: String, default: 'Integrations' },
// metaDescription: { type: String, default: 'You can connect your OpnForms to other services via our two integrations: Zapier and Webhooks. Use our integrations to automate your various workflows.' }
import {useNotionPagesStore} from "~/stores/notion_pages.js";
import {computed} from "vue";
const notionPageStore = useNotionPagesStore()
await notionPageStore.load('492c2bbb31404481b9faaaf407e59640')
const loading = computed(() => notionPageStore.loading)
const blockMap = computed(() => notionPageStore.getByKey('492c2bbb31404481b9faaaf407e59640'))
</script>
<style lang="scss">
.integration-page {
.notion-asset-wrapper {
max-width: 200px;
}
}
</style>

6
client/sitemap.js vendored
View File

@ -1,4 +1,10 @@
import opnformConfig from "../opnform.config.js";
export default {
// exclude all URLs that start with /secret
exclude: ['/settings/**', '/subscriptions/**', '/templates/my-templates'],
sources: [
opnformConfig.api_url + '/sitemap-urls'
],
cacheMaxAgeSeconds: 3600
}

View File

@ -48,7 +48,7 @@ export const useAuthStore = defineStore('auth', {
setUser(user) {
if (!user) {
console.error('Error.setting.user')
console.error('No user, logging out.')
this.setToken(null)
}