Getting Started With YML (YAML)
It (YML) is sensitive to white space and formatting. Most of the parsers are awesome at telling us why, and where, our formatting is incorrect.
Our site uses YML everywhere. It allows us to store data for our site in a more human readable format than CSV or other file types.
We store Brewer Spotlight information like this:
---enable: truetitle: "Brewer Spotlight"description: "Get to know our club members through their brewing journey."
# Brewer Spotlightsspotlights: - name: "Jarrett Long" avatar: "/images/jarrett-spotlight.jpg" designation: "Director of War (Competition)" date: "December 3, 2022" questions: - question: "Tell us about your first batch of homebrew. When did you start?" answer: "My fist batch was an extract kit called Caribou Slobber based on Moose Drool from Big Sky Brewing (a brown ale)."---Our image gallery uses it:
---enable: truetitle: "Horsemen Club Adventures"description: "Snaps from our Historian and Social Media Maven taken at club events."
# Photosphotos: - name: "Happy Hour @ Cowtown Brewing" alt-text: "Club members at Cowtown Brewing" description: "Club members at Cowtown Brewing" image: "/images/horsemen-1.jpg"---And most of our content pages use it for front-matter or grey-matter like this from a blog post:
---title: "STYLE SPOTLIGHT: Cream Ale"meta_title: ""description: "STYLE SPOTLIGHT: Cream Ale"date: 2024-05-09T05:00:00Zimage: "/images/finings-part-2.jpeg"categories: ["Education"]authors: ["Jarrett Long"]tags: ["education", "Brew School"]draft: false---or this from an officer bio:
---title: Amy Yvonne Pattonposition: Historiansort: 7email: history@horsemenofthehops.comimage: "/images/amy-tx-whiskey.jpg"description: this is meta descriptionsocial: - name: facebook icon: FaFacebook link: https://www.facebook.com/amy.y.patton
---YML allows us to embed data in a static site and not have to pay for a database service.
You see? YAML sounds scare, but it’s super useful for running a website.