I update a ghost site from an evernote notebook. In a ghost post I need a reference to an evernote note.
Currently I abuse the slug field and fill it with the uuid of the evernote note. I think a cross reference field is a must.
You could utilise the canonical field or one of the other meta fields in the post settings? Can I ask what your use case is?
Hi, Thanks for your reply. My use case is: from various notes in various notebooks in evernote I want - based on some criteria - create/update posts in Ghost. Every note in evernote has an uuid. If the note changes, the corrsponding post in Ghost will be automatically updated. To find the right post in Ghost I must have some link (reference id). Therefore I use the slug field to store the uuid. I think it is more and more common that people create/update post from other sources using the api. Therefore there should be something like a reference id. To use the canonical field seems to me not better than the slug field. Kind regards, Jacques Bopp
I think I understand what youâre doing. You could still use the canonical field in this case. Storing the evernote uuid in the canonical field would let you use the Ghost API to filter by the canonical property which would return the relevant post, including the reference id. That reference id can then be used in the Admin API to find and update the matching post.
This method would still give you the results you currently have, but would obscure the evernote reference in a lesser important field
Ok, thanks. Will change to âcanonical_urlâ
Hi, I tried it with the canonical_url. But this does not work. If I put a uuid (e.g. â3de2d6dd-b072-401c-bc44-0ee7b2bc0f1dâ) in this field I canât any longer edit this post in Ghost admin. I alway get the error âUpdate failed: Please enter a valid URLâ. If I enter the uuid with some url prefix (e.g. Https://xy.com/) I canât any longer filter for a canonical_url ({âmessageâ: âRequest not understood error, cannot list posts.â, âcontextâ: âError parsing filterâ, âtypeâ: âBadRequestErrorâ, âdetailsâ: None, âpropertyâ: None, âhelpâ: None, âcodeâ: None, âidâ: â07f07100-937b-11ea-963a-edfa4e505709â}.
Ah I see whatâs happening. Sorry I forgot that the canonical field has URL validation. You could try with a different post meta field? Or even an internal tag, those can be grabbed from the Content API but wonât be shown in the published site