Contentful logo

Contentful Community

Reference between two Content Types causing jekyll import error

content_modeling
#1

friends,
I need guidance on a good content model build or field set up:
I am experiencing an error when performing a content update/import into a jekyll build using terminal command $ jekyll contentful. The error is in the form of a continuous loop-effect where the import cannot complete and is importing… in perpetuity. I’ve identified the cause from linking two content types between two fields.
My project is a book library. I have two content types: Author & Book. Author has a reference field where I’ve linked each book title (via ‘reference, many’ field) and Book type has a field (reference, single) linking the relevant author. My purpose here is to display on each Author webpage the collection of the author’s books, and on each book webpage to hyper link to the author’s bio page via
{{href="author.html#author-{{ book.author_link.sys.id}}.

No doubt this kind of reference cross reference has been done before, as it seems key to any kind of catalog or library.
Is there a different content model construction to use?
Is there a better way to link between these two content types over my hacked up href?

really appreciate any help. thanks

0 Likes