diff --git a/.changeset/afraid-queens-fold.md b/.changeset/afraid-queens-fold.md new file mode 100644 index 0000000..1d4cedc --- /dev/null +++ b/.changeset/afraid-queens-fold.md @@ -0,0 +1,5 @@ +--- +'pliny': patch +--- + +make algolia search input focus style more specific diff --git a/.changeset/pre.json b/.changeset/pre.json index ca341f1..7a053cf 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -6,6 +6,7 @@ "pliny": "0.0.10" }, "changesets": [ + "afraid-queens-fold", "dry-dolphins-burn", "fuzzy-apples-judge", "giant-geckos-dress", @@ -26,6 +27,7 @@ "unlucky-keys-join", "weak-swans-heal", "wicked-maps-rest", - "yellow-ligers-sort" + "yellow-ligers-sort", + "young-hats-lie" ] } diff --git a/.changeset/young-hats-lie.md b/.changeset/young-hats-lie.md new file mode 100644 index 0000000..c61feb6 --- /dev/null +++ b/.changeset/young-hats-lie.md @@ -0,0 +1,5 @@ +--- +'pliny': patch +--- + +fix allCoreContent logic diff --git a/packages/pliny/CHANGELOG.md b/packages/pliny/CHANGELOG.md index 324fa7b..eca3bf1 100644 --- a/packages/pliny/CHANGELOG.md +++ b/packages/pliny/CHANGELOG.md @@ -1,5 +1,12 @@ # pliny +## 0.1.0-beta.13 + +### Patch Changes + +- 245b6d3: make algolia search input focus style more specific +- 4ba59d6: fix allCoreContent logic + ## 0.1.0-beta.12 ### Patch Changes diff --git a/packages/pliny/package.json b/packages/pliny/package.json index 882bb64..5350266 100644 --- a/packages/pliny/package.json +++ b/packages/pliny/package.json @@ -2,7 +2,7 @@ "name": "pliny", "description": "Main entry point for pliny components", "homepage": "https://github.com/timlrx/pliny", - "version": "0.1.0-beta.12", + "version": "0.1.0-beta.13", "type": "module", "exports": { "./*": "./*", diff --git a/packages/pliny/public/algolia.css b/packages/pliny/public/algolia.css index 486d839..5fdbb80 100644 --- a/packages/pliny/public/algolia.css +++ b/packages/pliny/public/algolia.css @@ -783,7 +783,9 @@ svg.DocSearch-Hit-Select-Icon { } .light .DocSearch-Input, -.dark .DocSearch-Input { +.dark .DocSearch-Input, +.light .DocSearch-Input:focus, +.dark .DocSearch-Input:focus { box-shadow: 0 0 #0000; background: transparent; } diff --git a/packages/pliny/src/utils/contentlayer.ts b/packages/pliny/src/utils/contentlayer.ts index 57b2bd6..97feac5 100644 --- a/packages/pliny/src/utils/contentlayer.ts +++ b/packages/pliny/src/utils/contentlayer.ts @@ -28,7 +28,7 @@ export function dateSortDesc(a: string, b: string) { * @param {string} [dateKey='date'] * @return {*} */ -export function sortPosts(allBlogs: MDXDocumentDate[], dateKey: string = 'date') { +export function sortPosts(allBlogs: T[], dateKey: string = 'date') { return allBlogs.sort((a, b) => dateSortDesc(a[dateKey], b[dateKey])) } @@ -106,8 +106,7 @@ export function coreContent(content: T): CoreContent { * @return {*} {CoreContent[]} */ export function allCoreContent(contents: T[]): CoreContent[] { - const coreContent = contents.map((c) => coreContent(c)) if (isProduction) - return coreContent.filter((c: CoreContent) => !('draft' in c && c.draft === true)) - return coreContent + return contents.map((c) => coreContent(c)).filter((c) => !('draft' in c && c.draft === true)) + return contents.map((c) => coreContent(c)) }