Improve Templates (#183)

* Improve Templates

* Fix test case

* Update AI GenerateTemplate

* update openai client and GPT completer

* composer.lock

* Update types and list json with script

* Template changes

* fix on draft template

* Finish opnform templates

---------

Co-authored-by: Forms Dev <chirag+new@notionforms.io>
Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala
2023-09-08 16:30:28 +05:30
committed by GitHub
parent d93eca7410
commit 8e47b49e9a
36 changed files with 3130 additions and 1381 deletions

View File

@@ -34,8 +34,8 @@ class SeoMetaResolver
'privacy_policy' => '/privacy-policy',
'terms_conditions' => '/terms-conditions',
'integrations' => '/integrations',
'templates' => '/templates',
'template_show' => '/templates/{slug}',
'templates' => '/form-templates',
'templates_show' => '/form-templates/{slug}',
];
/**
@@ -62,7 +62,7 @@ class SeoMetaResolver
],
'templates' => [
'title' => 'Templates',
'description' => 'Free templates to quickly create beautiful forms for free!'
'description' => 'Our collection of beautiful templates to create your own forms!'
],
];
@@ -182,13 +182,13 @@ class SeoMetaResolver
return $meta;
}
private function getTemplateShowMeta(): array
private function getTemplatesShowMeta(): array
{
$template = Template::whereSlug($this->patternData['slug'])->firstOrFail();
return [
'title' => $template->name . $this->titleSuffix(),
'description' => Str::of($template->description)->limit(160),
'description' => Str::of($template->short_description)->limit(140) . ' | Customize any template and create your own form in minutes.',
'image' => $template->image_url
];
}