Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
|
f870a73727 | |
|
2cbc4b49d0 |
|
@ -1,25 +0,0 @@
|
|||
import {
|
||||
definePreset,
|
||||
presetIcons,
|
||||
presetTypography,
|
||||
presetWind,
|
||||
} from "unocss";
|
||||
|
||||
export default definePreset(() => {
|
||||
return {
|
||||
name: "brutalTheme",
|
||||
presets: [
|
||||
presetWind(),
|
||||
presetIcons({
|
||||
collections: {
|
||||
//@ts-expect-error
|
||||
logos: () =>
|
||||
import("@iconify-json/logos/icons.json").then((i) => i.default),
|
||||
uil: () =>
|
||||
import("@iconify-json/uil/icons.json").then((l) => l.default),
|
||||
},
|
||||
}),
|
||||
presetTypography(),
|
||||
],
|
||||
};
|
||||
});
|
|
@ -25,13 +25,11 @@
|
|||
"url": "https://github.com/MatthiesenXYZ/astro-ghostcms/issues",
|
||||
"email": "issues@astro-ghostcms.xyz"
|
||||
},
|
||||
"main": "./brutalunocss-preset.ts",
|
||||
"files": [
|
||||
"src",
|
||||
"brutalunocss-preset.ts"
|
||||
],
|
||||
"exports": {
|
||||
".": "./brutalunocss-preset.ts",
|
||||
"./index.astro": "./src/routes/index.astro",
|
||||
"./[slug].astro": "./src/routes/[slug].astro",
|
||||
"./tags.astro": "./src/routes/tags.astro",
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
import { fontFamily as _fontFamily } from "tailwindcss/defaultTheme";
|
||||
export const content = [
|
||||
"./node_modules/@matthiesenxyz/astro-ghostcms-catppuccin/src/**/*.{astro,js,css,ts}",
|
||||
];
|
||||
export const theme = {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ["Inter Variable", "Inter", ..._fontFamily.sans],
|
||||
},
|
||||
},
|
||||
};
|
||||
export const plugins = [
|
||||
require("@tailwindcss/typography"),
|
||||
require("@catppuccin/tailwindcss")({
|
||||
prefix: "ctp",
|
||||
defaultFlavour: "frappe",
|
||||
}),
|
||||
];
|
|
@ -1,19 +0,0 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
import { fontFamily as _fontFamily } from "tailwindcss/defaultTheme";
|
||||
export const content = [
|
||||
"./node_modules/@matthiesenxyz/astro-ghostcms-catppuccin/src/**/*.{astro,js,css,ts}",
|
||||
];
|
||||
export const theme = {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ["Inter Variable", "Inter", ..._fontFamily.sans],
|
||||
},
|
||||
},
|
||||
};
|
||||
export const plugins = [
|
||||
require("@tailwindcss/typography"),
|
||||
require("@catppuccin/tailwindcss")({
|
||||
prefix: "ctp",
|
||||
defaultFlavour: "latte",
|
||||
}),
|
||||
];
|
|
@ -1,19 +0,0 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
import { fontFamily as _fontFamily } from "tailwindcss/defaultTheme";
|
||||
export const content = [
|
||||
"./node_modules/@matthiesenxyz/astro-ghostcms-catppuccin/src/**/*.{astro,js,css,ts}",
|
||||
];
|
||||
export const theme = {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ["Inter Variable", "Inter", ..._fontFamily.sans],
|
||||
},
|
||||
},
|
||||
};
|
||||
export const plugins = [
|
||||
require("@tailwindcss/typography"),
|
||||
require("@catppuccin/tailwindcss")({
|
||||
prefix: "ctp",
|
||||
defaultFlavour: "macchiato",
|
||||
}),
|
||||
];
|
|
@ -1,19 +0,0 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
import { fontFamily as _fontFamily } from "tailwindcss/defaultTheme";
|
||||
export const content = [
|
||||
"./node_modules/@matthiesenxyz/astro-ghostcms-catppuccin/src/**/*.{astro,js,css,ts}",
|
||||
];
|
||||
export const theme = {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ["Inter Variable", "Inter", ..._fontFamily.sans],
|
||||
},
|
||||
},
|
||||
};
|
||||
export const plugins = [
|
||||
require("@tailwindcss/typography"),
|
||||
require("@catppuccin/tailwindcss")({
|
||||
prefix: "ctp",
|
||||
defaultFlavour: "mocha",
|
||||
}),
|
||||
];
|
|
@ -25,21 +25,10 @@
|
|||
"url": "https://github.com/MatthiesenXYZ/astro-ghostcms/issues",
|
||||
"email": "issues@astro-ghostcms.xyz"
|
||||
},
|
||||
"main": "./cat-macchiato.js",
|
||||
"files": [
|
||||
"src",
|
||||
"cat-frappe.js",
|
||||
"cat-latte.js",
|
||||
"cat-macchiato.js",
|
||||
"cat-mocha.js",
|
||||
"index.js"
|
||||
"src"
|
||||
],
|
||||
"exports": {
|
||||
".": "./cat-macchiato.js",
|
||||
"./frappe": "./cat-frappe.js",
|
||||
"./latte": "./cat-latte.js",
|
||||
"./macchiato": "./cat-macchiato.js",
|
||||
"./mocha": "./cat-mocha.js",
|
||||
"./index.astro": "./src/routes/index.astro",
|
||||
"./[slug].astro": "./src/routes/[slug].astro",
|
||||
"./tags.astro": "./src/routes/tags.astro",
|
||||
|
|
|
@ -63,8 +63,7 @@ const latestFeatured = posts[0]
|
|||
</section>
|
||||
</div>
|
||||
<div class="divider my-4"/>
|
||||
<section id="ghostimport" class="text-ctp-subtext1">
|
||||
|
||||
<section class="text-ctp-text">
|
||||
|
||||
{useRemote ? (latestFeatured && <Markup
|
||||
content={latestFeatured.html}
|
||||
|
|
|
@ -31,7 +31,7 @@ invariant(settings, "Settings not found");
|
|||
---
|
||||
|
||||
<PostHero post={post} settings={settings} />
|
||||
<div id="ghostimport" class="mt-4 text-ctp-subtext1">
|
||||
<div id="ghostimport" class="mt-4 text-ctp-text">
|
||||
{useRemote ? (
|
||||
<Markup
|
||||
content={post.html}
|
||||
|
|
|
@ -62,16 +62,21 @@
|
|||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.11.25",
|
||||
"@unocss/transformer-directives": "0.58.5",
|
||||
"vitest": "^1.3.1",
|
||||
"vitest-fetch-mock": "^0.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/rss": "^4.0.5",
|
||||
"@astrojs/sitemap": "^3.1.1",
|
||||
"@iconify-json/logos": "^1.1.41",
|
||||
"@iconify-json/uil": "^1.1.8",
|
||||
"@matthiesenxyz/astro-ghostcms-theme-default": "^0.1.19",
|
||||
"@resvg/resvg-js": "^2.6.0",
|
||||
"@ts-ghost/core-api": "^6.0.0",
|
||||
"@ts-ghost/content-api": "^4.0.12",
|
||||
"@unocss/astro": "^0.58.5",
|
||||
"@unocss/reset": "^0.58.5",
|
||||
"astro-integration-kit": "^0.5.1",
|
||||
"astro-robots-txt": "^1.0.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
|
@ -79,6 +84,8 @@
|
|||
"picocolors": "^1.0.0",
|
||||
"satori": "^0.10.13",
|
||||
"satori-html": "^0.3.2",
|
||||
"unocss": "^0.58.5",
|
||||
"unocss-preset-catppuccin": "0.1.0",
|
||||
"vite": "^5.1.6"
|
||||
}
|
||||
}
|
|
@ -173,6 +173,7 @@ export default defineIntegration({
|
|||
"Theme Provider",
|
||||
ghostThemeProvider({
|
||||
theme: options.ThemeProvider.theme,
|
||||
catppuccinThemeOptions: options.ThemeProvider.catppuccinThemeOptions,
|
||||
verbose,
|
||||
})
|
||||
);
|
||||
|
|
|
@ -2,11 +2,19 @@ import { createResolver, defineIntegration } from "astro-integration-kit";
|
|||
import { corePlugins } from "astro-integration-kit/plugins";
|
||||
import { z } from "astro/zod";
|
||||
import c from "picocolors";
|
||||
import UnoCSS from "@unocss/astro";
|
||||
import { presetIcons, presetTypography, presetWind, presetUno, transformerDirectives } from "unocss";
|
||||
import presetCatppuccin from 'unocss-preset-catppuccin';
|
||||
|
||||
type CATPPUCCINFLAVOURS = "latte" | "frappe" | "macchiato" | "mocha";
|
||||
|
||||
export default defineIntegration({
|
||||
name: "@matthiesenxyz/astro-ghostcms-themeprovider",
|
||||
optionsSchema: z.object({
|
||||
theme: z.string(),
|
||||
catppuccinThemeOptions: z.object({
|
||||
defaultFlavor: z.custom<CATPPUCCINFLAVOURS>(),
|
||||
}),
|
||||
verbose: z.coerce.boolean().optional(),
|
||||
}),
|
||||
plugins: [...corePlugins],
|
||||
|
@ -16,7 +24,12 @@ export default defineIntegration({
|
|||
const DEFAULT_THEME = "@matthiesenxyz/astro-ghostcms-theme-default";
|
||||
|
||||
return {
|
||||
"astro:config:setup": ({ watchIntegration, injectRoute, logger }) => {
|
||||
"astro:config:setup": ({
|
||||
watchIntegration,
|
||||
injectRoute,
|
||||
logger,
|
||||
addIntegration,
|
||||
}) => {
|
||||
watchIntegration(resolve());
|
||||
|
||||
const themeLogger = logger.fork(
|
||||
|
@ -44,7 +57,40 @@ export default defineIntegration({
|
|||
verboseLogsInfo(`${c.bold(c.cyan("Injecting Theme:"))} ${c.bold(c.underline(c.magenta(options.theme)))}`);
|
||||
}
|
||||
|
||||
const checkTheme = () => {
|
||||
if (options.theme === "@matthiesenxyz/astro-ghostcms-catppuccin") {
|
||||
return {defaultFlavour: options.catppuccinThemeOptions.defaultFlavor}
|
||||
}
|
||||
return {defaultFlavor: undefined};
|
||||
}
|
||||
|
||||
// Add the UnoCSS integration
|
||||
addIntegration(
|
||||
UnoCSS({
|
||||
configFile: false,
|
||||
injectReset: true,
|
||||
presets: [
|
||||
presetUno(),
|
||||
presetWind({
|
||||
variablePrefix: ""
|
||||
}),
|
||||
presetIcons({
|
||||
collections: {
|
||||
uil: () =>
|
||||
import("@iconify-json/uil/icons.json")
|
||||
.then((l) => l.default),
|
||||
},
|
||||
}),
|
||||
presetTypography(),
|
||||
presetCatppuccin(checkTheme()),
|
||||
],
|
||||
transformers: [
|
||||
transformerDirectives(),
|
||||
],
|
||||
})
|
||||
)
|
||||
|
||||
// Inject Routes
|
||||
injectRoute({
|
||||
pattern: "/",
|
||||
entrypoint: `${options.theme}/index.astro`,
|
||||
|
|
|
@ -2,6 +2,8 @@ import type { SitemapOptions } from "@astrojs/sitemap";
|
|||
import type { RobotsTxtOptions } from "astro-robots-txt";
|
||||
import { z } from "astro/zod";
|
||||
|
||||
type CATPPUCCINFLAVOURS = "latte" | "frappe" | "macchiato" | "mocha";
|
||||
|
||||
export const GhostUserConfigSchema = z.object({
|
||||
/** OPTIONAL - Either set the URL in your .env or put it here
|
||||
* @example
|
||||
|
@ -26,7 +28,23 @@ export const GhostUserConfigSchema = z.object({
|
|||
* @default "@matthiesenxyz/astro-ghostcms-theme-default"
|
||||
*/
|
||||
theme: z.string().default("@matthiesenxyz/astro-ghostcms-theme-default"),
|
||||
/**
|
||||
* OPTIONAL - Catppuccin Theme Options
|
||||
*/
|
||||
catppuccinThemeOptions: z.object({
|
||||
/** OPTIONAL - Set the default flavor for the catppuccino theme
|
||||
* @default "macchiato"
|
||||
*/
|
||||
defaultFlavor: z.custom<CATPPUCCINFLAVOURS>().optional().default("macchiato"),
|
||||
}).optional().default({}),
|
||||
/**
|
||||
* OPTIONAL - Astro Remote Configuration
|
||||
*/
|
||||
astroRemote: z.object({
|
||||
/**
|
||||
* OPTIONAL - Enable or Disable the Astro Remote
|
||||
* @default true
|
||||
*/
|
||||
enable: z.boolean().default(true),
|
||||
}).optional().default({}),
|
||||
}).optional().default({}),
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
import ghostcms from "@matthiesenxyz/astro-ghostcms";
|
||||
import { defineConfig } from "astro/config";
|
||||
// import tailwind from "@astrojs/tailwind";
|
||||
// import UnoCSS from "unocss/astro";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://demo.astro-ghostcms.xyz/",
|
||||
integrations: [
|
||||
//tailwind(),
|
||||
// UnoCSS({ injectReset: true }),
|
||||
ghostcms({
|
||||
ghostURL: 'https://ghostdemo.matthiesen.xyz',
|
||||
ThemeProvider: {
|
||||
theme: "@matthiesenxyz/astro-ghostcms-theme-default",
|
||||
theme: "@matthiesenxyz/astro-ghostcms-catppuccin",
|
||||
astroRemote: {
|
||||
enable: true,
|
||||
},
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
presets: [require("@matthiesenxyz/astro-ghostcms-catppuccin/macchiato")],
|
||||
};
|
|
@ -1,6 +0,0 @@
|
|||
import brutalTheme from "@matthiesenxyz/astro-ghostcms-brutalbyelian";
|
||||
import { defineConfig } from "unocss";
|
||||
|
||||
export default defineConfig({
|
||||
presets: [brutalTheme()],
|
||||
});
|
|
@ -32,6 +32,12 @@ importers:
|
|||
'@astrojs/sitemap':
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
'@iconify-json/logos':
|
||||
specifier: ^1.1.41
|
||||
version: 1.1.42
|
||||
'@iconify-json/uil':
|
||||
specifier: ^1.1.8
|
||||
version: 1.1.8
|
||||
'@matthiesenxyz/astro-ghostcms-theme-default':
|
||||
specifier: ^0.1.19
|
||||
version: link:../astro-ghostcms-theme-default
|
||||
|
@ -44,6 +50,12 @@ importers:
|
|||
'@ts-ghost/core-api':
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
'@unocss/astro':
|
||||
specifier: ^0.58.5
|
||||
version: 0.58.5(vite@5.1.6)
|
||||
'@unocss/reset':
|
||||
specifier: ^0.58.5
|
||||
version: 0.58.5
|
||||
astro:
|
||||
specifier: '>=4.4.1'
|
||||
version: 4.5.0(@types/node@20.11.25)
|
||||
|
@ -68,6 +80,12 @@ importers:
|
|||
satori-html:
|
||||
specifier: ^0.3.2
|
||||
version: 0.3.2
|
||||
unocss:
|
||||
specifier: ^0.58.5
|
||||
version: 0.58.5(postcss@8.4.35)(vite@5.1.6)
|
||||
unocss-preset-catppuccin:
|
||||
specifier: 0.1.0
|
||||
version: 0.1.0
|
||||
vite:
|
||||
specifier: ^5.1.6
|
||||
version: 5.1.6(@types/node@20.11.25)
|
||||
|
@ -78,6 +96,9 @@ importers:
|
|||
'@types/node':
|
||||
specifier: ^20.11.25
|
||||
version: 20.11.25
|
||||
'@unocss/transformer-directives':
|
||||
specifier: 0.58.5
|
||||
version: 0.58.5
|
||||
vitest:
|
||||
specifier: ^1.3.1
|
||||
version: 1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1)
|
||||
|
@ -941,6 +962,10 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/@catppuccin/palette@0.1.8:
|
||||
resolution: {integrity: sha512-41quIj08vgPMy8kQxQb0+VqxuTlo2xfNYGSgOuiJXNojWnGuhLxBc61jgu2jiZYGNXVqgVNGWwmWEUf6s32jiA==}
|
||||
dev: false
|
||||
|
||||
/@catppuccin/tailwindcss@0.1.6(tailwindcss@3.4.1):
|
||||
resolution: {integrity: sha512-V+Y0AwZ5SSyvOVAcDl7Ng30xy+m82OKnEJ+9+kcZZ7lRyXuZrAb2GScdq9XR3v+ggt8qiZ/G4TvaC9cJ88AAXA==}
|
||||
peerDependencies:
|
||||
|
@ -2656,7 +2681,7 @@ packages:
|
|||
'@unocss/core': 0.58.5
|
||||
'@unocss/reset': 0.58.5
|
||||
'@unocss/vite': 0.58.5(vite@5.1.6)
|
||||
vite: 5.1.6(sass@1.71.1)
|
||||
vite: 5.1.6(@types/node@20.11.25)
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
|
||||
|
@ -2831,7 +2856,7 @@ packages:
|
|||
chokidar: 3.6.0
|
||||
fast-glob: 3.3.2
|
||||
magic-string: 0.30.8
|
||||
vite: 5.1.6(sass@1.71.1)
|
||||
vite: 5.1.6(@types/node@20.11.25)
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
|
||||
|
@ -8539,6 +8564,12 @@ packages:
|
|||
engines: {node: '>= 10.0.0'}
|
||||
dev: false
|
||||
|
||||
/unocss-preset-catppuccin@0.1.0:
|
||||
resolution: {integrity: sha512-/NU+FcwLMzh0ZzIJHZ/0O4RAFy+KdwrehUy8rBS8rtP0ER3TUdTytzxnGYlehu3bcmlSIsi6yOQ9X08YMnR8dw==}
|
||||
dependencies:
|
||||
'@catppuccin/palette': 0.1.8
|
||||
dev: false
|
||||
|
||||
/unocss@0.58.5(postcss@8.4.35)(vite@5.1.6):
|
||||
resolution: {integrity: sha512-0g4P6jLgRRNnhscxw7nQ9RHGrKJ1UPPiHPet+YT3TXUcmy4mTiYgo9+kGQf5bjyrzsELJ10cT6Qz2y6g9Tls4g==}
|
||||
engines: {node: '>=14'}
|
||||
|
@ -8571,7 +8602,7 @@ packages:
|
|||
'@unocss/transformer-directives': 0.58.5
|
||||
'@unocss/transformer-variant-group': 0.58.5
|
||||
'@unocss/vite': 0.58.5(vite@5.1.6)
|
||||
vite: 5.1.6(sass@1.71.1)
|
||||
vite: 5.1.6(@types/node@20.11.25)
|
||||
transitivePeerDependencies:
|
||||
- postcss
|
||||
- rollup
|
||||
|
|
Loading…
Reference in New Issue