Skip to content

Commit

Permalink
added dir-locals, fixed draft filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jhilker98 committed Oct 24, 2023
1 parent 5f0fb49 commit 24aa5a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")

((auto-mode-alist . (("\\.astro\\'" . astro-ts-mode))))
2 changes: 1 addition & 1 deletion src/pages/categories/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import BaseLayout from "@layouts/BaseLayout.astro";
import { slugifyUrl } from "@lib/utils";
import { getCollection, type CollectionEntry } from "astro:content";
const posts: CollectionEntry<"blog">[] = await getCollection("blog", {data} => {
const posts: CollectionEntry<"blog">[] = await getCollection("blog", ({data}) => {
return import.meta.env.PROD ? data.draft !== true : true
});
const categories = posts
Expand Down

0 comments on commit 24aa5a7

Please sign in to comment.