Fix: getAllTags in create-astro-ghostcms and other themes packages
This commit is contained in:
parent
15dc9b0719
commit
fc09141a0d
|
@ -8,7 +8,7 @@ import { getAllPosts, getAllTags, getSettings, invariant } from "@matthiesenxyz/
|
|||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getAllPosts();
|
||||
const { tags } = await getAllTags();
|
||||
const tags = await getAllTags();
|
||||
const settings = await getSettings();
|
||||
|
||||
return tags.map((tag) => {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Layout from '../layouts/Default.astro';
|
||||
import { getAllTags, getSettings, invariant } from "@matthiesenxyz/astro-ghostcms/api";
|
||||
import TagSummaryCard from '../components/generic/TagSummaryCard.astro';
|
||||
const { tags } = await getAllTags();
|
||||
const tags = await getAllTags();
|
||||
const settings = await getSettings();
|
||||
invariant(settings, 'Settings not found');
|
||||
const title = settings.title;
|
||||
|
|
|
@ -7,7 +7,7 @@ import PostPreview from '../../components/PostPreview.astro';
|
|||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getAllPosts();
|
||||
const { tags } = await getAllTags();
|
||||
const tags = await getAllTags();
|
||||
const settings = await getSettings();
|
||||
|
||||
return tags.map((tag) => {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { getAllTags, getSettings, invariant } from "@matthiesenxyz/astro-ghostcm
|
|||
|
||||
let title = "All Tags";
|
||||
let description = "All the tags used so far...";
|
||||
const { tags } = await getAllTags();
|
||||
const tags = await getAllTags();
|
||||
const settings = await getSettings();
|
||||
invariant(settings, 'Settings not found');
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
import type { InferGetStaticParamsType, InferGetStaticPropsType } from 'astro';
|
||||
import DefaultPageLayout from "../../layouts/default.astro";
|
||||
import PostPreview from "../../components/PostPreview.astro";
|
||||
import { getAllPosts, getAllTags, getSettings, invariant } from "@matthiesenxyz/astro-ghostcms/api";
|
||||
import type { InferGetStaticParamsType, InferGetStaticPropsType } from 'astro';
|
||||
import PostPreview from "../../components/PostPreview.astro";
|
||||
import DefaultPageLayout from "../../layouts/default.astro";
|
||||
import { getGhostImgPath } from "../../utils";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getAllPosts();
|
||||
const { tags } = await getAllTags();
|
||||
const tags = await getAllTags();
|
||||
const settings = await getSettings();
|
||||
|
||||
return tags.map((tag) => {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
import DefaultPageLayout from "../layouts/default.astro";
|
||||
import { getAllTags, getSettings, invariant } from "@matthiesenxyz/astro-ghostcms/api";
|
||||
import TagCard from "../components/TagCard.astro";
|
||||
import { getSettings, getAllTags, invariant } from "@matthiesenxyz/astro-ghostcms/api";
|
||||
import DefaultPageLayout from "../layouts/default.astro";
|
||||
|
||||
|
||||
let title = "All Tags";
|
||||
let description = "All the tags used so far...";
|
||||
|
||||
const { tags } = await getAllTags();
|
||||
const tags = await getAllTags();
|
||||
const settings = await getSettings();
|
||||
invariant(settings, "Settings not found");
|
||||
---
|
||||
|
|
Loading…
Reference in New Issue