Skip to content

Commit

Permalink
Move photos from src/content/images to src/photos
Browse files Browse the repository at this point in the history
  • Loading branch information
reupen committed Dec 7, 2024
1 parent 44c62be commit 1983bc2
Show file tree
Hide file tree
Showing 91 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
uses: actions/cache@v4
with:
path: node_modules/.astro
key: ${{ runner.os }}-astro-${{ hashFiles('**/package-lock.json', 'src/content/images/*.webp', 'src/content/images/*.jpg') }}
key: ${{ runner.os }}-astro-${{ hashFiles('**/package-lock.json', 'src/photos/*.webp', 'src/photos/*.jpg') }}

- name: Build site
run: |
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean_up_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ROOT_DIR = PurePath(__file__).parents[1]

IMAGES_DIR = Path(ROOT_DIR / "src/content/images")
IMAGES_DIR = Path(ROOT_DIR / "src/photos")
OUTPUT_DIR = Path(ROOT_DIR / "dist/_astro")


Expand Down
5 changes: 2 additions & 3 deletions src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { join } from "node:path"

const imageCollection = defineCollection({
loader: glob({
base: "./src/content/images",
base: "./src/photos",
pattern: "**/*.md",
}),
schema: ({ image }) =>
Expand All @@ -20,9 +20,8 @@ const imageCollection = defineCollection({
},
z.object({
title: z.string(),
// location: z.string().optional(),
exif: z.string().transform(async (val, ctx) => {
const exif = await exiftool.read(join("src/content/images", val))
const exif = await exiftool.read(join("src/photos", val))

if (!(exif.DateTimeOriginal instanceof ExifDateTime)) {
ctx.addIssue({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1983bc2

Please sign in to comment.