2 min read
How to Add Photos

The photos section is powered by content collections. You can add new photos by creating Markdown files in src/content/photos.

Steps

  1. Prepare your Image: Place your image file in the public directory (e.g., public/my-photo.jpg). This ensures it is accessible by the site.

  2. Create a Content File: Create a new .md file in src/content/photos.

  3. 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 the public folder).
    • category: The category for grouping photos (e.g., “Nature”, “Tech”, “Travel”).
  4. Save: Once saved, the photo will automatically appear in the photography section, grouped by its category.

Comments

No comments yet. Be the first!