prep for v3...

This commit is contained in:
Adam Matthiesen 2024-01-23 13:54:54 -08:00
parent 411502591a
commit 694432ad97
34 changed files with 98 additions and 30 deletions

View File

@ -0,0 +1 @@
export * as Utils from './src/utils'

View File

@ -0,0 +1,49 @@
{
"name": "@matthiesenxyz/astro-ghostcms-theme-default",
"description": "Default Theme for astro-ghostcms",
"version": "0.0.1",
"homepage": "https://astro-ghostcms.xyz/",
"type": "module",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"author": {
"email": "adam@matthiesen.xyz",
"name": "Adam Matthiesen - MatthiesenXYZ",
"url": "https://matthiesen.xyz"
},
"keywords": [
"astro-ghostcms"
],
"repository": {
"type": "git",
"url": "git+https://github.com/MatthiesenXYZ/astro-ghostcms.git"
},
"bugs": {
"url": "https://github.com/MatthiesenXYZ/astro-ghostcms/issues",
"email": "issues@astro-ghostcms.xyz"
},
"main": "index.ts",
"files": [
"src",
"index.ts"
],
"exports": {
".": "./index.ts",
"./index.astro": "./src/routes/index.astro",
"./[slug].astro": "./src/routes/[slug].astro",
"./tags.astro": "./src/routes/tags.astro",
"./authors.astro": "./src/routes/authors.astro",
"./tag/[slug].astro": "./src/routes/tag/[slug].astro",
"./author/[slug].astro": "./src/routes/author/[slug].astro",
"./archives/[...page].astro": "./src/routes/archives/[...page].astro"
},
"scripts": { },
"dependencies": {
"@matthiesenxyz/astro-ghostcms": "^2.1.8",
"tiny-invariant": "^1.3.1",
"astro-font": "^0.0.77"
}
}

View File

@ -1,6 +1,6 @@
---
import { getGhostImgPath } from "../utils";
import type { Settings, Author } from "../../api";
import type { Settings, Author } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
author: Author;
wide?: boolean;

View File

@ -1,6 +1,6 @@
---
import { getGhostImgPath } from "../utils";
import type { Settings, PostOrPage } from "../../api";
import type { Settings, PostOrPage } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
post: PostOrPage;
settings: Settings;

View File

@ -1,6 +1,6 @@
---
import { getGhostImgPath } from "../utils";
import type { Settings } from "../../api";
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
image: string;
alt?: string;

View File

@ -1,5 +1,5 @@
---
import type { Settings } from "../../api";
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
settings: Settings;
};

View File

@ -1,5 +1,5 @@
---
import type { Settings } from "../../api";
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
settings: Settings;
};

View File

@ -1,6 +1,6 @@
---
import { getGhostImgPath } from "../utils";
import type { Settings } from "../../api";
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
featureImg?: string;
mainTitle?: string;

View File

@ -1,7 +1,7 @@
---
import Header from "./Header.astro";
import Footer from "./Footer.astro";
import type { Settings } from "../../api";
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
settings: Settings;
};

View File

@ -1,6 +1,6 @@
---
import FeatureImage from "./FeatureImage.astro";
import type { Settings, PostOrPage } from "../../api";
import type { Settings, PostOrPage } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
page: PostOrPage;
settings: Settings;

View File

@ -2,7 +2,7 @@
import PostHero from "./PostHero.astro";
import PostFooter from "./PostFooter.astro";
import invariant from "tiny-invariant";
import type {PostOrPage, PostsOrPages, Settings } from "../../api";
import type {PostOrPage, PostsOrPages, Settings } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
post: PostOrPage;
settings: Settings;

View File

@ -1,6 +1,6 @@
---
import PostPreview from "./PostPreview.astro";
import type { Settings, PostOrPage, PostsOrPages } from "../../api";
import type { Settings, PostOrPage, PostsOrPages } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
post: PostOrPage;
settings: Settings;

View File

@ -2,7 +2,7 @@
import FeatureImage from "./FeatureImage.astro";
import AuthorList from "./AuthorList.astro";
import { formatDate } from "../utils";
import type { Settings, PostOrPage } from "../../api";
import type { Settings, PostOrPage } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
post: PostOrPage;
settings: Settings;

View File

