Skip to content

Commit 68f3f02

Browse files
committed
remove solid-js
1 parent 11f7cea commit 68f3f02

File tree

12 files changed

+32
-138
lines changed

12 files changed

+32
-138
lines changed

astro.config.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import mdx from '@astrojs/mdx';
22
import react from '@astrojs/react';
3-
import solid from '@astrojs/solid-js';
43
import tailwind from '@astrojs/tailwind';
54
import icon from 'astro-icon';
65
import { defineConfig } from 'astro/config';
@@ -29,13 +28,7 @@ export default defineConfig({
2928
integrations: [
3029
expressiveCodeIntegration(),
3130
sitemapIntegration(),
32-
solid({
33-
include: ['src/**'],
34-
exclude: ['**/*react*/**'],
35-
}),
36-
react({
37-
include: ['**/*react*/**'],
38-
}),
31+
react(),
3932
// applyBaseStyles: false prevents double loading of tailwind
4033
tailwind({
4134
applyBaseStyles: false,

docs/working-notes/todo3.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,5 +405,7 @@ replace solid with react and jsx config
405405
giscus, share add text, transitions, shorter commit info footer
406406
write content for home and about
407407
write readme and credits
408+
search with fuse.js astro-paper
409+
fix lint, types, format
408410
```
409411

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"@astrojs/mdx": "^3.1.2",
2828
"@astrojs/react": "^3.6.0",
2929
"@astrojs/sitemap": "^3.1.6",
30-
"@astrojs/solid-js": "^4.4.0",
3130
"@astrojs/tailwind": "^5.1.0",
3231
"@fontsource-variable/inter": "^5.0.19",
3332
"@tailwindcss/typography": "^0.5.13",
@@ -46,11 +45,9 @@
4645
"nanostores": "^0.10.3",
4746
"object-treeify": "^4.0.1",
4847
"react": "^18.3.1",
49-
"react-component-benchmark": "^2.0.0",
5048
"react-dom": "^18.3.1",
5149
"reading-time": "^1.5.0",
5250
"sharp": "0.32.6",
53-
"solid-js": "^1.8.18",
5451
"tailwind-clip-path": "^1.0.0",
5552
"tailwind-merge": "^2.4.0",
5653
"zod": "^3.23.4"

src/components/Footer.astro

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
import { Icon } from 'astro-icon/components';
33
4-
import { getLatestCommitInfo } from '@/libs/git';
5-
6-
import { BackToTop } from '@/components/BackToTop';
4+
// import { BackToTop } from '@/components/BackToTop';
75
import Link from '@/components/Link.astro';
86
import { ROUTES } from '@/constants/routes';
97
import { CONFIG } from '@/config';
8+
import { getLatestCommitInfo } from '@/libs/git';
109
import { trimHttpProtocol } from '@/utils/strings';
1110
1211
const { SITE_URL, AUTHOR_LINKEDIN, AUTHOR_GITHUB } = CONFIG;
@@ -80,5 +79,5 @@ const { time, hash, message } = getLatestCommitInfo();
8079
</ul>
8180
</div>
8281
</div>
83-
<BackToTop client:only="solid-js" />
82+
{/* <BackToTop client:only="solid-js" /> */}
8483
</footer>

src/components/PostMeta.astro

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ const shouldDisplay = [category, publishDate, updatedDate, readingTime].some(Boo
2424
shouldDisplay && (
2525
<p aria-label="Post meta" class={cn('b-p text-captions flex flex-row flex-wrap items-center gap-2', className)}>
2626
{publishDate && (
27-
<Icon name="mdi:access-time" />
28-
<time itemprop="datePublished" datetime={formatDateIso(publishDate)}>
29-
{formatDate(publishDate)}
30-
</time>
27+
<Icon name="mdi:access-time" />
28+
<time itemprop="datePublished" datetime={formatDateIso(publishDate)}>
29+
{formatDate(publishDate)}
30+
</time>
3131
)}
3232
{category && (
3333
<span>·</span>
34-
<Icon name={getCategoryProps(category).icon} />
35-
<Link href={`${ROUTES.CATEGORIES}${category}`}>{category}</Link>
34+
<Icon name={getCategoryProps(category).icon} />
35+
<Link href={`${ROUTES.CATEGORIES}${category}`}>{category}</Link>
3636
)}
3737
{readingTime && (
3838
<span>·</span>
39-
<Icon name="mdi:book-open-blank-variant-outline" />
40-
<span>{`${Math.round(readingTime)} minutes`}</span>
39+
<Icon name="mdi:book-open-blank-variant-outline" />
40+
<span>{`${Math.round(readingTime)} minutes`}</span>
4141
)}
4242
{updatedDate && (
43-
<span>·</span>
44-
<Icon name="mdi:edit-outline" />
45-
<time itemprop="dateUpdated" datetime={formatDateIso(updatedDate)}>
46-
{formatDate(updatedDate)}
47-
</time>
43+
<span>·</span>
44+
<Icon name="mdi:edit-outline" />
45+
<time itemprop="dateUpdated" datetime={formatDateIso(updatedDate)}>
46+
{formatDate(updatedDate)}
47+
</time>
4848
)}
4949
</p>
5050
)

src/layouts/Base.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import BaseHead from '@/components/BaseHead.astro';
33
import Footer from '@/components/Footer.astro';
44
import Header from '@/components/Header.astro';
5-
import { Snackbar } from '@/components/Snackbar';
5+
// import { Snackbar } from '@/components/Snackbar';
66
import ThemeScript from '@/components/ThemeScript.astro';
77
88
import type { BaseHeadProps } from '@/components/BaseHead.astro';
@@ -18,7 +18,7 @@ const { metadata } = Astro.props as BaseProps;
1818
<Header />
1919
<slot />
2020
<Footer />
21-
<Snackbar client:idle />
21+
{/* <Snackbar client:idle /> */}
2222
<ThemeScript />
2323
</body>
2424
</html>

src/libs/api/open-graph/pages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const getPages = async () => {
3131
// pages/design/index.mdx -> pages/design.png
3232
pagePath = pagePath.replace(/\/index$/g, '');
3333

34+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3435
return [pagePath, (page as any).frontmatter];
3536
})
3637
);

src/utils/objects.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export const filterUndefined = <T extends Record<string, any>>(obj: T): T =>
1+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2+
export const filterUndefined11 = <T extends Record<string, any>>(obj: T): T =>
23
Object.fromEntries(Object.entries(obj).filter(([_key, value]) => value !== undefined)) as T;

0 commit comments

Comments
 (0)