In 0.7.2 we added the ghost.url.api() utility so that it is possible to build api urls. This gets included via {{ghost_head}} for people who enable Public API in labs.
It is only a tiny bit of JavaScript see here, but we should minify it for production mode/environments.
We should possibly also include it as an external request, rather than inlining it, so that the browser can cache it?
That link is not accessable.
No idea what happened there... updated
@ErisDS I had a couple of optimization fixes for this script as well. I'll try to get something like this implemented soon.
@acburdine cool :+1:
Greetings, I have a request that, if possible, this script inclusion happen below the fold (maybe in the footer if possible). It is blocking the page from loading. I am using Ghost Pro as my hosting, so I can't make the modifications myself.
This script is a temporary part of the API beta, you can remove it by disabling the API beta in labs :wink:
The way this is done will definitely change before the feature moves out of beta, but this is not planned for some months.
I disabled it. Thanks for the response. I love the idea of an API, so I'm looking forward to the feature. Thanks again.
I need the API to be enabled for a few theme specific features but I also have the problem that the script is blocking the page from loading (see https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fgodofredo.ninja%2Fblog%2F).
Is there any way to move it to the footer instead of the header or find another solution?
Most helpful comment
I need the API to be enabled for a few theme specific features but I also have the problem that the script is blocking the page from loading (see https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fgodofredo.ninja%2Fblog%2F).
Is there any way to move it to the footer instead of the header or find another solution?