diff --git a/frontend/src/components/Settings/Settings.vue b/frontend/src/components/Settings/Settings.vue index c6d27822..b88abd0c 100644 --- a/frontend/src/components/Settings/Settings.vue +++ b/frontend/src/components/Settings/Settings.vue @@ -365,7 +365,7 @@ const tabsStructure = computed(() => { type: 'textarea', rows: 4, description: - 'Keywords for search engines to find your website. Separated by commas.', + 'Comma separated keywords for search engines to find your website.', }, { type: 'Column Break', diff --git a/frontend/src/pages/BatchForm.vue b/frontend/src/pages/BatchForm.vue index ecc173a4..6c8f984e 100644 --- a/frontend/src/pages/BatchForm.vue +++ b/frontend/src/pages/BatchForm.vue @@ -273,6 +273,27 @@ /> + +
+
+ {{ __('Meta Tags') }} +
+
+ + +
+
@@ -302,12 +323,13 @@ import { useOnboarding } from 'frappe-ui/frappe' import { sessionStore } from '../stores/session' import MultiSelect from '@/components/Controls/MultiSelect.vue' import Link from '@/components/Controls/Link.vue' -import { openSettings } from '@/utils' +import { openSettings, getMetaInfo, updateMetaInfo } from '@/utils' const router = useRouter() const user = inject('$user') const { brand } = sessionStore() const { updateOnboardingStep } = useOnboarding('learning') +const instructors = ref([]) const props = defineProps({ batchName: { @@ -340,18 +362,26 @@ const batch = reactive({ zoom_account: '', }) -const instructors = ref([]) +const meta = reactive({ + description: '', + keywords: '', +}) onMounted(() => { if (!user.data) window.location.href = '/login' if (props.batchName != 'new') { - batchDetail.reload() + fetchBatchInfo() } else { capture('batch_form_opened') } window.addEventListener('keydown', keyboardShortcut) }) +const fetchBatchInfo = () => { + batchDetail.reload() + getMetaInfo('batches', props.batchName, meta) +} + const keyboardShortcut = (e) => { if ( e.key === 's' && @@ -465,7 +495,7 @@ const createNewBatch = () => { localStorage.setItem('firstBatch', data.name) }) } - + updateMetaInfo('batches', data.name, meta) capture('batch_created') router.push({ name: 'BatchDetail', @@ -486,6 +516,7 @@ const editBatchDetails = () => { {}, { onSuccess(data) { + updateMetaInfo('batches', data.name, meta) router.push({ name: 'BatchDetail', params: { diff --git a/frontend/src/pages/CourseForm.vue b/frontend/src/pages/CourseForm.vue index 18878f1f..e9df2256 100644 --- a/frontend/src/pages/CourseForm.vue +++ b/frontend/src/pages/CourseForm.vue @@ -76,7 +76,7 @@ +
{{ __('Pricing and Certification') }}
@@ -248,6 +248,27 @@ />
+ +
+
+ {{ __('Meta Tags') }} +
+
+ + +
+
@@ -264,6 +285,7 @@