Skip to content

Commit 577287c

Browse files
authored
Merge pull request #19 from nemanjam/feat/astro-react-gallery-article
Astro React gallery article
2 parents c1e1058 + 5ddf728 commit 577287c

File tree

16 files changed

+697
-16
lines changed

16 files changed

+697
-16
lines changed

astro.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,9 @@ export default defineConfig({
4242
build: {
4343
sourcemap: false,
4444
},
45+
server: {
46+
// applies only to Vite dev server
47+
allowedHosts: ['localhost', 'preview.amd1.nemanjamitic.com'],
48+
},
4549
},
4650
});

docs/working-notes/todo4.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,23 @@ flex flex-col and flex-grow until (including) client component to prevent layout
156156
-----------------
157157
// try pixelated blur
158158
style="image-rendering: pixelated;"
159+
-------
160+
// tunnel preview
161+
ssh -R *:1082:localhost:3000 amd1c
162+
https://preview.amd1.nemanjamitic.com
163+
164+
vite: {
165+
build: {
166+
sourcemap: false,
167+
},
168+
server: {
169+
allowedHosts: ['preview.amd1.nemanjamitic.com'],
170+
},
171+
},
172+
-------
173+
open external md links in new tab by default
174+
https://cosmicthemes.com/blog/astro-mdx-external-link/
175+
https://github.com/rehypejs/rehype-external-links
159176
```
160177

161178

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
"docker:build:push:arm": "docker buildx build -f ./docker/Dockerfile -t nemanjamitic/nemanjam.github.io --build-arg ARG_SITE_URL_ARM64='https://nmc-docker.arm1.nemanjamitic.com' --build-arg ARG_PLAUSIBLE_SCRIPT_URL='https://plausible.arm1.nemanjamitic.com/js/script.js' --build-arg ARG_PLAUSIBLE_DOMAIN='nemanjamitic.com' --platform linux/arm64 --progress=plain --push .",
2626
"docker:build:push:x86": "docker buildx build -f ./docker/Dockerfile -t nemanjamitic/nemanjam.github.io --build-arg ARG_SITE_URL_AMD64='https://nmc-docker.local.nemanjamitic.com' --build-arg ARG_PLAUSIBLE_SCRIPT_URL='https://plausible.arm1.nemanjamitic.com/js/script.js' --build-arg ARG_PLAUSIBLE_DOMAIN='nemanjamitic.com' --platform linux/amd64 --push --progress=plain .",
2727
"docker:push": "docker push nemanjamitic/nemanjam.github.io",
28+
"pi": "yarn build:nginx:pi && yarn deploy:nginx:pi",
29+
"nginx": "yarn build:nginx && yarn deploy:nginx",
30+
"tunnel": "ssh -R *:1082:localhost:3000 amd1c",
2831
"dc:up": "docker compose up --build --force-recreate -d"
2932
},
3033
"dependencies": {
@@ -68,8 +71,8 @@
6871
"@tailwindcss/typography": "^0.5.16",
6972
"@types/lodash.debounce": "^4.0.9",
7073
"@types/mdast": "^4.0.3",
71-
"@types/react": "^19.0.12",
72-
"@types/react-dom": "^19.0.4",
74+
"@types/react": "^19.1.0",
75+
"@types/react-dom": "^19.1.1",
7376
"@typescript-eslint/eslint-plugin": "^8.29.0",
7477
"@typescript-eslint/parser": "^8.29.0",
7578
"eslint": "8.57.0",

src/components/PostCard.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const getTransitionNameFromElementId = setTransitionSlug({ pageSlug: slug });
6060
src={heroImage}
6161
alt={heroAlt}
6262
itemprop="image"
63-
class="w-full h-[168px] xs:h-[250px] md:h-[168px] md:max-w-[298px] object-cover rounded-box"
63+
class="w-full h-[168px] xs:h-[250px] md:h-[168px] md:max-w-[298px] object-cover rounded-box shadow shadow-base-300"
6464
transition:name={getTransitionNameFromElementId({
6565
elementId: TRANSITION_ELEMENT_IDS.POST_CARD.HERO_IMAGE,
6666
})}

src/constants/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const PAGE_METADATA = {
3131
'lists/blog': {
3232
title: 'Blog',
3333
description:
34-
'Est aliquip reprehenderit eu esse duis laboris cillum adipisicing reprehenderitvoluptate ex aute voluptate.',
34+
'Here I share my coding experiments and thoughts on React.js, Next.js, Node.js, Astro, Python, DevOps, and more. Feel free to read, explore, and comment.',
3535
},
3636
'lists/blog/tags': {
3737
title: 'Tags',
1.36 MB
Loading
1.31 MB
Loading
1.33 MB
Loading
Binary file not shown.

0 commit comments

Comments
 (0)