SSWConsulting / SSW.Website

Generator for ssw.com.au
https://www.ssw.com.au
Apache License 2.0
8 stars 7 forks source link

💸 Tech Debt - isTitle Not Used for SEO Titles #1755

Open Harry-Ross opened 9 months ago

Harry-Ross commented 9 months ago

cc @bradystroud @wicksipedia @amankumarrr @jeoffreyfischer

As per our conversation in the Sprint Review, using the isTitle field in the seoSchema would be good to allow filenames to be automatically generated, possibly not needing the additional field added in https://github.com/SSWConsulting/SSW.Website/pull/1641.

Relevant documentation: https://tina.io/docs/reference/fields/#istitle

### Tasks
- [ ] Add the `isTitle` field to `seoSchema` in `components/util/seo.tsx` 
- [ ] Make the field required 
- [ ] Test it automatically generates the filename when a new document is created
andrewwaltosssw commented 3 months ago

seoSchema is a component and its fields cannot be accessed at time of creating a new page due to the filename being a required top-level field:

Image Figure: Error shown trying to add values to SEO fields

Another solution here might be to add a new string field that has isTitle and is the first field in the UI.