Skip to content

Commit

Permalink
fix(jodie-core): Allow 0 for homepagePageLimit and `homepageProje…
Browse files Browse the repository at this point in the history
…ctLimit` (#1311)

Co-authored-by: Lennart <lekoarts@gmail.com>
  • Loading branch information
vhermecz and LekoArts committed Feb 11, 2024
1 parent 3cc2d8c commit 93f8009
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/short-pans-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lekoarts/gatsby-theme-jodie-core": patch
---

Allow `0` for `homepagePageLimit` and `homepageProjectLimit` theme options. Previously that value would have no effect and the default value was used.
4 changes: 2 additions & 2 deletions themes/gatsby-theme-jodie-core/utils/default-options.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const withDefaults = (themeOptions) => {
const pagesPath = themeOptions.pagesPath || `content/pages`
const formatString = themeOptions.formatString || `DD.MM.YYYY`
const navigation = themeOptions.navigation || []
const homepagePageLimit = themeOptions.homepagePageLimit || 9999
const homepageProjectLimit = themeOptions.homepageProjectLimit || 3
const homepagePageLimit = themeOptions.homepagePageLimit ?? 9999
const homepageProjectLimit = themeOptions.homepageProjectLimit ?? 3
const mdx = typeof themeOptions.mdx === `undefined` ? true : themeOptions.mdx
const sharp = typeof themeOptions.sharp === `undefined` ? true : themeOptions.sharp

Expand Down

0 comments on commit 93f8009

Please sign in to comment.