Fix: getAllTags bug when there are more than 15 tags #100

Merged
Jungley8 merged 2 commits from fix/get-all-tags into issue-99-Tag_slug_page_returns_404_in_dev 2024-03-10 04:54:29 +00:00
6 changed files with 13 additions and 13 deletions
Showing only changes of commit fc09141a0d - Show all commits

View File

@ -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) => {

View File

@ -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;
@ -16,7 +16,7 @@ const description = settings.description;
description={description}
>
<main class='bg-pink p-6'>
{
{
tags
.filter((tag) => tag.slug && !tag.slug.startsWith("hash-"))
.map((tag) => (

View File

@ -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) => {
@ -37,7 +37,7 @@ const description = `All of the articles we've posted and linked so far under th
<Layout title={title} description={description} settings={settings}>
<Container>
<section class="post-card post-card-large">
<div class="post-card-content">
<div class="post-card-content-link">
<header class="post-card-header">

View File

@ -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');

View File

@ -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) => {

View File

@ -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");
---