Gets a post by the provided slug.
The getPostBySlug()
function returns a Promise that resolves to a post whose slug matches the given slug.
The slug
is the end of a post's URL that refers to a specific post. For example, if a post's URL is https:/example.com/blog/post/my-post-slug
, the slug is my-post-slug
. The slug is case-sensitive, and is generally derived from the post title, unless specified otherwise.
Slug of the post to retrieve.
The end of a post's URL, for example, https:/example.com/blog/post/my-post-slug. Case sensitive and generally based on the post title if not specified.
Options specifying which fields to return.