update to 1.0.0, code cleanup

This commit is contained in:
Adam Matthiesen 2024-01-14 18:32:41 -08:00
parent 44c3c5a1de
commit be76428aae
6 changed files with 10 additions and 5 deletions

View File

@ -27,6 +27,10 @@ Dependencies:
Basic Usage:
```
import { getGhostPosts } from "@adammatthiesen/astro-ghostcms";
```
- getGhostPosts() - Get list of posts
- getGhostRecentPosts(setLimit?) - Get Recent Posts (setLimit={6})
- getGhostFeaturedPosts(setLimit?) - Get Featured Posts (setLimit={1})

View File

@ -1,5 +1,5 @@
// FUNCTION EXPORTS
export { getGhostPosts, getGhostRecentPosts, getGhostFeaturedPosts, getGhostPostbySlug, getGhostPostsbyTag, getGhostTags, getGhostTagbySlug, getGhostAuthors, getGhostPages, getGhostPage, getGhostSettings } from './src/ghost';
export { getGhostPosts, getGhostRecentPosts, getGhostFeaturedPosts, getGhostPostbySlug, getGhostPostsbyTag, getGhostTags, getGhostTagbySlug, getGhostAuthors, getGhostPages, getGhostPage, getGhostSettings } from './src/functions';
// TYPE EXPORTS
export type { PostOrPage, ArrayOrValue, Author, Authors, BrowseFunction, CodeInjection, Excerpt, Facebook, FieldParam, FilterParam, FormatParam, GhostAPI, GhostContentAPIOptions, GhostData, GhostError, Identification, IncludeParam, LimitParam, Metadata, Nullable, OrderParam, PageParam, Pagination, Params, PostsOrPages, ReadFunction, Settings, SettingsResponse, SocialMedia, Tag, TagVisibility, Tags, Twitter } from './index.d';

View File

@ -1,7 +1,7 @@
{
"name": "@adammatthiesen/astro-ghostcms",
"description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content",
"version": "0.0.1-beta.3",
"version": "1.0.0",
"author": "Adam Matthiesen <adam@matthiesen.xyz>",
"type": "module",
"license": "MIT",

View File

@ -1,8 +1,9 @@
// IMPORT Ghost Types
import type { PostOrPage, PostsOrPages, Authors, Tag, Tags, ArrayOrValue, IncludeParam, LimitParam, Settings, Nullable } from '../index.d';
import type { PostOrPage, PostsOrPages, Authors, Tag, Tags, ArrayOrValue, IncludeParam, LimitParam, Settings, Nullable } from '..';
// IMPORT Ghost API Client
import { api } from './Content-API/api-client';
import { api } from './interface';
// SET Include params
const include:ArrayOrValue<IncludeParam> = ['authors', 'tags'];

View File

@ -1,4 +1,4 @@
import GhostContentAPI from './ghostContentAPI';
import GhostContentAPI from './tryghost-content-api';
// CALL GHOST VARS AND CREATE CLIENT
const key = import.meta.env.CONTENT_API_KEY;