The photos section is powered by content collections. You can add new photos by creating Markdown files in src/content/photos.
Steps
-
Prepare your Image: Place your image file in the
publicdirectory (e.g.,public/my-photo.jpg). This ensures it is accessible by the site. -
Create a Content File: Create a new
.mdfile insrc/content/photos. -
Add Frontmatter: Fill in the details about the photo:
--- title: "Sunset at the Beach" description: "A beautiful sunset captured last summer." date: "2024-05-22" image: "/my-photo.jpg" category: "Nature" ---title: The title of the photo.description: (Optional) A caption or description.date: The date the photo was taken or added.image: The path to the image starting with/(relative to thepublicfolder).category: The category for grouping photos (e.g., “Nature”, “Tech”, “Travel”).
-
Save: Once saved, the photo will automatically appear in the photography section, grouped by its category.
Comments
No comments yet. Be the first!