@ -1,7 +1,7 @@
---
import { getGhostImgPath, formatDate } from "../utils";
import AuthorList from "./AuthorList.astro";
import type { Settings, PostOrPage, Tag } from "../../api";
import type { Settings, PostOrPage, Tag } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
post: PostOrPage;
settings: Settings;

View File

@ -1,6 +1,6 @@
---
import PostPreview from "./PostPreview.astro";
import type { Settings, PostOrPage } from "../../api";
import type { Settings, PostOrPage } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
posts: PostOrPage[];
settings: Settings;

View File

@ -1,6 +1,6 @@
---
import { getGhostImgPath } from "../utils";
import type { Settings, Tag } from "../../api";
import type { Settings, Tag } from "@matthiesenxyz/astro-ghostcms/api";
export type Props = {
tag: Tag;
addClass?: string;

View File

@ -1,5 +1,5 @@
---
import type { Settings } from "../../api";
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
import { AstroFont } from "astro-font";
import MainLayout from "../components/MainLayout.astro";
import { ViewTransitions } from "astro:transitions";

View File

@ -3,7 +3,7 @@ import type { InferGetStaticPropsType } from 'astro';
import DefaultPageLayout from "../layouts/default.astro";
import Page from "../components/Page.astro";
import Post from "../components/Post.astro";
import { getGhostSettings, getGhostPages, getGhostPosts } from "../../api";
import { getGhostSettings, getGhostPages, getGhostPosts } from "@matthiesenxyz/astro-ghostcms/api";
import invariant from 'tiny-invariant';
export async function getStaticPaths() {

View File

@ -5,7 +5,7 @@ import DefaultPageLayout from "../../layouts/default.astro";
import PostPreviewList from "../../components/PostPreviewList.astro";
import HeroContent from "../../components/HeroContent.astro";
import Paginator from "../../components/Paginator.astro";
import { getGhostSettings, getGhostPosts, type PostOrPage } from "../../../api";
import { getGhostSettings, getGhostPosts, type PostOrPage } from "@matthiesenxyz/astro-ghostcms/api";
export async function getStaticPaths({ paginate }:GetStaticPathsOptions) {
const posts = await getGhostPosts();

View File

@ -2,7 +2,7 @@
import type { InferGetStaticParamsType, InferGetStaticPropsType } from 'astro';
import DefaultPageLayout from "../../layouts/default.astro";
import PostPreviewList from "../../components/PostPreviewList.astro";
import { getGhostPosts, getGhostAuthors, getGhostSettings } from "../../../api";
import { getGhostPosts, getGhostAuthors, getGhostSettings } from "@matthiesenxyz/astro-ghostcms/api";
import invariant from "tiny-invariant";
export async function getStaticPaths() {

View File

@ -1,7 +1,7 @@
---
import DefaultPageLayout from "../layouts/default.astro";
import AuthorCard from "../components/AuthorCard.astro";
import { getGhostAuthors, getGhostSettings } from "../../api";
import { getGhostAuthors, getGhostSettings } from "@matthiesenxyz/astro-ghostcms/api";
import invariant from "tiny-invariant";
let title = "All Authors";

View File

@ -2,7 +2,7 @@
import DefaultPageLayout from "../layouts/default.astro";
import PostPreviewList from "../components/PostPreviewList.astro";
import HeroContent from "../components/HeroContent.astro";
import { getGhostPosts, getGhostSettings } from "../../api";
import { getGhostPosts, getGhostSettings } from "@matthiesenxyz/astro-ghostcms/api";
import invariant from "tiny-invariant";
const posts = await getGhostPosts();
const settings = await getGhostSettings();

View File

@ -2,7 +2,7 @@
import type { InferGetStaticParamsType, InferGetStaticPropsType } from 'astro';
import DefaultPageLayout from "../../layouts/default.astro";
import PostPreview from "../../components/PostPreview.astro";
import { getGhostPosts, getGhostTags, getGhostSettings } from "../../../api";
import { getGhostPosts, getGhostTags, getGhostSettings } from "@matthiesenxyz/astro-ghostcms/api";
import { getGhostImgPath } from "../../utils";
import invariant from "tiny-invariant";

View File

@ -1,7 +1,7 @@
---
import DefaultPageLayout from "../layouts/default.astro";
import TagCard from "../components/TagCard.astro";
import { getGhostSettings, getGhostTags } from "../../api";
import { getGhostSettings, getGhostTags } from "@matthiesenxyz/astro-ghostcms/api";
import invariant from 'tiny-invariant';

View File

@ -10,6 +10,8 @@ import { viteGhostCMS } from "./src/virtual";
const IC = {
/** INTERNAL PACKAGE NAME */
PKG:'@matthiesenxyz/astro-ghostcms',
/** INTERNAL PACKAGE NAME */
DT:'@matthiesenxyz/astro-ghostcms-theme-default',
/** INTERNAL STRING */
CHECK_ENV:"Checking for Environment Variables...",
/** SET ENV GRABBER MODE */
@ -88,8 +90,8 @@ export default function GhostCMS(options: UserConfig): AstroIntegration {
if(!injection){
// THEME SELECTOR
if (entry === IC.PKG) {
if(!logs) {logger.info(IC.IT + IC.PKG)}
if (entry === IC.DT) {
if(!logs) {logger.info(IC.IT + IC.DT)}
} else {
if(!logs) {logger.info(IC.IT + entry)}
}

View File

@ -1,7 +1,7 @@
{
"name": "@matthiesenxyz/astro-ghostcms",
"description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content",
"version": "2.1.8",
"version": "3.0.0",
"homepage": "https://astro-ghostcms.xyz/",
"type": "module",
"license": "MIT",
@ -68,13 +68,13 @@
"zod": "^3.22.4"
},
"dependencies": {
"@matthiesenxyz/astro-ghostcms-theme-default": "workspace:*",
"@astrojs/check": "^0.3.4",
"@astrojs/rss": "^4.0.2",
"@astrojs/sitemap": "^3.0.5",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@types/node": "^20.11.5",
"astro-font": "^0.0.77",
"astro-robots-txt": "^1.0.0",
"axios": "^1.6.5",
"eslint": "^8.56.0",

View File

@ -10,7 +10,7 @@ export const UserConfigSchema = z.object({
disableConsoleOutput: z.boolean().default(false),
/** OPTIONAL - Theme Selector
* This option allows the user to replace the included theme with an external npm module */
theme: z.string().default('@matthiesenxyz/astro-ghostcms'),
theme: z.string().default('@matthiesenxyz/astro-ghostcms-theme-default'),
/** OPTIONAL - astrojs/sitemap
* This option allows the user to configure the included integration
* Options shown are the availble options

View File

@ -12,6 +12,7 @@
},
"dependencies": {
"astro": "^4.2.1",
"@matthiesenxyz/astro-ghostcms-theme-default": "workspace:*",
"@matthiesenxyz/astro-ghostcms": "workspace:*"
},
"devDependencies": {

View File

@ -42,6 +42,9 @@ importers:
'@astrojs/sitemap':
specifier: ^3.0.5
version: 3.0.5
'@matthiesenxyz/astro-ghostcms-theme-default':
specifier: workspace:*
version: link:../astro-ghostcms-theme-default
'@types/node':
specifier: ^20.11.5
version: 20.11.5
@ -54,9 +57,6 @@ importers:
astro:
specifier: ^4.2.1
version: 4.2.3(@types/node@20.11.5)(sass@1.70.0)(typescript@5.3.3)
astro-font:
specifier: ^0.0.77
version: 0.0.77
astro-robots-txt:
specifier: ^1.0.0
version: 1.0.0
@ -97,11 +97,26 @@ importers:
specifier: ^3.0.0
version: 3.0.0(zod@3.22.4)
packages/astro-ghostcms-theme-default:
dependencies:
'@matthiesenxyz/astro-ghostcms':
specifier: ^2.1.8
version: link:../astro-ghostcms
astro-font:
specifier: ^0.0.77
version: 0.0.77
tiny-invariant:
specifier: ^1.3.1
version: 1.3.1
playground:
dependencies:
'@matthiesenxyz/astro-ghostcms':
specifier: workspace:*
version: link:../packages/astro-ghostcms
'@matthiesenxyz/astro-ghostcms-theme-default':
specifier: workspace:*
version: link:../packages/astro-ghostcms-theme-default
astro:
specifier: ^4.2.1
version: 4.2.3(@types/node@20.11.5)(sass@1.70.0)(typescript@5.3.3)