diff --git a/README.md b/README.md index 956ec72a..957ba833 100644 --- a/README.md +++ b/README.md @@ -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}) diff --git a/index.ts b/index.ts index 697e9cf1..b19b164e 100644 --- a/index.ts +++ b/index.ts @@ -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'; \ No newline at end of file diff --git a/package.json b/package.json index 3b3b004b..2da2568e 100644 --- a/package.json +++ b/package.json @@ -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 ", "type": "module", "license": "MIT", diff --git a/src/ghost.ts b/src/functions.ts similarity index 96% rename from src/ghost.ts rename to src/functions.ts index 6de8a6dc..1bc88835 100644 --- a/src/ghost.ts +++ b/src/functions.ts @@ -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 = ['authors', 'tags']; diff --git a/src/Content-API/api-client.js b/src/interface.js similarity index 56% rename from src/Content-API/api-client.js rename to src/interface.js index 4fd9fbf7..deb38854 100644 --- a/src/Content-API/api-client.js +++ b/src/interface.js @@ -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; diff --git a/src/Content-API/ghostContentAPI.js b/src/tryghost-content-api.js similarity index 100% rename from src/Content-API/ghostContentAPI.js rename to src/tryghost-content-api.js