It is not possible to pull the built-in author data; and yes, creating a unique Custom type for authors would be the best way to do it. Read how to create a Custom Tagging System.
Hi Ivan,
Yes, we have used the guideline for a tagging system. Created an “Author” type.
All the fields are in the main section (did not use slices). Then in the “Blog” type created a field called Author with “Content Relationship” of Author type. Then add each author as a new document and publish. Two things I am keen to highlight:
Add the new Author type in config file (in our case gatsby-config) schemas section
Add the new Author .json to the schemas section of project (eg in gatsby)
Hope that helps. This has enabled us to add multiple authors.
I'm not sure how it works in gatsby but with the setup you described (flat fields in primary) using fetch_links will let you prefetch the author of a document in our blog we use this in our options:
As you can see we also have a category custom type which creates the categories for our blog and we prefetch that. the tags within prismic are only used for editors to organize the content from the editors perspective.
1 Like
Fares
closed , flag & select 'Something Else' to reopen.
6